Posted on Jan 17, 2023Read on

Ethereum's Shanghai Upgrade: Changes and the Future

At the first All Core Developers Execution (ACDE) call of 2023, the developers announced their aim to launch the test network for the Shanghai upgrade in early February, and tentatively activated the main network for the Shanghai upgrade in March 2023. This upgrade fully transform the Ethereum network from PoW to PoS and effectively addressed centralization issues caused by the Ethereum merger. The veDAO Research Institute will provide details of the changes brought by this upgrade and its impact in the future.

What changes will Shanghai Upgrade bring?

The Shanghai upgrade will be the first major upgrade of the Ethereum network after the merger, and also an important milestone on Ethereum’s roadmap. There are three big changes:

1. Shanghai upgrade inactivates the function of the pledge withdrawing on Ethereum. This not only helps keep the Ethereum network active but also contributes to the sustainable future of Ethereum, which continues to attract more verifiers to join.

2. Shanghai upgrade reduces the gas fee of the Layer-2 solution running on the Ethereum blockchain, which makes Ethereum faster and cheaper somehow, and will further optimize the gas fee of trading on Ethereum.

3. As the largest blockchain network supporting smart contracts, Ethereum will introduce EOF (EVM Object Format) to maintain its leading position in this field.

As far as the future ETH price is concerned, the Shanghai upgrade will help to speed up the trading on Ethereum. The above changes are caused by the EIP which is to be activated. The Shanghai upgrade originally plans to update 12 EIPs but unfortunately finalize 9 EIPs. The postponed EIP includes EIP-4844, which can greatly reduce gas fees and is related to ETH fragmentation. Next, let's learn about the four most important proposals.

4 key EIPs

EIP- 3651: Warm COINBASE

The EIP aims to save unnecessary gas consumption related to ERC20. EIP-3651 was proposed by William Morris (wjmelements) on July 12, 2021. This EIP affects the types of transactions that encourage incentives: COINBASE in this EIP refers to the name of the software used by miners to get new tokens on the network. This concept originated from Bitcoin. The first transaction in the block is called a coin-making transaction or COINBASE transaction -  a special transaction for miners to pack and collect gas tips for mining. The transaction is defined as either "warm" or "cold" depending on whether there is preload before executing. In EIP-2929, the cold account access cost (COLD_ACCOUNT_ACCESS_COST) will be charged if there is no target in accessed_addresses. At this time, the first transaction is not preloaded (namely it’s cold), and the gas charge will be higher, while the gas charge will be lower for the pre-loaded (warm) transaction.

The advantage is that after EIP-3651 is introduced, the transaction packed by miners can be used for more purposes, and the gas fee will be reduced. Before EIP-3651 was launched, payment by ETH is preferred, and payment by ERC 20 is more encouraged after its launch. EIP-3855, another EIP adopted in the Shanghai upgrade, also aims to reduce unnecessary gas consumption. The implementation of both proposals will greatly reduce the gas fee of Ethereum.

EIP-3855:PUSH0 instruction

This EIP plans to reduce meaningless gas consumption too. EVM, the Ethereum virtual machine (the system that executes the contract code), has many kinds of instructions but misses push0 - an instruction for stack push operation on the value of 0. This EIP adds an instruction of PUSH0 (0x5f) to push the constant value of 0 onto the stack, but it takes about 2 gas.

Why is there no push0 before? First, some operations use 0 to execute offset functions - such as remote call and return which require many parameters of 0. Only the instruction of PUSH1 0 is useful to operate on 0, that is, any number pressed will be displayed as 0. This operation will consume 3 gas. Second, push1 and 0 are stored as one byte in the setup code. Consequently, deploying this contract will cost 2 * 200 gas. According to the statistics by this EIP, 340,557,331 bytes are wasted on the instructions of PUSH1 00 in the existing accounts, which means that the deployment costs 68,111,466,200 gas.

EIP-3860: Limit and meter initcode

The EIP seeks to increase the upper limit of the smart contract system and reduce gas. By introducing the maximum size limit of initcode, the maximum size limit of initcode is doubled by increasing from 24,576 to 49,152. Two gas fees are charged for every 32 bytes of initcode chunk to indicate the cost of jumpdest-analysis.

Larger Halstead's volume has significant impacts: with double size, contract developers can deploy richer functions; In other words, EIP-3860 is designed for larger Dapp.

