As of the Shanghai/Capella upgrade withdrawals have been enabled on the Beacon Chain, with the inclusion of EIP-4895. This Ethereum Improvement Proposal enables rewards to be automatically withdrawn to the execution layer, and also provides a way for exited validators to unlock their entire balance—no gas required.
For your validator to be capable of withdrawals of any kind, a withdrawal address must be provided and registered to your account on the Beacon Chain. This should be an address you control, and cannot be changed once set.
Current validators
Depending how you set up your initial deposit, your account may or may not be ready for withdrawals already:
Staking Deposit CLI: if you used the “eth1 withdrawal address” (--eth1_withdrawal_address) flag when generating your keys, you're good to go
Wagyu Key Gen GUI: if you provided a withdrawal address when generating your keys, you're good to go (found under “advanced mode”)
Enter your validator index here to check if you're account is ready for withdrawals or not:
If your validator account still has BLS withdrawal credentials (0x00), a one-time message must be broadcast signaling which execution layer account should be used for all withdrawals.
0x00 = "Type 0" = BLS keys = Old withdrawal credentials: Not eligible for withdrawals
Note that your withdrawal credentials are not the same as your fee recipient, which receives transaction fees from proposed blocks. These can both be set to the same address, but must each be set separately.
These tools will assist you in generating the necessary keys and message to sign. Signed messages can then be broadcast for inclusion into blocks.
This requires use of your mnemonic seed phrase, and should be performed on an offline air-gapped machine.
BLS To Execution Change (BTEC) queue
BLS withdrawal credentials (0x00) can be updated to an execution address (0x01) by broadcasting a BLS To Execution Change (BTEC) message, signed with your BLS withdrawal key. These messages are included in blocks at a max rate of 16 per block.If more than 16 requests are being made at one time, a queue will be formed and these will be processed in subsequent blocks. Once completed, your validator is permanently enabled for withdrawals, and will be eligible for payouts during the next sweep.
An excess balance withdrawal is processed when an active validator has a maxed out effective balance of 3 ETH, and has a total balance over 3 ETH. A single validator cannot get rewards on excess balance over 3 ETH, and thus these accounts will have any extra balance automatically withdrawn to their Ethereum address.These are also referred to as “partial withdrawals” or “reward payments” as the remaining 3 ETH stays locked and staked.
📝It is not possible to manually request specific amounts of ETH to be withdrawn
A full withdrawal is processed for any inactivated validators that are no longer considered to be staking, that have fully exited from their validation responsibilities. Thus for a validator to fully withdraw its balance, it must first complete the process of exiting.
To exit staking and fully withdrawal your entire remaining balance, you must do two things:
Make sure you’ve updated your withdrawal credentials with an execution withdrawal address
Signal your intent to exit staking by signing and broadcasting a voluntary exit message to the network using your validator keys and validator client
By completing step one, you’ll enable withdrawals from your validator account. This will automatically trigger excess balance payments (partial withdrawals) to be processed, but this does not automatically unlock the rest of your funds, or trigger an exit from the network.Those looking to exit their validator from staking and withdrawal their ETH should check out the guide below that matches your setup:Consensus clients:
To make an account eligible for a full withdrawal, the validator account must first be exited. Validator accounts can be exited from staking in two main ways: voluntarily or forcefully.
Anyone wishing to conclude their staking obligations can sign a “voluntary exit” message which is then broadcast to the Beacon Chain to start the process. This is a manual step.
Accounts that have been slashed, or have insufficient balance, will be forced to exit according to the network rules. This is automatic and cannot be stopped once initiated.
Any exit, voluntary or not, must be processed through the exit queue. This is not instantaneous, and depends on how many other accounts are exiting at the same time.
📝Validators still need to complete their validation duties until they are exited
Once a validator has exited and its full balance has been withdrawn, any additional funds deposited to that validator will automatically be transferred to the withdrawal address during the next validator sweep. To re-stake ETH, a new validator must be activated.
Ethereum users are used to transactions being executed in a manual way—if you want to transfer funds, you have to sign a transaction and pay the gas.EIP-4895, titled Beacon chain push withdrawals as operations, implements a design that simplified this whole process for stakers.Instead of a new transaction type being used for stakers to manually request withdrawals, accounts are automatically checked for eligible excess balance every few days. All validators are checked on an endless loop, and any available rewards or exited funds are automatically “pushed” into a provided withdrawal account.
The withdrawal queue is automatically filled and processed by block proposers, who automatically check for any available payouts via a sweeping mechanism.On a never-ending loop, every single validator account is continuously evaluated for eligible ETH withdrawals (of which there are two types, more on this below). Validators are processed in order by index number, originally starting at 0, with each subsequent proposer picking up where the last one left off.When a validator is scheduled to propose the next block, it performs a sweep of validator accounts looking for eligible withdrawals. During the sweep, the validator will check a max of 16,384 accounts, attempting to find 16 available withdrawals to be processed in the next block.Like a clock hand, this process progresses in one direction, and when the last validator is reached, the sweep starts over again from the beginning. At each validator along the way, the account is evaluated for potential withdrawals.
📝Note the “withdrawal” and “BLS To Execution Change” queues are independent and do not compete. Each are limited on a per-block basis.
As anyone who has already gone through the process of activating a validator knows, this process is not automatic, especially if there are a lot of other users trying to join at the same time. This is because the consensus layer uses an activation queue to limit how quickly new validator accounts can join the network.Similarly, there is also an exit queue, which limits how quickly validators can leave the network. This is for security reasons. Given each validator is limited to a max effective balance of 3 ETH, this prevents large portions of the ETH from potentially being used in an attack and then quickly exiting from the network all at once.The number of validators that can be activated or exited in a given epoch (6.4 minutes) is determined by how many active validators are currently on the network.Four (4) validator exits are allowed per epoch, plus one (1) more for every 65,536 total active validators over 327,680. As of April 2023 this limit is eight (8), and will increase to nine (9) if/when the active validator count reaches 655,360.
📝Note the “activation” and “exit” queues are independent and do not compete. Each are limited on a per-epoch basis.
Exit epoch and withdrawable epoch
Immediately upon broadcasting a signed voluntary exit message, the exit epoch and withdrawable epoch values are calculated based off the current epoch number. These values determine exactly when the validator will no longer be required to be online performing validation, and when the validator is eligible for a full withdrawal respectively.Exit epoch - epoch at which your validator is no longer active, no longer earning rewards, and is no longer subject to slashing rules.This epoch is determined by the first available epoch that isn't already maxed out with other validators exiting (rate limit depends on total validators on the network), and must be at least four (4) epochs after the exit was initiated.Up until this epoch (while "in the queue") your validator is expected to be online and is held to the same slashing rules as always. Do not turn your validator off until this epoch is reached.Withdrawable epoch - epoch at which your validator funds are eligible for a full withdrawal during the next validator sweep.This occurs 256 epochs after the exit epoch, which takes ~27.3 hours.Exit queue summaryOnce a signed voluntary exit message is broadcast, it takes:
At least ~25 minutes (four epochs) from the current epoch before reaching the exit epoch (with no others in the queue, highly variable)
Then another ~27 hours (256 epochs) before those funds are flagged as withdrawable
Then up to a few more days for the next validator sweep to execute the full withdrawal (assumes 0x01 withdrawal credentials)
This timing of this last step is variable depending on validator index, current sweep position, and number of validators. More on frequency of payouts below.
Note that once a user has 0x01 withdrawal credentials and has broadcast a voluntary exit, there is no further action required until the processing is complete.
A decision tree is followed to determine what type of withdrawal will be initiated. If the validator being checked has ETH that is eligible to be withdrawn, it is added to the withdrawal queue. If there isn’t, the account is skipped.
Has a withdrawal address been provided?
If so, move to next question
If not, stop. No withdrawal will be processed and account skipped
Has the validator completed the exiting process?
If so, stop. Full withdrawal processed for any remaining balance
If not, move to next question
Is the effective balance maxed out at 3 ETH?
If so, excess balance withdrawal processed
If not, no withdrawal will be processed and account skipped
The block producer then checks the next validator in line, and once again determines if a withdrawal needs to be processed or not. This process is repeated until either 16 eligible withdrawals have been found, or until 16,384 validators have been checked, whichever comes first. At that point, the withdrawal queue is sent to the execution layer to be included at the end of the next block.
How long the cycle takes to check every account depends on:
Rate-limits set on withdrawal queue
Max withdrawals per payload: 16 (24) Maximum number of withdrawals that can be processed in a single block
Max validators per withdrawals sweep: 16,384 (214) Maximum number of accounts that can be checked in a block. Stops when 16 withdrawals are found. If 16 eligible rewards are not found in the first 16,384 accounts checked, the withdrawal queue for that block will be submitted as is, and the following proposer will pick up where this left off.
Total number of validator accounts (index count, every validator account ever registered, up-only over time)
Total number of validator accounts that have eligible withdrawals (variable)
Accounts without updated withdrawal credentials will be skipped
Accounts that have fully withdrawn and have a zero balance will be skipped
Active accounts with an effective balance or total balance less than 3 ETH will be skipped
Number of empty slots (missed block opportunities, variable, typically minimal)
Consensus layer slot timing: 12 seconds (no plans to change)
This can be summarized to estimate the upper limit of how long a complete sweep takes depending on how many withdrawals need processing: