> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dune.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ethereum.withdrawals

> Beacon chain ETH withdrawals on Ethereum — validator index, amount, and recipient address.

export const TableSample = ({tableName, tableSchema}) => <>
    <div className="hidden dark:block">
      <iframe src={`https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=${tableSchema}&table_name_t6f0df=${tableName}&darkMode=true`} style={{
  width: '100%',
  height: '500px',
  border: 'none',
  marginTop: '10px'
}} />
    </div>
    <div className="dark:hidden">
      <iframe src={`https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=${tableSchema}&table_name_t6f0df=${tableName}`} style={{
  width: '100%',
  height: '500px',
  border: 'none',
  marginTop: '10px'
}} />
    </div>
  </>;

<Note>Dune does not have beacon chain data yet. This table introduces the action of withdrawing from the beacon chain only.  </Note>

The [Ethereum Improvement Proposal (EIP) 4895](https://eips.ethereum.org/EIPS/eip-4895) introduces a system-level "operation" to support validator withdrawals that are "pushed" from the beacon chain to the EVM.

Withdrawals are represented as a new type of object in the execution payload, called an "operation", that cleanly separates this "system-level" operation from regular transactions. Withdrawals provide key information from the consensus layer such as a monotonically increasing index, validator index, recipient address, and the amount of ether given in Gwei.

Using this table you can observe beacon chain withdrawals.

## How to work with this table

In order to connect deposits and withdrawals, we must identify the `validator_index` of unique depositors. Since Dune doesn't have beacon chain data yet, we have to rely on a workaround using a query to obtain a list of valid and active deposits from the Ethereum deposit contract.

This [query](https://dune.com/queries/2364548) returns a list of valid and active deposits, which we can use to identify the `validator_index` of unique depositors. We can use this query to match the `validator_index` of depositors with the `validator_index` of withdrawers in the withdrawals table.

This query provides a comprehensive list of valid deposits and is kept up to date with full historical coverage.

[LINK TO QUERY](https://dune.com/queries/2364548)

## Column Descriptions

| Column            | Type        | Description                                          |
| ----------------- | ----------- | ---------------------------------------------------- |
| `block_time`      | `timestamp` | Timestamp of the block containing this withdrawal    |
| `block_number`    | `bigint`    | Block number containing this withdrawal              |
| `index`           | `bigint`    | Monotonically increasing withdrawal index            |
| `validator_index` | `bigint`    | Index of the validator that initiated the withdrawal |
| `address`         | `varbinary` | Recipient address of the withdrawal                  |
| `amount`          | `uint256`   | Amount of ether withdrawn (in Gwei)                  |
| `block_date`      | `date`      | Date of the block (UTC)                              |

## Table Sample

<TableSample tableSchema="ethereum" tableName="withdrawals" />

## Examples

### Withdrawals per day

```sql theme={null}
select
date_trunc('day', block_time) as dt,
sum(AMOUNT)/1e9 as withdraw_amount
from ethereum.withdrawals
group by 1
```

### Dashboards

[https://dune.com/hildobby/eth2-staking](https://dune.com/hildobby/eth2-staking)

[https://dune.com/hashed\_official/staking-as-a-service](https://dune.com/hashed_official/staking-as-a-service)

* [ETH Staking Dashboard](https://dune.com/hildobby/eth2-staking) - This dashboard provides an overview of the Ethereum 2.0 staking ecosystem. It includes data on the number of validators, the total amount of staked ETH, and the number of deposits and withdrawals.
* [Staking as a Service](https://dune.com/hashed_official/staking-as-a-service) - This dashboard provides a comprehensive overview of the staking-as-a-service ecosystem. It includes data on the number of validators, the total amount of staked ETH, and the number of deposits and withdrawals.

## References

* [Ethereum Improvement Proposal EIP 4895](https://eips.ethereum.org/EIPS/eip-4895)
* [Ethereum 2.0 Deposit Contract](https://etherscan.io/address/0x00000000219ab540356cbb839cbe05303d7705fa)
