February 23, 2023|Research

A Primer on the Shanghai Fork (ETH Withdrawals)

cumberland

The Ethereum Beacon Chain handles the consensus of the network, and the consensus of the network relies on the participation of validators. In order to become a validator, one must lock a minimum of 32 Ether. And currently, validators can deposit and lock their ETH but cannot withdraw. The Shanghai fork (estimated for March 2023) will give individuals the ability to stop running their validators, exit the network and unlock their 32 Ether and any earned rewards.

ETH Staking

Post the Merge, ETH runs two layers: Consensus Layer (CL) and Execution Layer (EL). The Execution Layer inherits most of the functionalities from the old Proof of Work (PoW) chain, including verifying and settling transactions and executing smart contracts. The new Consensus Layer, built on top of the Beacon Chain, is for reaching consensus among a group of validators. The block generation frequency for Ethereum is 12 seconds (“slot”) and an “epoch” consists of 32 slots, lasting a total of 6.4 minutes. At the start of every epoch, a group of validators (committee) is randomly selected to propose and verify blocks. For every slot in an epoch, a random validator from the committee is selected to propose a block and the rest of the committee verifies the newly proposed block. The same committee carries on this task throughout the epoch and a new committee will be selected for the next epoch every time.

Fig.1 Consensus Layer and Execution Layer Fig.1 Consensus Layer and Execution Layer

Fig.2 Beacon Chain slot visualizer https://beaconcha.in/charts/slotviz Fig.2 Beacon Chain slot visualizer https://beaconcha.in/charts/slotviz

In order to become a validator, one needs to lock 32 ETH into the Consensus Layer, which signals its intention to the rest of the network to become a validator and thus eligible for selection to a committee. The existing method to activate a validator is through a Beacon Deposit contract deployed at https://etherscan.io/address/0x00000000219ab540356cbb839cbe05303d7705fa. Once ETH is deposited, the Consensus Layer can pick up the information and verify that the new validators are ready to go. However, currently the ETH locked in this contract is indefinitely locked since there is no function implemented in this contract for withdrawals.

ETH Withdrawals

When validators start proposing and verifying blocks, they earn staking rewards on top of the 32 ETH they originally staked.

Fig.3 Validators ETH stakes in Consensus Layer Fig.3 Validators ETH stakes in Consensus Layer

The Shanghai fork will treat each withdrawal differently based on whether it is a partial (withdrawing only staking rewards or anything above 32 ETH) or full withdrawal (withdrawing everything including the 32 ETH).

Partial withdrawals

After a partial withdrawal, any earned rewards (balances in excess of 32 ETH) are withdrawn to an Ethereum address specified by the validator and can be spent immediately. The validator will continue to be a part of the Beacon Chain and validate as expected. For partial withdrawals, the maximum capacity is 16 withdrawals per slot (12 seconds). Currently there are around 510k validators, meaning that it would take 4.3 days for every validator to have triggered a partial withdrawal.

Full withdrawals

After triggering a full withdrawal/exit manually, the validator effectively signals an exit from the validator set and enters an exit queue. This process is irreversible and the validator will continue being part of the Beacon Chain until the exit is done. The validator’s entire balance (32 ETH principal and any rewards) is then unlocked and can be spent after the exit and withdrawal mechanism is complete. The full withdrawals are processed with much lower capacity to maintain network stability.

Table.1 shows the maximum number of full withdrawals that can happen every epoch (6.4 minutes), given different numbers of total validators in the network. For reference, the current number of active validators is about 520k, which means the number of full withdrawals per epoch is 7, and maximum number of validators exit is around 1575 per day. When the number of validators decrease, the exits also slow down, with the maximum exits per epoch reaching 4 if validators drop below 327,680.

Table.1 Validator limits and exit capacity per epoch

Validators LimitExits Epoc
3275804
3932165
4587526
5242887

This table summarizes the information for full withdrawals given the current network state.

Table.2 Withdrawal capacity given current Ethereum network state

Max Validators exist per epoch7
Time per epoch (m)6.4
Slot time (s)12
Number of epochs per day225
Max Validators exit per day1575

In Table 3, we highlight the validator count threshold that dictate the maximum validator exits per epoch. Assuming the maximum number of 7 exits per epoch takes place, it would take at least 40 days to go from the current count of 523,869 to the next threshold of 458,732. Further exiting would decrease the maximum validators exit limit, thus slowing down the exit speed. For every validator to have exited, it would take at least 40+48+58+364 > 500 days. Fig. 4 and 5 show the time series of maximum possible validators exit. Technically it takes a month to exit 10% of the current total number of validators and for 50% validators to exit, it requires at least 200 days.

