Ethereum, the world’s second-largest cryptocurrency by market capitalization, is about to undergo a major upgrade that will impact its proof-of-stake mechanism. The Shanghai upgrade will allow users to withdraw their staked ether (ETH) for the first time. In this blog post, we will dive deeper into the changes that will be included in the Shanghai upgrade, what it means for our stakers, and why it is an important step for the Ethereum blockchain.
ETH Withdrawals for Validators: Your Go-To Guide After Shanghai
- When are withdrawals going to be enabled on Ethereum?
- What are the Shanghai and Capella upgrades?
- How does enabling withdrawals impact Ethereum?
- Types of ETH Withdrawals
- What are partial withdrawals?
- What are full withdrawals?
- How are withdrawals processed?
- What is the difference between a validator withdrawing versus exiting the active set?
- How long will it take to process a withdrawal?
- How long will it take to process a validator exiting the active set?
- How to Check if the Validator is Ready for ETH Withdrawal
- Unlocking Staked Funds: A Guide to Making Withdrawal Credentials Compatible with staking-deposit-cli
- Exit staking (full withdrawal)
When are withdrawals going to be enabled on Ethereum?
Withdrawals on Ethereum are expected to be enabled on April 12, coinciding with the Shanghai and Capella upgrades. It is possible that it may occur later, but at present this is the anticipated date.
What are the Shanghai and Capella upgrades?
The Shanghai upgrade is a set of changes to the Ethereum protocol that will enable users to unstake their staked ETH. This upgrade will include a change to the Ethereum protocol that allows staked ETH to be unlocked for the first time. It is the first major change to the Ethereum blockchain after its transition from a proof-of-work consensus mechanism to a proof-of-stake consensus mechanism. The transition process, known as The Merge, laid the technical foundation for future scalability improvements on the Ethereum blockchain.
The Shanghai upgrade will include four Ethereum Improvement Proposals (EIPs). The most notable of the changes is EIP-4895, which allows users who staked their ETH to maintain Ethereum’s new proof-of-stake “Beacon Chain” to withdraw or “unstake” their funds for the first time. The other EIPs are:
Another hard fork will take place alongside the Shanghai upgrade, called Capella. This is why you might see “Shanghai/Capella” or “Shapella” mentioned simultaneously in the run-up to the network upgrade.
Now that Ethereum has a proof-of-stake execution chain and a consensus chain (Beacon Chain), new changes can require hard-forking both layers. In this instance, Shanghai references the upcoming execution chain hard fork, while Capella references the consensus chain hard fork.
How does enabling withdrawals impact Ethereum?
Enabling withdrawals through the Shanghai upgrade is expected to bring significant benefits to the Ethereum network. Currently, the inability to withdraw stake and rewards has deterred many potential stakers from participating. The ability to withdraw is not only advantageous for stakers seeking liquidity, but it also has the potential to increase the security of Ethereum, making it a significant win for the entire ecosystem.
Types of ETH Withdrawals
The implementation of the Shanghai/Capella update will make withdrawals a crucial aspect of the Beacon Chain, including the EIP-4895 proposal. This upgrade will enable the automatic withdrawal of rewards to an execution-level address, and active validators will be able to unlock their entire balance without incurring gas fees. However, there are two types of withdrawals: partial withdrawal and full withdrawal.
Partial withdrawal, also known as rewards sweeping, is when an active validator has a total balance exceeding the maximum effective balance of 32 ETH. Such accounts automatically receive an extra balance, and the term "partial withdrawal" is used since the remaining 32 ETH remain locked and deposited.
If a validator wishes to unstake their entire balance, they must undergo a full withdrawal process that involves exiting and no longer being a part of the Beacon chain. After the exit and withdrawal procedure is complete, the validator's entire balance, including rewards, will be unlocked and available for spending.
Depending on the method used to set up the initial deposit, an account may or may not be ready for withdrawal. If the --eth1_withdrawal_address flag was used when generating the keys, the account is considered ready. However, if the flag was not used, the withdrawal_credentials must be changed to the bls_withdrawal address format to enable withdrawals. Stakefish intends to release a feature on our staking dashboard to help users switch from BLS to ETH1 addresses to be compatible with partial, and full withdrawals. The user is expected to sign the BLS transaction offline with official staking deposit cli tools.
What are partial withdrawals?
When an active validator's effective balance exceeds the maximum limit of 32 ETH and their total balance surpasses this amount, an excess balance withdrawal is initiated. Since a single validator cannot receive rewards on excess balances beyond 32 ETH, any additional balance is automatically withdrawn to their Ethereum address. These withdrawals are sometimes called "partial withdrawals" or "reward payments" because the remaining 32 ETH remains locked and staked. It's important to note that it's not possible to manually request a specific amount of ETH to be withdrawn.
What are full withdrawals?
A full withdrawal involves a validator leaving the active validator set, and their staked funds and accrued rewards becoming withdrawable and sent to their designated withdrawal address. It's worth noting that validators don't have the option to withdraw a specific amount of their staked balance. Any balance over 32 ETH will be automatically transferred to their withdrawal address. If a validator wants to access their initial 32 staked ETH, they must complete a full exit and withdrawal. Currently, this option to exit the active set is available to validators. After the Shanghai/Capella upgrade, the only change will be that stake and accrued rewards will be directly sent to the withdrawal address.
How are withdrawals processed?
Ethereum verifies each validator sequentially, checking for two conditions:
- The validator has requested a complete withdrawal from the active validator set and has entered the "withdrawable" state.
- The validator has a balance greater than 32 ETH.
If either condition is met, the validator's withdrawal is executed, and it is added to the current block. Once the block is processed, the withdrawal amount is transferred to the validator's designated withdrawal address. However, this process assumes that validators possess ETH1 withdrawal credentials. If validators hold BLS withdrawal credentials, an upgrade is required before their withdrawals can be processed. (For further information, refer to this link).
What is the difference between a validator withdrawing versus exiting the active set?
Automated processing of validator withdrawals occurs when a validator holds more than 32 ETH. The excess amount beyond 32 ETH will be dispatched to the validator's designated withdrawal address. While a validator remains in the active set, they will accumulate rewards that will be automatically sent to their specified withdrawal address.
Upon leaving the active set, a validator receives their initial stake amount along with any accrued rewards. Once the validator has completed a successful exit from the active set, they will no longer be eligible for rewards.
How long will it take to process a withdrawal?
In terms of timing, a block can include a maximum of sixteen withdrawals, and both partial and full withdrawals are treated equally. The validator withdrawal process involves checking each validator, as described above, and adding their withdrawal to the current block.
Given an average block time of approximately 12.1 seconds and around 500,000 validators, it will take approximately 4.5 days to cycle through all validators. However, it should be noted that this is a conservative estimate and assumes that all validators have the necessary Eth1 withdrawal credentials. The withdrawal cycle will be shorter if a greater proportion of validators have older BLS credentials. For example, if 50% of validators have BLS credentials, the cycle will take roughly 2 days. After the block has been processed, the ETH amount is transferred to the validator's withdrawal address.
How long will it take to process a validator exiting the active set?
As previously mentioned, a validator's withdrawal, whether partial or full, will be processed within a maximum of about 4.5 days.
It is important to note that this timeline does not refer to the duration required for a validator to fully exit the active validator set, which is a prerequisite for a complete withdrawal.
Following a request to exit the active validator set, a validator must wait approximately five to six epochs, which equates to around 35 minutes. If there are other validators in the exit queue, the validator will have to join the queue. Presently, a maximum of seven validators can exit per epoch, or 1,575 validators per day. Once the validator has exited the queue, they must wait for an additional period of 256 epochs, or approximately 27 hours, before becoming "withdrawable." At present, this implies that a validator's ETH is locked "in limbo" following their exit. After the Shanghai/Capella update, the exited and withdrawable ETH will be included in the withdrawal sweep and sent to the validator's withdrawal address.
In the absence of a queue and assuming the validator's withdrawal is immediately picked up in the sweep, the process from the initial exit request to the transfer of ETH to the validator's withdrawal address will take a minimum of approximately one day. However, since there may be an exit queue, and it is improbable that a validator will be the first to be picked up in the withdrawal sweep, the process will likely take longer.
How to Check if the Validator is Ready for ETH Withdrawal
There are multiple ways to verify the readiness of a validator for withdrawal, either partial or full:
- Navigate to https://launchpad.ethereum.org/en/withdrawals and input the validator index. The resulting message indicates whether the validator is ready for withdrawal and is bound to eth1_withdrawal_address.
2. Alternatively, visit https://launchpad.ethereum.org/en/withdrawals and provide the validator address. A validator is deemed ready for withdrawal if the Withdrawals menu is active.
Conversely, an inactive Withdrawals menu implies that the validator is not yet prepared for withdrawal.
An instance of a validator that is eligible for withdrawal (the Withdrawals menu is currently accessible).
An instance of a validator that is not eligible for withdrawal (the Withdrawals menu is currently unavailable).
Unlocking Staked Funds: A Guide to Making Withdrawal Credentials Compatible with staking-deposit-cli
Click here for the official Ethereum launchpad documentation with the most up-to-date information.
If you don't enable withdrawal using --eth1_withdrawal_address, you'll need to change the withdrawal_credentials to bls_withdrawal execution address format. You can do this with staking-deposit-cli.
- First, find the validator index. Visit https://beaconcha.in/ and enter the validator address. This will provide you with information about the validator and its index.
Alternatively, you can log into your stakefish dashboard with your depositor wallet at https://stake.fish/dashboard to see all your validators staked with us.
2. Next, find the withdrawal_credentials for the validator address. You can locate this information in the deposit_data-*.json file. If you generated keys using staking-data-cli, you'll usually find them in the validator_keys directory.
3. Download staking-deposit-cli with generate_bls_to_execution_change, unzip it, and navigate to the directory with the binary file.
4. To change the withdrawal_credentials format to the bls_withdrawal execution address, run the following command:
./deposit --language=english generate-bls-to-execution-change --chain=goerli --mnemonic="your mnemonic" --bls_withdrawal_credentials_list="<withdrawal credentials>" --validator_start_index=<path index> --validator_indices="<validator index>" --execution_address=<withdrawal eth1 address>
chain= – network name (in our case, Goerli)
bls_withdrawal_credentials_list - current bls_withdraw you want to change can be done as a comma-separated list (in this example, one 00f8350a4d2fbaaf08c75e442b74fc0d931ab02236009587e0fdd17feaaa7116 in the format of 0x00f8350a4d2fbaaf08c75e442b74fc0d931ab02236009587e0fdd17feaaa7116) validator_start_index is the index of the validator key you want to change bls_withdrawal from.
6. Note that:
- If you have multiple keys and want to change bls_withdrawal for all of them, use validator_start_index=0.
- If you have multiple keys and want to change bls_withdrawal only for a particular validator, enter its index, starting with 0. In our example, we want to change bls_withdrawal for the third validator in the deposit_data-*.json file, so its index number is two.
- Validator_indices is the index of the validator you want to change bls_withdrawal_credentials for.
- Execution_address is the address where the balance will be withdrawn.
7. After executing the command, the bls_to_execution_change-*.json file will be created in the respective path.
8. Upload bls_to_execution_change-*.json to the pool Beacon Node, for example using this command for CL-PRYSM:
curl -X POST -H "Content-type: application/json" -d "@/path-to-bls_to_execution_change-*.json" http:/127.0.0.1:3500/eth/v1/beacon/pool/bls_to_execution_changes
9. Note that you won't receive a response after sending the POST request.
10. Finally, check the validator for the bounded eth1_withdrawal_address at https://beaconcha.in/.
For more information, visit: https://launchpad.ethereum.org/en/withdrawals
Exit staking (full withdrawal):
If you are looking to exit staking and withdraw your funds, ensure your validator is eligible for withdrawal by setting an ETH1 withdrawal address. Next, you must request a validator exit on your validator, which is operated by stake.fish.
We plan to launch the request exit before the Shanghai merge. Once it is available, you can access your staking dashboard at https://stake.fish/dashboard and request exit/full withdrawal from the validator details page.
Unfortunately, Ledger does not support changing from BLS -> 0x01 withdrawal credential as of now. This is outside of stakefish’s control.
The nano x firmware providing BLS signing capabilities does not mean the Ethereum app has that feature. Think of the firmware as the “lower-level operating system” for the Ledger. In order for Ledger to convert ETH2 BLS withdrawal credential to 0x01 withdrawal credential, the Ledger Ethereum app needs to receive an update (in addition to the firmware update). The GitHub ticket linked below is in the Ledger official Ethereum app repo, and the response on that ticket is from Ledger.
Track this GitHub ticket for updates: https://github.com/LedgerHQ/app-ethereum/issues/416
For more information, check out the Staking Launchpad (Goerli), Prysm Documentation on exiting your validator, How to use staking-deposit-cli to generate SignedBLSToExecutionChange and other useful resources provided in the article.
For additional information and questions regarding Shanghai, Capella, and Ethereum withdrawals visit this FAQ from the Ethereum Foundation.
We’re looking for talented engineers to help us build the future of decentralization. Want to join our team? Apply here.
Know someone who would be a good fit for stakefish? Refer them and we will give you 1 ETH when we hire them.
stakefish is the leading validator for Proof of Stake blockchains. With support for 20+ networks, our mission is to secure and contribute to this exciting new ecosystem while enabling our users to stake confidently.