As part of Ethereum's move to Proof-of-Stake, validators can now stake their assets on the blockchain.
These staked assets are locked until the Shanghai upgrade, after which stakers will be able to unstake their assets and/or claim the staking rewards earned.
In line with the upgrade, a couple of changes are also expected to be introduced to Ethereum’s codebase in a bid to prepare the network for further technological developments that follow the upgrade.
The Shanghai upgrade is expected to happen sometime in early April 2023 after the Goerli testnet launch on March 14 2023.
In September 2022, the Merge fused the Beacon chain with the main Ethereum network and marked a significant stage in the migration to the Proof-of-Stake (PoS) consensus algorithm. At the time of writing, over 17.5 million ETH have been staked by validators and (downline) stakers, and about 1 million ETH have been distributed as rewards to stakers. However, these rewards and the staked assets are not accessible at this time, as these assets are locked until the Shanghai upgrade enables the unstaking and withdrawal of assets.
Based on recent reports, the Shanghai upgrade is expected to happen in early April after the successful launch of the Goerli testnet on March 14 2023.
But what is the Shanghai upgrade and why is it an important event for Ethereum validators, investors, and the crypto space as a whole?
What is the Shanghai Upgrade (EIP 4895)?
Over 500,000 validators are running nodes on the Ethereum network since the Beacon chain was shipped in 2020 and the subsequent merge with the main network in September 2022. To qualify as a validator, stakers are required to stake at least 32 ETH to their nodes.
The Shanghai upgrade (also known as the Shanghai/Capella – Shappella – upgrade) will unlock the staked ETH and staking rewards can also be claimed sequel to the upgrade. This removes one of the biggest resistance to staking ETH, as anyone can stake and unbond without worrying about when their assets can be withdrawn.
The build-up to the Shanghai upgrade involves routine testing of the unstaking contract across the various Ethereum testnets. On February 28, 2023, Ethereum developers announced that they had successfully deployed and tested the Shanghai upgrade on the Sepolia Testnet. The successful withdrawal of staked assets on Sepolia means the testing will proceed to the next testnet (Goerli), which occurred on 14 March. While deposits were processed successfully, several testnet validators did not upgrade their client before the Goerli fork.
Deposits are being processed (https://t.co/CxYtPcGMCp), but it seems like several validators haven't upgraded. Looking into it 👀— timbeiko.eth (@TimBeiko) March 14, 2023
One challenge with testnet validators is that given the ETH is worthless, there's less incentive to run a validator/monitor it.
The Shanghai/Capella simultaneously updates the execution layer (Shanghai upgrade) and the consensus layer (Capella upgrade) of the Ethereum network.
The Capella upgrade will introduce full and partial withdrawal functions for validators. In addition, it will also introduce smart contract messages that allow validators to change their BLS (Boneh Lyn Shacham) withdrawal prefix (0x00) to the Ethereum address withdrawal prefix (0x01). The latter is a prerequisite for asset withdrawals.
The Shanghai upgrade will implement a number of Ethereum Improvement Proposals (EIPs) that properly route the assets unstaked from the Beacon chain to the main Ethereum network. The Shanghai upgrade basically preps the execution layer to undertake the withdrawal request once the consensus layer reaches an agreement on the unstaking of assets. With this, the Shanghai and Capella upgrades, when deployed, will complete the staking arm of the Ethereum PoS network.
Preparation for the Shanghai Upgrade
To help you get ready for the Shanghai Upgrade, we've put together a list of common questions and their answers:
What Do I Need to Do For The Shanghai Upgrade?
For Ethereum holders whose assets aren’t staked, there is currently no need to take any action. Assets in wallets will not be affected by the upgrade and can be transacted as usual. This is the same for assets held on exchanges, unless stated otherwise by the exchange.
As a validator, it is recommended that you stay updated with developments regarding the upgrade. Validators are requested to update their Ethereum clients to the latest versions to participate in the mainnet upgrade.
When Can I Unstake and Withdraw ETH?
The unstaking and withdrawal functions have only been deployed on the Sepolia and Goerli testnets at the time of writing. Unstaking on the mainnet will be possible after the upgrade is deployed on the mainnet. This is expected to happen in early April 2023.
What Types of Withdrawals are Available?
Validators can use two types of withdrawal functions:
Full Withdrawal: Using the full withdrawal function, a validator can unstake all ETH they have committed to the Beacon chain, including their staking rewards, and exit the Beacon chain. Once the full withdrawal is completed, the validator stops being a part of the staking program. The validator will have to initiate an exit from the Beacon chain before they can fully withdraw their assets.
Partial Withdrawal: The partial withdrawal function allows validators to claim their staking reward and a portion of the staked assets, as long as they continue staking at least 32 ETH to keep the validator node running. That is, a validator staking 40 ETH can claim their staking rewards and unstake up to 8 ETH. In this case, the validator continues partaking in the staking program after their withdrawal.
How Long Does It Take To Withdraw the Staked ETH?
The withdrawal requests are processed in a single queue; how fast the unstaked ETH is received depends on the number of validators active on the network. According to published data, 16 partial withdrawals are processed every 12 seconds. Full withdrawals are processed slower. Therefore, the unstaking duration will vary greatly and the time of withdrawal is an important factor. Based on data from ParaSpace, it is expected to take over one month for 10% of validators to withdraw their staked ETH, and over a year for all staked ETH to be withdrawn. This delay is intended to prioritize the security and safety of the Ethereum network.
Are There Any Charges for Withdrawals?
According to information published by Ethereum developers, the full and partial withdrawals are handled by the execution layer and the unstaked balance will show up in the validator’s wallet without any fees being charged.
What Effects Will the Shanghai Upgrade Have on Ethereum?
The full withdrawal option will reduce the number of validators on the network; however, the intensity of this effect depends on the number of validators that use this option. It is possible that the Total Value locked (TVL) on the Beacon chain will deplete as stakers claim their staking rewards and unstake their assets.
However, another school of thought believes that enabling the unstaking of ETH will lead to an increase in the amount of ETH staked, with more people and institutions coming into staking. One reason is the growing popularity of liquid staking derivatives, which allows stakers to enjoy the flexibility of liquidity while earning rewards on their staked ETH, without having to worry about when they will be able to unstake their assets.
In the end, how this affects the price of Ethereum depends on what the majority of validators decide to do with their rewards and unstaked assets. The market is incredibly hard to predict and popular assumptions might falter. However, as mentioned above, there is a cap on the daily withdrawal limit to curb the effect of the upgrade on the market price of Ethereum.
What Else Is Part of the Shanghai Upgrade?
Apart from changes to the execution and consensus layers that will allow validators to unstake their assets and rewards, the Shanghai-Capella upgrade will also introduce a few more changes to the Ethereum network. These changes include:
EVM Object Format (EVM OF)
The EVM object format places the data for a smart contract in a single code set and separates them from the rest of the smart contract code. The smart contract will interact with the data via calls and requests. This format is expected to add flexibility to Ethereum smart contracts and possibly improve the speed with which smart contract requests are executed and also reduce the gas fee charged for these transactions. The EVM object format is highlighted in EIP 3450.
Gas Fee Economy for Layer 2 Networks
Layer 2 networks are becoming popular, as they offer scaling solutions for the Ethereum blockchain. Relative to the Ethereum mainnet, they are faster, cheaper, and generally more efficient. But these networks are still below the efficiency statistics presented by some fourth-generation blockchain networks like Solana.
To improve the price-effectiveness of Layer 2 networks, the EIP 4844 which is part of the Shanghai upgrade, will be adding roughly 2 MB of space to the blocks as a "stop-gap" solution. It will also implement the transaction format that will be used in sharding, but not actually sharding the transactions, as part of the way to implementing proto-danksharding.
Validation of Smart Contracts Before Deployment
Smart contracts are an integral part of the Ethereum blockchain. Currently, Solidity smart contracts are validated after they have been deployed, and smart contract developers decide how the code handles invalid instructions and errors.
EIP-3670, which could be a part of the Shanghai upgrade, proposes a function that validates EOF (EVM Object Format) smart contracts before they are deployed. According to this improvement proposal, unassigned instructions and other invalid commands are removed before the contract is deployed. Implementing this EIP is expected to reduce failure in smart contracts and save the time of reconstructing smart contracts to remove or handle failed instructions.
What’s Next in the Ethereum 2.0 Roadmap?
The Shanghai upgrade is only a stage in the to-do list of Ethereum developers. The upgrade only sets the stage for more developments that are part of the Ethereum 2.0 upgrade. Here are the next stages of the Ethereum 2.0 upgrade:
One of the main goals of the Serenity upgrade is to improve Ethereum blockchain’s scalability. A scalable blockchain is able to handle an increasing number of requests without dropping in efficiency, and the current Ethereum blockchain is lacking in this area. At optimal conditions, the Ethereum blockchain can only process 32 transactions per second. This speed immediately goes below the standard once the network experiences an influx in usage.
The Surge, the next stage of the Ethereum 2.0 upgrade, hopes to develop a solution to this. Deliverables of the Surge are geared towards making the Ethereum blockchain capable of handling up to 100,000 transactions per second. In this attempt, Ethereum developers are introducing the Sharding technology to the Ethereum blockchain.
Regardless of how busy a blockchain network gets or how fast the blockchain grows, splitting the whole blockchain into smaller interconnected units presents pieces of lighter blockchains that reduce the executable size considerably. This is the main idea behind Sharding.
Through Sharding, Ethereum developers will attempt to make the blockchain more efficient by partitioning it into lighter units. These pieces of blockchains are known as "Shards." Each shard stores different types of data and is independent of other shards. Sharding on Ethereum will split the blockchain into 64 shards.
As part of the Surge, this advantage presented by Sharding technology will be combined with rollups, a Layer 2 scaling technology to achieve the target speed on the Ethereum blockchain. Rollups is a transaction-aggregation technology, which bundles several transactions and executes them as one. By this, time and cost are saved in one move.
In addition to The Surge, another stage in the Ethereum 2.0 upgrade is The Scourge.
In a tweet made on November 5, 2022, Vitalik Buterin updated the Ethereum 2.0 roadmap to include The Scourge – another set of deliverables. According to the Ethereum founder, the goal of the Scourge is to ensure reliable and credible neutral transaction inclusion and avoid centralization and other protocol risks from MEV (Miner Extractable Value).
MEV is an advantage given to miners on a blockchain network. This allows miners to sneak in extra charges to transaction fees, and modify the transaction validation sequence. A way of doing this is by verifying transactions according to fees paid by the user. This gives room for front-running. MEV has introduced a level of censorship and ‘corruption’ to blockchain networks. This is only possible because the miner performs the duty of block proposal and block construction.
Through the Scourge, Ethereum developers will attempt to curb these excesses by introducing the Proposer/Builder Separation (PBS) algorithm. The PBS attempts to fix the MEV issue by splitting the block construction role from the block proposal role. The Builders compile an ordered list of transactions that become the main payload of the block and submit this list while the Proposer only accepts this list, without knowing its contents. This split essentially limits the ability of miners to manipulate the mempool.
The Ethereum blockchain is currently ‘heavy’. Ethereum’s archival nodes currently sit at well over four (4) terabytes (4TB) and the actual blockchain size is well over a hundred gigabytes. Even with each new block adding two (2) Megabytes to this already huge figure, the Ethereum blockchain is facing scalability challenges. In 2019, a Bloomberg report referred to the Ethereum blockchain as ‘almost full’.
The huge data statistics also means that validators will have to process and store an ample amount of data to validate a block. This heightens the hardware requirements to run a node on Ethereum blockchain. Deliverables of the Verge will attempt to reduce the amount of network data stored by validators. To do this it will introduce the Verkle tree, a modification to the currently used Merkle Tree for data sorting and verification.
The Verkle Tree was proposed by Ethereum founder, Vitalik Buterin. According to a release in June 2018, Vitalik claims that while Verkle Trees work just as well as Merkle Trees for data proofing, they are "much more efficient in proof size." According to him making a proof for a data tree containing a billion pieces of data in a traditional binary Merkle tree would require about 1 kilobyte, but in a Verkle Tree, the proof would be less than 150 bytes. He claims that this reduction is sufficient to make stateless clients finally viable in practice.
A more detailed explanation of the Verkle Tree can be found here.
As explained in the previous section, the Ethereum blockchain is currently a high-memory capacity network, and users as well as validators face the task of dealing with the heavy memory requirements. This is another hinge on the flexibility of the blockchain and a user experience issue. This is what the developers hope to fix with the deliverable of The Purge.
As the name implies, The Purge will attempt to make the Ethereum blockchain lighter by eliminating old network history and introducing algorithms that truncate old blocks. If the deliverables of The Purge are successfully implemented, node operators will only need to load the newest blocks while synchronizing with the network. This will be made possible by EIP-4444 which introduces history expiration to the Ethereum blockchain.
With the Purge, network clients will have an option regarding the extent they wish to go in the network history. Node operators who wish to load older versions of the network will be able to do this. A specialized full synchronization function can also be used by anyone who wishes to load the complete Ethereum blockchain’s history, but the latest history will be the only compulsory requirement while syncing.
Next on the list is The Splurge.
The deliverables of the Ethereum 2.0 upgrade will keep the Ethereum blockchain busy and once these are done, Ethereum developers will need to ensure that these new developments continue to function properly and also improve over time. Some of these housekeeping efforts are part of the Splurge.
The Splurge furnishes the Ethereum network sequel to the Ethereum 2.0 upgrade. A few deliverables of this stage include account abstraction and improvements to the MEV-resistant and PBS algorithms. Ethereum developers claim that account abstraction will bring lots of changes to web3 and smart contracts. Other deliverables of the Splurge include modifications to the EVM, ZK-SNARKs, and other “fun things”. Verifiable Delay Functions (VDFs) have also been listed as some of the extras of the Splurge stage.
Note that these stages are not sequential and each can be implemented depending on the presiding conditions or the development team’s decisions.
The biggest highlight of the Shanghai upgrade is without a doubt, the release of staked ETH on the Beacon chain and the supply changes when stakers claim their rewards.
Supply changes have always been an important figure to consider for long-term and short-term investments. However, the Shanghai upgrade assumes a slightly different form and in essence, it opens up the Ethereum network and clears the path to realizing a proper POS network. The improvements to EVM, when deployed, can optimize the smart contract system as well.
As always, note that this article is only for educational purposes and should not be taken as financial advice.
Joel is deeply interested in the technologies behind cryptocurrencies and blockchain networks. In his over 7 years of involvement in the space, he helps startups build a stronger internet presence through written content. He is the founder of CryptocurrencyScripts. Follow the author on Twitter @agboifesinachi