Scalability has been Ethereum’s goal for a very long time now. From the launch of Ethereum’s Beacon Chain in 2020 to the successful implementation of The Merge in Q3 2022, it was all geared toward that one goal — scalability.
While all of these Ethereum upgrades were extremely important to the network, the recent Shanghai upgrade (EIP-4895) just takes things to another level.
But what is the Shanghai upgrade? What did it bring to Ethereum? And how does it affect the network and all of its users?
In this blog post, we will explain what the Shanghai upgrade and EIP-4895 are, the chain of events and upgrades that led to Shanghai, and what it means for the Ethereum network and its users.
Let’s dive in.
What is the Ethereum Shanghai upgrade?
The Shanghai upgrade (EIP-4895) is an Ethereum hard fork — a backward incompatible upgrade. It implemented new network rules that enable staked ETH withdrawals. ETH stakers can now unlock and withdraw their ETH for the first time since staking began in December 2020. The upgrade went live on April 13, at 22:42 UTC.
While Ethereum Improvement Proposal-4895 (EIP-4895) was the most awaited user-facing upgrade, the network also published other EIPs to reduce gas costs for Ethereum developers and block builders.
The Shanghai upgrade is also referred to as Shapella. Ethereum developers coined this term by combining the names of two major updates that make up this upgrade — Shanghai and Capella.
We’ll dive into the reason for the name-play here and why it matters and also briefly look into the other EIPs that went live with the Shanghai hard fork. But first, a little bit of history on why the Shanghai upgrade is so important.
Events that led to the Shanghai upgrade
The Shanghai upgrade isn’t a standalone upgrade. It was made possible through a series of upgrades that the Ethereum network went through over the last three years.
There were two eventual goals:
- Transition Ethereum from proof-of-work (PoW) consensus to proof-of-stake.
- Make Ethereum more scalable.
The Ethereum Foundation and its core developers had been working on Ethereum’s PoS transition and scalability for a long time.
However, the first user-facing upgrade in the effort toward these goals was the launch of the Beacon Chain. It was a separate chain that launched alongside Ethereum to implement and test the proof-of-stake (PoS) consensus before PoS went live on the mainnet.
The Beacon Chain went live nearly two and a half years ago, on December 1, 2020. As it used the PoS consensus, Ethereum users could start staking their ETH on it to act as validator nodes (replacements for miners) and earn rewards.
Then, in September 2022, Ethereum went through a major upgrade called The Merge. As the name suggests, this upgrade merged the Beacon Chain and the Ethereum Mainnet into one, bringing together the execution and the consensus layers (more on this in the next part).
This marked the transition of Ethereum Mainnet from PoW to PoS.
But the Beacon Chain and the post-merge Ethereum PoS chain had one major drawback for users: staking ETH to become a validator was a one-way route. There was no certainty as to when ETH stakers would have the option to unstake and withdraw their staked coins or earned rewards.
The Shapella or the Shanghai upgrade going live resolves that challenge and enables unstaking and withdrawals of ETH. It is the last major upgrade that completes Ethereum’s transition to PoS.
Now, let’s dive a little deeper into EIP-4895.
How are Shanghai and Capella upgrades related?
The Ethereum network has two layers: the execution layer and the consensus layer.
The execution layer is where the transactions get processed and shared with the whole network.
The consensus layer is the one that runs the PoS consensus, finalizes transactions, and adds them to the blockchain.
Up until now, all upgrades to the Ethereum network either happened on the consensus layer or the execution layer.
The Shanghai/Capella upgrade was the first Ethereum upgrade that happened simultaneously across both layers. Shanghai was the upgrade to the execution layer while Capella was the upgrade to the consensus layer.
Why did both layers need a simultaneous upgrade though?
Well, because the staked ETH is held on the consensus layer of Ethereum. But crypto wallet addresses that hold ETH are on the execution layer.
Hence, enabling withdrawals of staked ETH to users’ wallets would mean moving the ETH from the consensus layer to the execution layer.
To make this transition of ETH between the two layers, both layers needed an upgrade. That’s why Ethereum developers had to simultaneously implement upgrades to both execution and consensus layers to enable seamless withdrawals of staked ETH.
How do staked ETH withdrawals work?
Ethereum has opened doors for two kinds of staked ETH withdrawals:
1. Partial withdrawal: This entails a validator only withdrawing the rewards they have accrued since they staked their ETH, while leaving the principal ETH amount staked in the consensus layer.
2. Full withdrawal: This entails a validator exiting their position and withdrawing their staked ETH as well as their earned rewards.
To execute either of the two types of withdrawals, validators must first update their withdrawal credentials from the older 0x00-type to the 0x01-type. However, if a validator doesn’t want to withdraw their staked ETH, they can continue accumulating the rewards without having to update their credential.
Another aspect of staked ETH withdrawal is the limit on the total number of staked ETH withdrawals per day. It prevents any sudden changes to the chain and deters validators from any illicit activities, as explained here.
The below table from ConsenSys represents the total number of withdrawals that Ethereum will process per day based on the total number of active validators.
Why is staking and staked ETH withdrawal important for Ethereum?
Ethereum is a decentralized network and it relies on a network of users and computers for its operations. Prior to the implementation of PoS, Ethereum relied on a network of miners and nodes, much like Bitcoin, to validate the transactions, mine the new blocks, and add them to the chain.
After its PoS implementation, Ethereum replaced miners with validators.
Validators essentially play the same role as miners, but the process is different. Instead of setting up expensive hardware and computing devices for PoW, validators simply need to stake a minimum of 32 ETH to start validating transactions and earning rewards.
Before the Shanghai upgrade, there were over 562,000 validators who had staked nearly 18 million ETH to secure and operate the network. This reliance on validators to approve transactions ensures the decentralization of the network.
And now, with staked ETH withdrawals open for validators, there is no liquidity lock-in problem involved in staking. This will potentially attract more Ethereum users to stake their ETH and secure the network while earning a handsome APY.
Negative implications of the Shanghai upgrade on staking volumes?
To become a validator on the Ethereum PoS network, an Ethereum user had to deposit at least 32 ETH on the Ethereum PoS network.
However, non-custodial solutions such as Lido and Rocket Pool and custodial staking services from crypto exchanges like Binance and Kraken let users start staking with as low as $100 worth of ETH.
As a result, ETH staking saw strong interest from whales and retail investors alike. ETH holders staked a combined total of over 18 million ETH coins, which equaled more than $33 billion at the time the upgrade went live.
With so much value staked indefinitely, many believed that huge volumes of ETH would be unstaked post-EIP-4895 implementation. And an unstaking outburst did happen over the five days following the Shanghai upgrade as more than 1 million ETH were queued for withdrawal.
But that only makes up about 5.6% of all staked ETH.
Besides, we’re already seeing an uptick in ETH staking volumes compared to ETH unstaking volumes. According to a Nansen report, 124,000 ETH was staked on April 17 as compared to the 64,800 ETH that was withdrawn.
This is likely driven by more users now willing to stake ETH as there is no lock-in period and they can withdraw their earnings or principal amount at any time.
Other EIPs implemented during the Shanghai upgrade
While EIP-4895 was the most anticipated upgrade, there were also other EIPs that went live as part of the Shapella upgrade. Here’s a quick rundown of the other EIPs:
- EIP-3651: Lowers gas fees that block builders pay to interact with Coinbase — an Ethereum software crucial for block building.
- EIP-3855: Lower gas fees for developers by enabling a mechanism called Push0.
- EIP-3860: Lowers gas costs for developers for a very specific case.
- EIP-6049: Warn developers against the use of an Ethereum opcode dubbed SELFDESTRUCT as there are major upcoming changes.
Frequently Asked Questions (FAQs)
When did Ethereum Shanghai (EIP-4895) go live?
The Ethereum Shanghai upgrade went live on April 12, 2023, at 22:27 UTC. Initially, though, the Ethereum developers had planned the upgrade for March 2023.
How will the Ethereum Shanghai (EIP-4895) upgrade affect me?
If you staked ETH post the launch of the Beacon Chain in 2020, you can now either withdraw only the rewards you have earned or unstake all your principal ETH amount + your rewards.
Does the Ethereum Shanghai (EIP-4895) upgrade lower gas fees?
EIP-4895 doesn’t affect gas fees. However, the Shanghai upgrade implemented EIP-3651, EIP-3855, and EIP-3869 to reduce gas fees for Ethereum developers and block builders.
Are Shanghai and Capella two different Ethereum upgrades?
Yes and no. Shanghai is the upgrade made to the execution layer of Ethereum while Capella is the upgrade made to the consensus layers. They both collectively enabled staked ETH withdrawals and are also together known as Shapella.
Concluding thoughts: The future of Ethereum
The Shanghai upgrade was the last major upgrade to complete the Ethereum network’s transition to the PoS consensus. The road ahead for Ethereum involves working on making the network more scalable and reducing gas fees.
So, while ETH withdrawals going live calls for celebration, Ethereum’s journey to scalability is far from over. In the words of the Ethereum co-founder Vitalik Buterin, “If we don't fix scaling before the next bull run, we know people are going to be stuck paying $500 (gas fees) transactions.”
The Merge from September 2022 was only the first phase of the Ethereum scalability roadmap. The network is yet to go through five more major and minor phases namely the Surge, the Scourge, the Verge, the Purge, and the Splurge.
We hope this blog post helped you better understand what the Shanghai upgrade is, why it’s important to Ethereum, and what you can expect in future upgrades.
If you have any questions, join 35,000+ other builders in our Discord community! And if you want to start building smart contracts easily, get started with thirdweb’s web3 tools & SDKs — they’re free!