Withdrawals represent the final missing component in the validator lifecycle, a feature that has been under development since the Ethereum Beacon Chain launched in December 2020. They are set to go live with the upcoming Shanghai upgrade. As this upgrade is scheduled for the first half of the year, it is important to understand what withdrawals are, how they function, and how to use this new capability.
The Historical Context
When the Beacon Chain first went live in December 2020, there was no mechanism to send information from it to the Ethereum execution layer. This meant that while validator balances could accumulate on the consensus layer, there was no technical way to access these funds on the execution layer. Over time, Ethereum’s architecture evolved to integrate new research, shifting toward a layer-2-centric scaling model while largely preserving the original execution layer.
In September 2022, The Merge occurred, combining the execution and consensus layers. Execution blocks became a subset of data within consensus blocks. This structural change made it possible to transfer information from the consensus layer to the execution layer—including validator rewards.
What Have Validators Been Doing?
Since the Beacon Chain’s genesis in December 2020, validators have been producing blocks and securing the network. They propose new blocks and cast votes on blocks proposed by themselves and others. When performed correctly, these actions earn them rewards.
The network launched with just over 20,000 validators. Today, there are approximately 520,000 active validators ensuring its security. From December 2020 until September 2022, the Beacon Chain only secured itself, paving the way for The Merge. Since then, the entire Ethereum network has been secured solely by these validators.
In return for maintaining blockchain security, validators are promised rewards directly generated by the Ethereum protocol, which are recorded on the consensus layer.
What Happened to Validator Rewards?
Because the consensus layer lacks execution capability, the ETH accumulated there cannot be transferred between accounts. In fact, the consensus layer doesn’t even have the concept of accounts; the only entities with balances are the validators themselves. This means that while validator rewards have been steadily growing for over two years, there has been no way to withdraw them.
Collectively, the Beacon Chain has generated over 1 million ETH in cumulative rewards. For individual validators, the amount of reward depends on various factors, most notably the length of their active service. Many have accumulated significant rewards:
Most validators have earned less than 2 ETH in rewards, though some have accrued up to 5 ETH. While these rewards are recorded on the consensus layer, they cannot be realized on the execution layer until withdrawals are enabled.
Note that since The Merge, block-proposing validators also receive a portion of transaction fees. These fees are paid directly on the execution layer and are therefore not covered here.
What the Shanghai Upgrade Changes
The Shanghai upgrade provides a mechanism to transfer rewards from the consensus layer to the execution layer. Each execution block will contain data for approximately 16 withdrawals that move ETH to execution layer addresses.
A withdrawal has the following data structure:
The individual components of a withdrawal are:
- Withdrawal index: A unique identifier for the withdrawal.
- Validator index: The index of the validator from which the withdrawal originates on the consensus layer.
- Address: The Ethereum address receiving the withdrawal.
- Amount: The amount of ETH to be added to the account, denominated in Gwei.
When a block is imported into the execution layer, withdrawals are processed. The balance of the given address is increased by the specified amount. It is important to note that withdrawals are not transactions. They do not consume gas, and they do not trigger any smart contract code in the receiving address. Once the block is processed, the balance is increased—nothing else occurs.
Where Does the Withdrawn ETH Come From?
The above information describes what a withdrawal is, but where does the ETH come from when a withdrawal occurs?
Although creating a validator requires a deposit of 32 ETH to the Ethereum deposit contract, this ETH cannot be accessed for withdrawals, as the contract has no mechanism to allow token transfers. Using these funds would also result in a negative balance for the contract, since the total balance of all validators on the consensus layer now exceeds the initial sum of deposits.
Withdrawals are paid from funds generated by the Ethereum protocol (i.e., newly issued ETH), not transferred from existing accounts. This ensures that withdrawals can always be paid, even if the total amount withdrawn from the consensus layer is higher than the total amount deposited.
The Withdrawal Clock
Internally, consensus layer software maintains a simple list of validator information:
| Index | State | Balance | Withdrawal credentials |
|---|---|---|---|
| 0 | Active | 36.465 | 0x00f5…cf71 |
| 1 | Active | 36.858 | 0x0092…df99 |
| 2 | Exited | 36.473 | 0x00d6…ad6f |
| … | … | … | … |
| 519053 | Pending | 32.000 | 0x0100…d899 |
The independent components for each validator entity are:
- Index: A unique index corresponding to the validator and its position in the list.
- State: The current state of the validator, e.g., "active" or "exited."
- Balance: The current balance of the validator, in Gwei.
- Withdrawal credentials: The withdrawal credentials for the validator.
Most of these concepts are self-explanatory, but withdrawal credentials require some explanation. Every validator has a set of withdrawal credentials. These credentials control the flow of funds from the consensus layer, including the initial deposit and subsequent rewards.
There are currently two types of withdrawal credentials:
- Those generated from a BLS public key, known as "type 0."
- Those generated from an execution address, known as "type 1."
The critical difference is that type 1 withdrawal credentials allow consensus layer funds to be withdrawn to the execution layer, while type 0 credentials do not.
The consensus layer processes withdrawals in order, starting from index 0 and proceeding to the last index in the set before starting again. You can think of the withdrawal process like a single-handed clock. Each tick on the clock represents a validator, starting from validator index 0 up to the last one (currently around 520,000).
Once the Shanghai upgrade is live, blocks will contain withdrawal information. To select which validators can make a withdrawal, the clock hand moves around the circle of validators. Whenever it points to a validator that is eligible for a withdrawal, part or all of that validator's balance will be withdrawn based on the following rules:
- If the validator has type 1 credentials, is in an "active" state, and has a balance exceeding 32 ETH, the amount above 32 ETH will be withdrawn.
- If the validator has type 1 credentials, is in a "withdrawable" state, and has a non-zero balance, the entire remaining balance will be withdrawn.
If one of these rules applies, a withdrawal is generated and added to the block. If neither applies, the validator is considered ineligible, and the pointer moves on. The pointer continues until it has found 16 eligible validators, at which point the withdrawal information is included in the block.
The time it takes for the clock hand to complete a full cycle depends on the number of eligible validators. With approximately 520,000 active validators at the time of writing, 16 withdrawals per block, and 7,200 blocks per day, it would take about 4.5 days to process the entire set of eligible validators. However, this duration will change as the number of eligible validators changes.
The Process of Modifying Withdrawal Credentials
As mentioned, to be eligible, a validator must have type 1 withdrawal credentials. At the time of writing, about 40% of validators have type 1 credentials; the rest have type 0. The Shanghai upgrade will provide the capability to upgrade from type 0 to type 1 withdrawal credentials, allowing validators to receive their rewards.
Modifying withdrawal credentials requires creating and broadcasting a signed operation on the consensus layer. The structure of this operation is as follows:
The components of the operation are:
- Validator index: The index of the validator to which the operation applies.
- Withdrawal BLS public key: The BLS public key of the current BLS withdrawal credentials.
- Execution address: The execution address to be used for the new withdrawal credentials.
- Signature: A signature on the other fields of the operation, created by the private key of the current BLS withdrawal credentials.
The process on the Beacon Chain is:
"For the validator defined by the validator index, check if the given BLS public key can be converted to match the validator's current type 0 withdrawal credentials. If so, convert the given execution address to type 1 withdrawal credentials and update the validator."
Therefore, a credentials modification operation can only happen once. Once processed, the validator's definition on-chain will contain type 1 withdrawal credentials, so there will be no type 0 credentials left to match. This means type 1 credentials, once set, will remain for the validator's lifetime.
Choosing an Execution Address
The first step in modifying withdrawal credentials is selecting the Ethereum execution address that will receive the withdrawals. As described, you can only make this change once, so you must ensure you control the private key for the address before setting it.
If you have multiple validators, you need to consider whether to provide a different withdrawal address for each validator or use the same address for all:
- Using the same address is convenient. Rewards accumulate to this address more quickly, and it may reduce gas costs for managing funds.
- Using different addresses and keeping them unlinked enhances the security of your validators if they are already unlinked (e.g., different deposit addresses, different or no block proposal graffiti).
Creating the Operation
Once an execution address is selected, an operation must be created and signed for each validator. Due to the sensitivity of exposing information related to withdrawal credentials (private keys or mnemonics), it is highly recommended to create these operations offline.
The method for creating operations is beyond this article's scope, but you can refer to detailed guides using tools like ethdo or other available utilities and wizards. 👉 Explore step-by-step guides for creating operations
Broadcasting the Operation
After creation, the operations must be broadcast to the consensus layer. If an operation is provided to a consensus node after the Shanghai upgrade, it will be broadcast to the network at the next opportunity to be included in a block. If provided before the upgrade, it will be stored and broadcast once the upgrade is complete.
Note that this requires connecting to a consensus node that recognizes the Shanghai upgrade. These nodes are expected to become available around February, providing good timing for the mainnet upgrade.
The Online/Offline Process
As mentioned, creating credential change operations should be done offline. This avoids exposing withdrawal private keys to an insecure computer, which could lead to theft. However, an online computer is needed to fetch information from a beacon node and ultimately broadcast the credential change operations. Therefore, a hybrid online/offline process is recommended for creating and broadcasting these operations.
Several tools follow this process. Below is an overview of the steps involved and their purpose.
1. Fetching On-Chain Information
To create a valid, signed credentials modification operation, you need various information from the chain itself to ensure accuracy. It is also advisable to obtain a list of all current validator information, as this makes it easier to create operations and verify their suitability.
This information comes from an active consensus node and therefore requires an online computer. Most entities running validators should have access to a consensus node, but if staking is delegated to a service, the necessary information should be obtained from them.
This step produces a file containing on-chain information. The file itself does not contain private keys or other sensitive data.
2. Transferring On-Chain Information
Once the chain information is collected, it must be transferred from the online computer to an offline one. The common practice is to use USB storage, which allows data transfer without a direct connection. This means the offline computer can remain completely disconnected from the internet, greatly enhancing the security of private keys and mnemonics.
3. Creating Credential Change Operations
With the chain information on the offline computer, the credential change operations can be created. This requires access to the mnemonic or private key that created the current withdrawal credentials, so running this process on an offline machine is far safer.
Since a single private key or mnemonic may have created credentials for multiple validators, the creation process might generate multiple change operations.
This step produces a file containing the change operations. The file itself will not contain private keys or other sensitive information.
4. Transferring Credential Change Operations
Once the file containing the credential change operations is created, it must be transferred from the offline computer back to the online one. Again, USB storage or a similar method is the common best practice.
5. Broadcasting Credential Change Operations
With the operations file on the online computer, the operations can be broadcast to the Ethereum network by sending them to a consensus node—most likely the same node from which the chain information was initially fetched.
Once submitted to a consensus node, the operations are broadcast network-wide. The change will take effect once a consensus block includes the operation. Each block has space for 16 change operations, so it could take up to 4 days for an operation to be added, though it will most likely be included within 1-2 hours.
Frequently Asked Questions
What are Ethereum staking withdrawals?
Ethereum staking withdrawals are a new feature that allows validators to transfer their earned rewards from the consensus layer (Beacon Chain) to the execution layer. This enables them to access and use their accumulated ETH for the first time since staking began.
How do I make my validator eligible for withdrawals?
To be eligible, your validator must have Type 1 withdrawal credentials. If your validator was set up with Type 0 credentials, you will need to perform a one-time operation to change them to Type 1, specifying an execution address you control. This process requires signing a message with your current withdrawal key.
Will withdrawals affect the security of the Ethereum network?
No, withdrawals are designed to enhance the network by completing the validator lifecycle. They allow validators to exit the system safely and access their rewards, which could encourage more participation and further decentralize and secure the network.
How long does it take to receive a withdrawal once it's initiated?
Withdrawals are processed automatically by the protocol. The "withdrawal clock" cycles through all validators. Depending on network congestion and the number of eligible validators, it typically takes from a few hours to a few days for a specific validator's turn to be processed.
Can I withdraw my initial 32 ETH stake?
Yes, but only if you fully exit your validator. Partial withdrawals only remove rewards above the 32 ETH stake. To withdraw your entire balance, including the initial stake, you must initiate a voluntary exit, after which your validator becomes "withdrawable" and the full balance can be withdrawn.
What is the difference between a partial and a full withdrawal?
A partial withdrawal automatically moves any rewards a validator has earned that exceed the 32 ETH stake to its designated execution address. The validator remains active. A full withdrawal occurs when a validator exits the network; its entire balance is then withdrawn to the execution address.
Conclusion
The withdrawal functionality, arriving with the Shanghai upgrade, will for the first time make users' consensus rewards accessible since the launch of the Beacon Chain. Once set up, withdrawals will occur automatically for any eligible validator. The upgrade also provides a mechanism to configure validators that are not yet ready for withdrawals.
With the validator lifecycle now complete, the consensus layer fulfills the promise made to stakers back in December 2020, allowing validators to exit a system they previously might have felt locked into. This addition is expected to bring stronger security to Ethereum and a more robust network for the future. 👉 Learn more about advanced staking strategies