How Ethereum staking withdrawals will work

How Ethereum staking withdrawals will work

Ethereum staking is live since December 2020 with the launch of the Beacon Chain. Two important upgrades have been planned to add Proof of Stake support in the protocol:

  1. The Merge (Sep 15th 2022 ✅): Ethereum blocks are now validated by the PoS consensus on the Beacon Chain.
  2. Shanghai (Execution) / Capella (Consensus) (~March 2023): focused on withdrawals of stake position and validator rewards.

Since the beginning of the Beacon Chain, validators earn rewards every epoch (6.4 minutes) on the Consensus Layer (CL) by attesting the current state of the chain and earning extra rewards when proposing a block or being selected in a validator sync committee. Currently, those rewards are locked on the validator balance on CL and cannot be withdrawn.

Since the Merge, stakers can receive liquid rewards when their validator proposes a block, the rewards coming from transaction fees and MEV are sent to an Execution Layer (EL) address set by the validator called the Fee Recipient.

How will Ethereum withdrawals work?

When a staker deposits 32 ETH to a validator via the official Staking Contract, a withdrawal credential is set and associated to the validation key. This credential can either be:

  1. 0x00 credential: a BLS key
  2. 0x01 credential: an Execution Layer (EL) address

After the Shanghai upgrade, for a validator to be withdrawable, it must have a 0x01 credential. To change from 0x00 to 0x01, the BLS credential can sign a message and broadcast it to the CL:

# Message to set 0x01 credential for a validator
class BLSToExecutionChange(Container):
    validator_index: ValidatorIndex
    from_bls_pubkey: BLSPubkey
    to_execution_address: ExecutionAddress

See specs

Note that for Kiln customers, only 0x01 credentials are used and this step is therefore not needed.

Exiting a validator

If a staker wants to unstake their position (i.e 32 ETH + rewards on the validator balance), it is possible to sign a Voluntary Exit message using the validation key of the validator and broadcast it to the CL to be processed.

# Message to set 0x01 credential for a validator
class BLSToExecutionChange(Container):
    validator_index: ValidatorIndex
    from_bls_pubkey: BLSPubkey
    to_execution_address: ExecutionAddress

Once the validator exit message is processed, it joins the Exit Queue. A validator in the Exit Queue is still attesting and proposing blocks and therefore earning rewards.

The Exit Queue processes at least 4 exits per epoch (every 6.4 minutes). The validator is then considered as exited and won’t attest or propose anymore.

Projections of Exit Queue efficiency. Note, there are currently just under 500k live validators on Mainnet.

Note that this exit process only involves the CL credential (validation key) of the validator and cannot be triggered by the EL credential (withdrawal credentials).

Withdrawal processing

After the Capella upgrade, the CL will process 16 validators per block (every 12 seconds) by their index number order (1,2,3,…) if they are withdrawable (ie if they have 0x01 credentials). When a validator is processed, 2 types of withdrawals are possible:

  1. UNSTAKING: if validator is exited and withdrawable: the current balance of the validator (32 ETH + rewards) is burnt on the CL and minted to the withdrawal credentials address on the EL. The validator remains active.
  2. SKIMMING: if validator is not exited and withdrawable: all the available ETH on the validator balance above 32 ETH is burnt on the CL and minted to the withdrawal credentials address on the EL.

Considering just under 500,000 validators are active on the network with only 0x01 credentials, it will take about 4 days to process all the validators of the network. This means that the EL withdrawal_credential address of a validator will receive liquid rewards roughly every 4 days (as a one-off it is UNSTAKING, and regularly if it is SKIMMING).

What’s next?

The Capella / Shanghai upgrade is currently being tested by Ethereum clients developers in different shadow forks. A first temporary testnet called Shandong has also been released.

We can expect seeing this upgrade live on Goerli and Sepolia networks in the first half of Q1 2023 before the Mainnet in March (current expected date).

Discussions are also on-going to propose a dual-key exit model, where an EL credential of the validator could trigger the exit of its validator with a transaction on the EL.
See the lido proposal.

How is Kiln preparing for withdrawals?

Rewards reporting

Kiln provides Rewards API on Ethereum to help its customers track the different types of rewards earned on the CL and EL by their validators. Customers will be able to differentiate skimming, block proposals and unstaking rewards for out of the box reporting of all their staking positions.

Simple unstaking

Kiln customers will be able to unstake one or many validators in a few clicks on Kiln Dashboard or programmatically with one line using Kiln Connect SDK. Customers will be able to query the latest state of their validators as they go through the full exit flow programmatically or via the dashboard.

Thanks @pwnh4

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.

Get in touch to discover our suite of staking products


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