EIP-4895: Beacon chain push withdrawals as operations

This EIP is the core of the Shanghai upgrade: support the verifier to withdraw money from the beacon chain to EVM through the new system-level operation. This EIP will introduce a system-level operation to support withdrawal from the beacon chain to EVM.

This EIP provides a way for the verifier on the beacon chain to withdraw money into EVM, thus withdrawing the pledged ETH. The implementation method is based on the information on beacon chain consensus. The system-level instruction of withdrawal is introduced based on the information of the beacon chain (consensus layer) to control unconditionally and directly ETH balance on a certain address. There is no gas consumption because no gas is used to prevent DoS attacks. Currently, about 14 million ETHs are still pledged in the beacon chain. The operation of this withdrawal will mean that the function of pledge withdrawal on the Ethereum beacon chain will be activated.

With regard to the possible selling pressure after the pledge unlocking is allowed, Ethereum currently allows the model of gradual unlocking. Based on reality, the maximum limit of withdrawal is about 55,000 ETHs per day. There are 225 epochs per day on Ethereum, while each epoch can activate about 7.55 verifiers (which is calculated by dividing 65,536 into the total number of verifiers), that is, it can unlock up to 55,000 ETHs per day. In addition, the withdrawal rate will also be adjusted according to the total amount of the pledged ETH, to prevent the instantaneous massive outflow to deal with the possible selling pressure.

How to get involved in Shanghai Upgrade?

After Ethereum transitioned to Pos through the merger, the role of miners was assumed by the verifier, and the MEV (maximum extractable value) market changed significantly. All transactions on the Ethereum network will no longer be verified by energy-intensive miners, but by individual or institutional verifiers that deposit or pledge a large number of ETHs. Anyone can pledge 32 ETH or more to meet the minimum requirements of becoming a verifier. The pledge generally comprises the separate pledge, the pledge as a service (SaaS) and the joint pledge. The separate pledge is the most basic one where users gain profits by joining different nodes and pledging ETH; if users want to pledge less than 32 ETH, they can choose the joint pledge. Each method has different advantages and risks.

This upgrade has opened the function of pledge withdrawal. General withdrawal requests include withdrawal of proceeds or withdrawal of all (i.e. withdrawal from the verifier’s node). Each block on the Ethereum beacon chain can process up to 16 withdrawal requests, and all withdrawal and partial withdrawal has the same priority. Verifiers can submit the application only when the verifier’s node has more than 32ETH at the status of withdrawable. Based on the withdrawal request by verifiers, a withdrawal list will be created to include all the verifiers who have made the withdrawal request. The list lists the withdrawal order, the address of the executive level and the withdrawal amount.

After the miners, the MEV might become the new big thing in the next bull market. Maximum extractable value refers to the maximum value that the verifier can extract in the production of blocks that exceed the rewards and gas fees in standard blocks by adding, deleting and changing the transaction order in the block. The problem is that there is no built-in mechanism in the protocol to help the verifier capture MEV. Therefore, the parties sharing MEV on the chain are no longer the miners and instead, they are Layer 2, CEX, Lido, and verification node custodians. Multi-party involvement further complicates MEV issues on ETH 2.0. The MEV segment, an important arena for many parties, is expected to become a significant trend for the next bull market.

As mentioned earlier, after the Shanghai upgrade, the ETHs, pledged on the beacon chain, will be released, which will undoubtedly make ETH hugely popular. Therefore, becoming a verifier at the ETH2.0 network might be the best choice for users to be part of the ETH2.0 ecosystem after the Shanghai upgrade. However, ordinary users have less access to 32 ETHs and frequent technical maintenance of mev-boost. Thus, except for a few whales and geeks, joining the mining pool is the must-used way to enter ETH2.0.

Follow Us

veDAO, led by DAO, is an investing/financing platform. Utilizing the wisdom of the masses, the platform gives full play to the elite insight. The platform, finding and supporting the most potential projects through the voting mechanism, builds a community, composed of financiers, investors, and DAO members, with shared interests, thus enabling everyone to do his part and benefit from it.

veDAO is committed to providing a transparent and easy-to-access platform for all financiers, investors, and community attendants through democratic voting. With veDAO, all the participants will share the benefits of the project and benefit from the top-level project in the future.