The Shanghai Upgrade (officially known as “Shapella,” combining the names Shanghai and Capella) was a major Ethereum network upgrade that activated on April 12, 2023 at 22:27 UTC, at epoch 194048. Its most significant feature was enabling staked ETH withdrawals from the Beacon Chain for the first time since the Ethereum 2.0 deposit contract opened in November 2020. Prior to Shanghai, validators who staked 32 ETH to secure the proof-of-stake (PoS) network had no way to withdraw their staked funds or accumulated rewards — the staking was entirely one-directional. The Shanghai upgrade implemented EIP-4895, which introduced a system-level “push” mechanism for processing validator withdrawals without requiring gas, alongside several other Ethereum Improvement Proposals: EIP-3651 (Warm COINBASE), EIP-3855 (PUSH0 instruction), EIP-3860 (Limit and meter initcode), and EIP-6049 (Deprecate SELFDESTRUCT). The Capella portion of the upgrade handled changes to the consensus layer (Beacon Chain), while Shanghai addressed the execution layer. Execution layer upgrades follow Devcon city names (Shanghai was the location of Devcon 2), and consensus layer upgrades follow star names (Capella is the brightest star in the northern constellation of Auriga). This upgrade was a watershed moment for Ethereum’s staking ecosystem because it completed the staking liquidity cycle, removed a major barrier to staking adoption, and validated the long-term viability of Ethereum’s proof-of-stake model by demonstrating that stakers could exit and reclaim their funds.
Origin & History
| Date | Event |
|---|---|
| Dec 2020 | Ethereum 2.0 Beacon Chain launches; staking deposits begin with no withdrawal mechanism |
| Sep 15, 2022 | The Merge transitions Ethereum from proof-of-work to proof-of-stake |
| Oct 2022 | Ethereum developers begin planning the Shanghai upgrade as the next major fork |
| Dec 2022 | EIP-4895 (Beacon Chain push withdrawals) selected as the centerpiece of Shanghai |
| Jan 2023 | Shanghai-Capella devnets and shadow forks begin testing withdrawal functionality |
| Feb 2023 | Sepolia testnet successfully activates the Shanghai-Capella upgrade |
| Mar 15, 2023 | Goerli testnet successfully activates Shapella, confirming readiness for mainnet |
| Apr 12, 2023 | Shanghai-Capella (Shapella) activates on Ethereum mainnet at 22:27 UTC at epoch 194048 |
| Apr-May 2023 | Withdrawal queue processes smoothly; net ETH staking increases despite withdrawal availability; over 4.4 million ETH newly staked post-upgrade |
| 2023-2024 | Staking participation rises from approximately 15% to over 25% of total ETH supply |
How It Works
Withdrawal Mechanism (EIP-4895):
Withdrawals operate as a system-level “push” from the Beacon Chain to the execution layer, with no gas required from the validator.
The withdrawal queue processes a maximum of 16 withdrawals per block (every 12 seconds). The system cycles through all validators automatically, processing partial withdrawals and queuing full exits in order.
Two Types of Withdrawals:
Partial withdrawals (reward sweeps) automatically skim any ETH rewards above the 32 ETH minimum from each active validator, sending the excess to the designated withdrawal address. The validator remains active.
Full withdrawals (validator exits) allow validators to completely exit the protocol. After the exit queue is processed and a cooldown period completes, the entire 32 ETH plus accumulated rewards is returned to the withdrawal address and the validator is deactivated.
Other Shanghai EIPs:
| EIP | Change | Benefit |
|---|---|---|
| EIP-3651 | Warm COINBASE (access drops from 2,600 to 100 gas) | Cheaper for builders and MEV searchers |
| EIP-3855 | Introduces PUSH0 opcode | Reduces gas on contract deployment |
| EIP-3860 | Limits and meters initcode size | Predictable costs for contract deployment |
| EIP-6049 | Signals SELFDESTRUCT deprecation | Prepares developers for future opcode removal |
Before and After Shanghai:
| Feature | Before Shanghai | After Shanghai |
|---|---|---|
| Staked ETH withdrawals | Impossible — ETH locked indefinitely | Enabled — partial and full withdrawals available |
| Staking rewards | Accumulated on Beacon Chain, inaccessible | Auto-swept to withdrawal address when above 32 ETH |
| Validator exit | Could signal exit but funds remained locked | Full exit with ETH returned to designated address |
| Staking risk profile | High — no exit liquidity, indefinite lockup | Reduced — liquid staking cycle completed |
| COINBASE access cost | 2,600 gas (cold) | 100 gas (warm) via EIP-3651 |
In Simple Terms
Unlocking the vault: Imagine depositing money into a savings vault in 2020 and being told you cannot take it out until the vault is upgraded. The Shanghai upgrade was that upgrade — it finally gave Ethereum stakers the key to access their locked ETH and rewards.
Two types of withdrawals: Partial withdrawals automatically skim any ETH rewards above the 32 ETH minimum from each validator, sending the excess to the owner’s wallet. Full withdrawals let validators completely exit, returning their entire 32 ETH plus rewards.
Orderly queue: To prevent chaos, withdrawals are processed in an orderly queue of up to 16 per block (every 12 seconds). The system cycles through all validators, automatically processing partial withdrawals and queuing full exits.
Confidence booster: By proving that stakers could actually get their money back, Shanghai removed the biggest psychological barrier to staking. Counterintuitively, more people started staking after withdrawals were enabled, because the reduced risk made it more attractive.
Gas savings bonus: Beyond withdrawals, Shanghai included technical improvements like PUSH0 and Warm COINBASE that reduce gas costs for smart contract operations, benefiting all Ethereum users and developers.
Real-World Examples
| Scenario | Implementation | Outcome |
|---|---|---|
| Lido stakers accessing rewards | After Shanghai, Lido enabled withdrawals allowing stETH holders to redeem for ETH 1:1 through a withdrawal queue | stETH/ETH peg stabilized near 1:1; Lido’s TVL continued growing significantly |
| Solo validator exiting | A solo staker who deposited 32 ETH in December 2020 initiated a full exit after Shanghai | After the exit queue processed, they received their original 32 ETH plus accumulated rewards |
| Coinbase institutional staking | Coinbase’s cbETH product enabled unstaking post-Shanghai, converting cbETH back to ETH | Institutional confidence in ETH staking increased, contributing to a rise in overall staking participation |
| Smart contract gas optimization | Developers deployed new contracts using the PUSH0 opcode introduced in Shanghai | Average contract deployment costs decreased, with some contracts saving 2-5% on gas usage |
Advantages
| Advantage | Description |
|---|---|
| Staking liquidity | Completed the staking cycle by enabling withdrawals, removing the indefinite lockup risk that deterred many potential stakers |
| Increased staking adoption | Net staking inflows increased as reduced risk attracted new participants; staking rate rose from approximately 15% to 25%+ of ETH supply |
| LST peg stability | Liquid staking tokens (stETH, rETH, cbETH) achieved tighter pegs to ETH as the underlying redemption mechanism became functional |
| Developer improvements | EIP-3855 (PUSH0) and EIP-3651 (Warm COINBASE) reduced gas costs for contract deployment and MEV-related operations |
| Network validation | Successfully executing a complex upgrade with real economic stakes demonstrated Ethereum’s governance and technical maturity |
Disadvantages & Risks
| Risk | Description |
|---|---|
| Withdrawal queue delays | During peak demand, full validator exits face multi-day to multi-week queue times due to the churn limit |
| Centralization pressure | Ease of staking post-Shanghai accelerated liquid staking adoption, increasing Lido’s dominance and raising centralization concerns |
| Credential migration needed | Validators with old 0x00 withdrawal credentials needed to update to 0x01 (execution layer) credentials to receive withdrawals |
| Complexity for solo stakers | Managing withdrawal credentials, understanding partial vs. full withdrawals, and tax implications add operational complexity |
Risk Management Tips:
- Ensure your validator’s withdrawal credentials are updated to 0x01 format pointing to an address you control
- Understand the difference between partial (automatic reward sweep) and full (validator exit) withdrawals before initiating either
- For large unstaking, plan for potential queue delays during high-demand periods
- Consult a tax professional about the treatment of staking rewards received via withdrawals in your jurisdiction
- Consider using established liquid staking protocols for convenience, but be aware of smart contract and centralization risks
FAQ
Q: Did the Shanghai upgrade cause a massive ETH sell-off?
A: No. Despite pre-upgrade fears of a mass exodus, the Shanghai upgrade resulted in net positive staking inflows. Over 4.4 million ETH was newly staked in the weeks following the upgrade, and ETH price remained stable. While some early stakers did withdraw, many more new stakers entered once the withdrawal risk was removed.
Q: How long does it take to withdraw staked ETH after Shanghai?
A: Partial withdrawals (reward skimming) happen automatically as the validator sweep cycles through all validators, typically taking a few days to complete a full cycle. Full validator exits must pass through an exit queue — during normal conditions this takes hours to a few days, but during high-demand periods the churn limit can extend wait times to weeks.
Q: Do I need to do anything to receive partial withdrawals?
A: If your validator has 0x01 withdrawal credentials pointing to an execution layer address, partial withdrawals happen automatically with no action needed. If you still have old 0x00 credentials, you must submit a one-time credential change operation to start receiving automatic reward sweeps.
Q: What are the other EIPs included in Shanghai besides withdrawals?
A: Shanghai included EIP-3651 (reduces the cost of accessing the COINBASE address, benefiting builders and MEV searchers), EIP-3855 (introduces the PUSH0 opcode for cheaper contract deployment), EIP-3860 (limits and meters initcode size), and EIP-6049 (begins deprecating the SELFDESTRUCT opcode).
Q: Is Shapella the same as the Shanghai upgrade?
A: Yes. “Shapella” is the combined name for the simultaneous Shanghai (execution layer) and Capella (consensus layer) upgrades. They were deployed together on April 12, 2023, and are often referred to interchangeably. Shanghai takes its name from Devcon 2’s host city; Capella is named after a star in the Auriga constellation.
Related Terms
Ethereum, Proof of Stake (PoS), The Merge, Beacon Chain, Validator, Staking, Liquid Staking, EIP (Ethereum Improvement Proposal), Lido, Gas, Hard Fork, Dencun Upgrade
Sources
- Ethereum Foundation Blog — “Shapella Mainnet Announcement” (March 28, 2023)
- EIP-4895: Beacon Chain Push Withdrawals as Operations
- Beaconcha.in — Withdrawal Queue Statistics
- Nansen — Post-Shanghai Staking Analytics Report
- Tim Beiko — Ethereum All Core Developers Call Notes
UPay Tip: If you are staking ETH — whether solo or through a liquid staking protocol — make sure your withdrawal credentials are properly configured to a wallet address you securely control. Post-Shanghai, your staking rewards automatically sweep to this address, so keeping it secure is essential to protecting your staking income.
Disclaimer: This content is for educational purposes only and does not constitute financial advice. Always conduct your own research (DYOR) and consult qualified financial advisors before making investment decisions.










