The Shanghai upgrade was a planned change to the Ethereum network that went live on 12 April 2023. Its central feature was enabling withdrawals of ether that had been staked to secure the network. From the launch of Ethereum's proof-of-stake Beacon Chain in December 2020, people had been able to deposit ether to become validators, but they could not take it out again. Shanghai, together with a matching upgrade to the consensus layer called Capella, removed that restriction.
Because the two upgrades activated together, they are often called "Shapella". Ethereum names its execution-layer upgrades after cities that have hosted its developer conference and its consensus-layer upgrades after stars. Shapella followed the Merge of September 2022, which switched Ethereum from proof of work to proof of stake, and preceded the Dencun upgrade of March 2024.
The Shanghai upgrade in plain terms
Imagine a savings scheme that asked people to lock money in a vault to help guard the town, paying them interest for doing so, but with a sign on the door saying "withdrawals coming later". Many people joined anyway, trusting that the door would eventually open. Shanghai was the day the door opened.
People could now collect the interest they had earned and, if they wanted, take out their original deposit. To stop everyone rushing out at once, the scheme let only a limited number leave each day, so that the town was never left unguarded.
What changed
The upgrade bundled several Ethereum Improvement Proposals. The most important was EIP-4895, which allowed the consensus layer to push withdrawals into ordinary Ethereum accounts automatically, without users sending a transaction. Smaller changes included:
- EIP-3651. Lowered the gas cost for transactions that access the block producer's address, helping block builders.
- EIP-3855. Added a PUSH0 instruction to the Ethereum Virtual Machine, slightly reducing contract sizes and costs.
- EIP-3860. Limited and priced the size of code used when creating contracts, making costs more predictable.
Withdrawals had been left out of the Merge on purpose, so that the switch to proof of stake could be kept as simple as possible. Developers then prepared Shanghai over several months, running it first on short-lived developer networks and then on the public test networks Sepolia and Goerli in February and March 2023. Client teams, staking providers and exchanges used those rehearsals to check their own systems before the date for the main network was fixed by an epoch number on the Beacon Chain.
How withdrawals work
After Shapella, validators can receive two kinds of withdrawal:
- Partial withdrawals. Any balance above the 32 ether a validator needs to stay active is swept automatically, so rewards flow out regularly without the validator stopping.
- Full withdrawals. A validator that chooses to exit stops its duties and, after waiting its turn, receives its whole balance.
Withdrawals only reach validators whose deposits point to an Ethereum address, so some early stakers first had to update their withdrawal credentials. The network caps how many validators can enter or leave in each period, the "churn limit", so large waves of exits form a queue rather than leaving the network suddenly short of validators. The process is described in the Ethereum Foundation's staking documentation.
Effects on staking and markets
Before the upgrade, some analysts expected a wave of selling as stakers who had been locked in for over two years cashed out. In practice, there was an exit queue in the first weeks, partly because the exchange Kraken had agreed with the US SEC in February 2023 to close its US staking service and because some bankrupt crypto lenders were unwinding positions, but deposits soon outpaced withdrawals. Being able to leave made staking less risky, and the amount of staked ether grew strongly in the following year.
The upgrade also changed the liquid staking market. Providers such as Lido, whose staked-ether tokens had traded below the price of ether during 2022 partly because they could not be redeemed, could now offer direct redemptions, which helped keep their tokens closer to their underlying value. Centralised exchanges also began to process staking withdrawals, and restaking protocols built on top of withdrawable stake grew rapidly afterwards.
Significance and criticism
Shapella completed the basic proof-of-stake system planned for Ethereum, closing a period in which staked ether was an open-ended commitment. Supporters saw it as an important step for institutional participation, since many funds could not lock money with no exit date. Critics noted that the upgrade did little for transaction fees or capacity, which were left to later work on rollups and data blobs, and that the concentration of stake in a few large providers remained a concern after withdrawals opened. The upgrade passed without major technical problems after extensive testing on test networks.