Table.3 Total number of days for validators exits w.r.t. validators limit

From (validators count)ToDays
523,869458,75240
393,216327,68048
393,216327,68058
327,6800364

Fig.4 Maximum number of validators exits / days post Shanghai Fig.4 Maximum number of validators exits / days post Shanghai

Fig.5 Maximum percentage of validators exits / days post Shanghai

Fig.5 Maximum percentage of validators exits / days post Shanghai

A validator’s exit could also be translated into ETH terms: assuming an ETH price of $1600, the maximum exited ETH amount per day is around 50k with notional around $80 million.

Fig.6 Maximum dollar notional of exited ETH / days post Shanghai Fig.6 Maximum dollar notional of exited ETH / days post Shanghai

To track the current validators in the network and monitor the exit/withdrawal status, one can use some tools such as Beacon Chain validators dashboard https://beaconcha.in/validators. Better tools are expected to be developed to better visualize the withdrawals and exit status.

Potential market impact

There are differing opinions on how enabling withdrawal could move the market. On the one hand, it could potentially increase supply of ETH due to the unlocks of ~$26B staked ETH. On the other hand, being able to withdraw quickly would encourage people to stake more and thus reducing supply. The former would put downward pressure on price, while the latter does the opposite.

Although it is not easy to predict the exact direction of the price move due to this fork, it can be argued that the former case with greatly increased ETH supply would not happen to a larger extent due to the following factors:

  1. It takes time for a large number of validators to exit, thus lowering the short-term impact on the market (as shown in Fig. 4 and 5)
  2. When the number of validators decreases, the staking rewards increase, which could attract new validators to fill in the gap, causing buying pressure and reducing the impact of validators exit
  3. Although it would release ~1m ETH for partial withdrawals immediately post-Shanghai fork, the impact of the 1m ETH would still take at least 27 hours to realize, assuming 100% of them will be sold. The current daily volume for ETH is $8B, and releasing $1B liquidity over several days period of time perhaps only accounts for less than 5% of average daily volume, which would cause only limited impact.

Therefore, it is unlikely that enabling withdrawals would cause big short-term market impact due to unlocked liquidity, far less likely for long-term. In fact, there are other drivers that might even increase the staking demand and thus remove supply from the market after the Shanghai fork.

  1. Currently the staking ratio of ETH (14%) is much lower than other PoS chains such as Cardano (72%), Cosmos (62%) and Solana (70%).
  2. Having the ability to withdraw would encourage more people to stake ETH, and if using other PoS chains as a benchmark, Ethereum has a large room for increasing its staking ratio. Even when the staking ratio reaches 30%, that would remove 25B supply from the market.

Nevertheless, given the ETH staking reward is relatively low compared to other chains, though mostly due to tokenomics difference, when staking ratio increases, the yield comes down and people might be discouraged to further push the staking ratio higher. Therefore, an increase of 5-10% staking ratio is still deemed reasonable.

Another effect is that withdrawals would influence the borrow/lend market as well as futures trading. Once withdrawals are enabled, staking becomes a very similar alternative to lending out ETH and earning interest on borrow/lend platforms. Therefore, if the lending interest rate is low, people might be less incentivized to lend their ETH, rather than stake them. In the end, it might also make the borrow rate higher and approaching a level after accounting for slightly better liquidity situation compared to staking due to minimum withdrawal delays. For example, the current lending rate of 1% on Aave for ETH might seem a bit low once the liquidity premium can be reduced post-Shanghai fork.

In the futures market, another phenomenon may manifest. Once the basis for ETH delivery futures is above 0, one can effectively buy spot and stake, and at the same time enter a short futures position to hedge delta. By doing so, one can capture the staking yield + basis at the same time, which would cast doubts on whether a futures basis that makes this yield much higher than, e.g., USD borrow cost, would exist post-Shanghai once this trade becomes relatively attractive and easier to execute.

In summary, the selling pressure due to ETH unlocks post-Shanghai fork is not as exaggerated as some voices have indicated, while achieving higher staking ratio is a more likely scenario after this fork. However, it will be advisable to monitor the exit queue closely post-Shanghai fork to track if there is an indication of validator exit spikes, which might cause market unrest.

Shanghai Fork Development Progress

Currently the Shanghai fork is in the final stage of release, with target date in March 2023. Major development work has been done. To prioritize withdrawal, the ETH devs also pushed back the implementation of some other EIPs that are not directly relevant or would cause delay to the Shanghai fork.

Testnet

