Future Shanghai and Capella updates to the Ethereum blockchain will allow validators to withdraw ETH locked in the Beacon Chain or rewards earned through staking. How will these withdrawals work? How long will it take? All the answers in this article
The arrival of Shanghai and Capella
The transition from the Ethereum blockchain (ETH) to Ethereum 2.0 started in December 2020 when the Beacoin Chain and Ether (ETH) staking functionality was launched. Since then, in September 2022, the network reached a major milestone with The Merge.
This update saw the abandonment of Proof of Work (PoW) and the start of block validation through the Beacon Chain’s Proof of Stake (PoS) consensus. However, the ETH rewards awarded to validators since December 2020 are locked in a layer called the Consensus Layer (CL) and are therefore inaccessible.
Since The Merge, stakers also receive transaction fee rewards when their validators offer blocks. These are sent to an address on the Execution Layer (EL) and are also blocked.
However, these situations will change very soon with the Shanghai and Capella updates. The former will allow withdrawals of ETHs stored on the Beacon Chain and the latter will allow access to rewards blocked on the Execution Layer. These major updates are expected to take place in March 2023.
At the time of writing, there are approximately 513,530 nodes contributing to the security of the Ethereum blockchain, with a locked amount of 16,432,807 ETH.
How Ethereum withdrawals work
Two types of withdrawals
Following the Shanghai update, a first withdrawal feature will be available for validators: “Unstaking”. Concretely, the current balance of the validator (32 ETH + rewards) is burned on the Consensus Layer and immediately mint on the address called “Credential”, directly on the Executive Layer.
The second withdrawal functionality will be made possible after the Capella update: “Skimming”. The subtlety is that only the excess Ether on the validator balance (the amount above 32 ETH) is burned on the Consensus Layer and created on the Executive Layer.
In other words, it is important to have this Credential address to retrieve the ETH locked into the Beacon Chain as well as the rewards generated through staking. This address is defined and associated with the validation key generated when the 32 ETH are deposited for the creation of the validator node.
How to unstake your ETH?
To do this, your Credential address must be in the format “0x01”. If this is not the case (i.e. in a “0x00” format), here is the line of code to be filled in and sent to the Consensus Layer:
Finally, if a staker wants to unlock its position (i.e. the 32 ETH as well as any rewards), then it will be possible to sign a voluntary exit message using the validation key obtained during the creation of the validator node and broadcast it to the Consensus Layer to be processed:
As soon as the validator output message is received, it joins the output queue. Note, however, that a validator in the output queue continues to propose and validate blocks. As a result, it continues to earn rewards.
How long is the waiting time?
The length of the exit queue for Ethereum validators is difficult to estimate. This is because it is dynamic and relies on several variables, including:
- the total number of validators;
- the minimum churn limit, set at 4;
- and a churn limit quotient, set at 2^16 (i.e. 65,536).
These variables are then used to calculate the termination limit, i.e. the number of validators that can leave their positions at each Epoch. Note that an Epoch in the Ethereum blockchain is a period of time that lasts about 6.4 minutes and corresponds to 32 blocks.
Thus, the number of validators that can exit the queue every 6.4 minutes is calculated as follows: the total number of validators divided by the quotient of the termination limit, rounded to the nearest integer. Note that the minimum for this termination limit is 4:
For your information, once the validator is out of the queue, it will still have to wait for a withdrawal period. This is 256 Epochs (about 27 hours) or 8,192 Epochs (about 36 days) if the node has been slashed.
From these elements and variables, it is therefore possible to estimate a withdrawal period of the ETH from the staking.
As shown in the figure above, it would take about 80 days if 25% of validators wanted to withdraw simultaneously and about 35 days if only 10% wanted to close their validator node. In concrete terms, everything will depend on the number of people wishing to keep or withdraw their Ethers from the staking.
Of course, there is a possibility that validators decide to withdraw only their profits and keep their node. In this case, these are partial withdrawals and will be limited to 256 per Epoch. This means that a total of 57,600 partial withdrawals can be processed each day.
So note that if all 500,000 current validators wanted to partially withdraw, it would take about 8.7 days.