How long will the Exit Queue take after Ethereum’s Shanghai upgrade?

How long will the Exit Queue take after Ethereum’s Shanghai upgrade?

Today on April 12, at 10:27 pm UTC, epoch 194048, the Shanghai upgrade is expected to take place.

This means that for the first time stakers will be able to exit their validators and obtain their staked collateral (32 ETH per validator).

These exits will be subject to an Exit Queue however. In this article we go through what this Exit Queue is, why it exists, and what kinds of delays are to be expected.

Validator Lifecycle

Ethereum validators can be seen as locked ETH, and as a state.

  • Locked ETH (32 ETH) is used as collateral for the validator’s actions, and can be impacted if the validator performs badly / maliciously
  • Validator State represents the current state of the validator, which changes during the validator’s lifetime

When a validator is funded, 32 ETH are locked and the status of the validator is modified:

  • pending_initialized: the validator is funded and is waiting to be processed by the consensus layer to join the activation queue
  • pending_queued: the validator is in the activation queue
  • active_ongoing: the validator is active and performing duties

In order to unstake the validator, and retrieve the locked 32 ETH, validators must indicate to the consensus layer that they want to retire.

To do this, the validation private key of the validator must sign a VoluntaryExit message and broadcast it to the Ethereum Consensus Layer.

The validator then joins the Ethereum Exit Queue, and its state is set to active_exiting.

How does the Exit Queue work?

During the Exit Queue, a validator can be in 2 states:

  1. active_exiting: the validator is still receiving consensus work, and is still earning rewards / penalties while waiting to be exited
  2. slashed: slashed validators are automatically exited, they join the Exit Queue and have an extra delay, during which they are considered inactive (and therefore receive penalties)

The time it takes to get through the Exit Queue varies depending on the number of active validators in the network. Only a certain amount of validators can be exited per epoch (32 slots, ~6.4 minutes), we call this number the churn limit and it can be computed as follow:

churn_limit = active_validators_count / churn_limit_quotient where:

  • active_validators_count is the number of active validators on the network
  • churn_limit_quotient is the validators count that must be reached to increase churn_limit value by 1, its value is 2^16

At the time of this article, there are 562,792 validators, so only 562,792 / 2**16 = 8.57 i.e. ~8 validators can exit every epoch (6.4 minutes).

Kiln made a public spreadsheet to visualize the different Exit Queue scenarios. Feel free to fork it and use it for your own analysis!

Looking at the current network conditions (562,792 active validators), this would be the exit queue’s estimated timelines if a validator joins after X validators are exiting:

A couple interesting scenarios:

  • If Lido (177,357 validators) has 10% of its validators exit, the Exit Queue delay would be ~10 days
  • If Coinbase (73,245 validators) has 10% of its validators exit, the Exit Queue delay would be ~4 days
  • If 10% of all validators on the network exit at once, the Exit Queue delay would be ~31 days
  • In the extreme scenario where all validators of the network exit, it would take ~313 days to process up to the last validator that joined the Exit Queue.

Note that the Activation Queue works in a similar way to what we see in the Exit Queue.

The Exit and Activation Queues serve a critical role in maintaining the security of the Ethereum Consensus Layer by regulating the flow of locked ETH entering and leaving it through a churn limit mechanism. By controlling the volumes going in and out of the consensus, these queues help maintain the health and integrity of the Ethereum protocol.

After the Exit Queue

Once a validator has finished the Exit Queue, it is set as withdrawable. From here, 16 validators with 0x01 withdrawal credentials are withdrawn every block (~12 seconds). Once withdrawn, the validator balance is burnt on the consensus side and minted on the withdrawal_credentials of the validator. For more details on the Ethereum withdrawal mechanisms, read our “How Ethereum staking withdrawals will work” blog post.

About Kiln

Kiln is the leading enterprise-grade staking platform, enabling institutional customers to stake assets, and to whitelabel staking functionality into their offering. Our platform is API-first and enables fully automated validators, rewards, and data and commission management. With over $2.2b stake under management, Kiln has a particularly strong track record on Ethereum as we run about 3% of the network; this includes 22,000+ validators with 0 slashing events.

Want to stake your ETH? Contact our sales team

Thanks @pwnh4 for writing this article!

Subscribe to our Newsletter
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.