One of the most important things to keep an eye on for any major release on Mainnet is the corresponding Testnet. Historically Testnets were usually launched several weeks to months before the Mainnet launch. The first public Testnet - Zhejiang Testnet – has been launched on the 1st of Feb at 15:00 UTC 2023 and implements all the final Shanghai EIPs – resources are https://zhejiang.beaconcha.in/ and https://notes.ethereum.org/@launchpad/zhejiang. Sepolia, the next testnet, will be live on 28th Feb. For those who run validators, please follow this announcement https://blog.ethereum.org/2023/02/21/sepolia-shapella-announcement . After Sepolia is successfully tested, Goerli would be the next testnet. Given the level of complexity of this fork, minimum one month of testing on Testnet should be sufficient to meet the deadline of March 2023 (or at the latest early-mid April) for Mainnet.

In addition, the community will be following the announcements from Ethereum Foundation (EF) regarding the release time. Since the Merge, EF has been organizing community calls from time to time before major releases. These community calls are much less technical compared to the core dev meetings and more information can be found at https://github.com/ethereum/pm/issues.

For more information about Shanghai fork withdrawal mechanisms, please refer to the official FAQ published by the Ethereum Foundation at https://notes.ethereum.org/@launchpad/withdrawals-faq.

References and Resources

Beacon Chain explorer: https://beaconcha.in

Zhejiang Testnet explorer: https://zhejiang.beaconcha.in/

Zhejiang Testnet instructions: https://notes.ethereum.org/@launchpad/zhejiang

Beacon Chain deposit contract: https://etherscan.io/address/0x00000000219ab540356cbb839cbe05303d7705fa

Ethereum Foundation meetings: https://github.com/ethereum/pm/issues

Shanghai fork FAQ: https://notes.ethereum.org/@launchpad/withdrawals-faq

"The information (“Information”) provided by Cumberland DRW LLC and its affiliated or related companies (collectively, “Cumberland”), either in this document or otherwise, is for informational purposes only and is provided without charge. Cumberland is a principal trading firm; it is not and does not act as a fiduciary or adviser, or in any similar capacity, in providing the Information, and the Information may not be relied upon as investment, financial, legal, tax, regulatory, or any other type of advice. The Information has not been prepared or tailored to address, and may not be suitable or appropriate for the particular financial needs, circumstances, or requirements of any person, and it should not be the basis for making any investment or transaction decision. THE INFORMATION IS NOT A RECOMMENDATION TO ENGAGE IN ANY TRANSACTION. \n\nIf any person elects to enter into transactions with Cumberland, whether as a result of the Information or otherwise, Cumberland will enter into such transactions as principal only and will act solely in its own best interests, which may be adverse to the interests of such person. Before entering into any such transaction, you should conduct your own research and obtain your own advice as to whether the transaction is appropriate for your specific circumstances. In addition, any person wishing to enter into transactions with Cumberland must satisfy Cumberland’s eligibility requirements. Cumberland may be subject to certain conflicts of interest in connection with the provision of the Information. For example, Cumberland may, but does not necessarily, hold or control positions in the cryptoasset(s) discussed in the Information, and transactions entered into by Cumberland could affect the relevant markets in ways that are adverse to a counterparty of Cumberland. Cumberland may engage in transactions in a manner inconsistent with the views expressed in the Information. \n\nCumberland makes no representations or warranties (express or implied) regarding, nor shall it have any responsibility or liability for the accuracy, adequacy, timeliness, or completeness of, the Information, and no representation is made or is to be implied that the Information will remain unchanged. Cumberland undertakes no duty to amend, correct, update, or otherwise supplement the Information. \n\nThe virtual currency industry is subject to a range of risks, including but not limited to: price volatility, limited liquidity, limited and incomplete information regarding certain instruments, products, or cryptoassets, and a still emerging and evolving regulatory environment. The past performance of any instruments, products, or cryptoassets addressed in the Information is not a guide to future performance, nor is it a reliable indicator of future results or performance. Investing in virtual currencies involves significant risks and is not appropriate for many investors, including those without significant investment experience and capacity to assume significant risks. \n\nCumberland SG Pte. Ltd. is exempted by the Monetary Authority of Singapore (“MAS”) from holding a license to provide digital payment token (“DPT”) services. Please note that you may not be able to recover all the money or DPTs you paid to a DPT service provider if the DPT service provider’s business fails. You should not transact in a DPT if you are not familiar with the DPT. This includes how the DPT is created, and how the DPT you intend to transact is transferred or held by your DPT service provider. You should be aware that the value of DPTs may fluctuate greatly. You should buy DPTs only if you are prepared to accept the risk of losing all of the money you put into such tokens. You should be aware that your DPT service provider, as part of its licence to provide DPT services, may offer services related to DPTs which are promoted as having a stable value, commonly known as “stablecoin.”"
Back to research