September 08, 2022
Ethereum Merge — The Impact, Regulation and Security Issues
In our last article, we mainly introduced the reasons, route and current progress of the Ethereum Merge. So what impact will the Merge bring to Ethereum, the ecosystem and the whole public blockchain? Are there any possible security issues?
Impact on ETH
1. ETH deflation
At present, the industry’s biggest concern is that after the Merge, it is likely that ETH will enter into a deflationary era, specifically for the following reasons: ETH production will be reduced after the merge, EIP-1559 will burn the base gas fee, while users are encouraged to stake ETH to lower the circulation of ETH.
Both the inflation and deflation of ETH depend on 2 factors: the annual production of ETH (new additions) and the annual amount of ETH burned as base gas fee (burning amount). However, since the burning rate of ETH caused by the Ethereum itself is uncertain, such as the Ethereum will burn more when it is congested and less when it is not, the data in this article are estimated based on the current actual data.
The annual issuance of Ethereum before the merge is about 5.5 million ETH, and the addition mainly comes from two parts: the block-our rewards and the stake rewards of ETH on the Beacon chain. The block rewards goes to miners and generates an average of 2.08 ETH every 13.3 seconds. Ethereum generates about 4.9 million ETH a year, but this rewards will be canceled after the merge; while the stake rewards generates about 600,000 ETH a year.
Currently, according to Ultra Sound data, the annual issuance of ETH is 4.3% of the total supply, and after deducting the base fee for burning, the annual net issuance is about 3.7% of the total supply.
After the Ethereum merge, the block rewards will be canceled as PoW has shifted to PoS, which will result in a reduction in annual issuance of about 90%, a situation the community calls “Triple Halvening”. This amounts to the “halving” of 3 bitcoins at the same time (Bitcoin halves its issuance rate every 4 years). Based on the total amount of ETH currently staked (about 13.3 million) to calculate the rewards for validators on the Beacon chain, the newly added ETH is about 600,000 per year, which is only 0.3% of the total supply.
Estimated data after the merge (Source: Ultrasound.money)
According to Ultra Sound data, a total of about 2.6 million ETH was burned in 381 days after the 2021 Ethereum to London upgrade. On average, about 2.5 million ETH is burned each year due to base fees.
In summary, from the data above, it is clear that the current ETH burned volume (2.5 million ETH) is much larger than the new additions (600,000 ETH). Therefore, after the merge, unless the amount of ETH staked increases dramatically, the ETH rewards generated by stake will fall far short of the amount of ETH burned caused by gas burning, which makes it highly likely that Ethereum will enter an era of deflation. The deflation rate is approximately:
(2.5M — 600K) / 120M = 1.58%
Ethereum deflation after the merge (Source:Ultrasound.money)
2. Stake & rewards
To date, about 13.3 million ETH have been staked, representing about 11% of the total ETH. These staked ETH are provided by about 400,000 validators, who can earn an annual interest rate of about 4.6%.
As the two chains become fully integrated, the staking yield will increase, as the current Ethereum rewards include payments to miners in addition to stakers. As more and more transaction fees and MEV will be rewarded to validators, the profitability of staking contracts should eventually increase. According to Ultra Sound’s data, the annual validator rewards will rise from 4.6% to 8.9%.
On the other hand, the rise in staking revenue of validators will also attract more ETH holders to stake.
Combined with the burning strategy of EIP-1559, in the long run, it is likely to cause a deflationary effect, with less ETH in circulation, the price of ETH may rise, which will indirectly increase the staking revenue of validators again.
3. Hard fork
At the recent ETH Seoul, when talking about a possible hard fork from Ethereum upgrade, Vitalik said he didn’t think the Ethereum PoW fork will be adopted in a massive, long-term way.” But he acknowledged that some markets may have some problems in the meantime. In addition, Vitalik talked about ETC, saying it offers “an excellent community and an excellent product” for those who support the values and preferences of PoW.
What is a hard fork?
Hard fork is when the block format or transaction format (i.e. “consensus”) of the blockchain is changed, the unupgraded nodes refuse to verify the blocks generated by the upgraded nodes, while the upgraded nodes can verify the blocks generated by the unupgraded nodes. However, since the upgraded nodes occupy the majority of the network, the upgraded nodes generated blocks faster than the ungraded nodes, which makes the chain where the upgraded nodes generated blocks the longest legal chain, but the ungraded nodes always refuse to recognize the upgraded nodes’ blocks and continue to generate blocks independently in their own chain, which eventually causes the blockchain to split into two chains.
This is not the first time that a hard fork of Ethereum has been discussed. There was a hard fork of Ethereum back in July 2016, which aimed at transferring THE DAO funds stolen by hackers to another account controlled by investors and attempting to roll back the hacked transactions of the attack. Most of the Ethereum developers were involved in this hard fork, in addition to exchanges, startups and other members of the ecosystem. A few days after the fork, the project returned to normalcy. Not everyone wanted a hard fork, which they felt went against the blockchain’s immutability. So a small group of miners continued to use the original blockchain as a form of protest, describing the hard fork as an act of capital extraction from The DAO, an abandoned project. This led to the birth of Ethereum Classic (ETC), and the new Ethereum created by the fork is ETH, but both ETC and ETH use the PoW consensus algorithm.
The current hard fork of Ethereum due to the upgrade may be different. Currently, after years of development, Ethereum has gathered a huge amount of money and developed the richest ecosystem. However, if a hard fork occurs again, the forked chain and the original chain will share the same historical ledger, resulting in the existence of two identical USDT, USDC and wBTC and other irreproducible assets, and the value of these extra centralized stablecoins will go to zero because they cannot be cashed out as fiat currency, which will eventually lead to catastrophic consequences on the fork.
Impact on Ethereum Ecosystem
The price of ETH has soared since 2020, and the huge profit margin has attracted a large number of blockchain miners. According to Arcane Research, Ethereum mining realized a $11 billion in revenue in 2022, which is a higher figure than mining in Bitcoin.
However, the upgrade of Ethereum will change this situation, because the change of consensus mechanism from PoW to PoS will make it impossible for the existing miners to continue to participate in mining, which will cause an earthquake in the “mining” industry. For miners, the upgrade is not a good news.
According to 2miners data, the hash rate (a measure of the algorithmic power of cryptocurrency mining tools, simply understood as arithmetic power) of Ethereum reached its peak in May 2022, and has been declining since then, probably due to the miners’ realization of the upcoming merge and the gradually shutting down of mining machines.
Ethereum Hashrate Source: 2miners.com
So, what’s the next step for miners after the Ethereum merge? Among them, there are still a few miners who support continuing to mine on Ethereum, but the possible risk of a hard fork caused by this move has been explained in the previous chapter, while the presence of the difficulty bomb makes it increasingly difficult to continue mining with less and less rewards. In view of this, after the merge, miners may adopt the following alternatives.
1. Mine other PoW tokens
2. Provide high performance computing data center
3. Provide computing for Web3 protocol
4. Sell mining machines and stake the mined ETH to participate in PoS
MEV, known as Maximal Extractable Value, refers to the maximum amount that can be extracted from block generation in excess of standard block rewards and gas fees by adding and removing transactions from the block and changing the order of transactions in the block.
MEV stems from the asymmetry of market information. In order to mitigate information asymmetry and reduce negative MEV externalities, many innovations have emerged in the industry like Flashbots. Theoretically, when using PoW consensus, the extractable value by miners depends entirely on the miner, since the miner is the only party that can guarantee that profitable mining is performed. In reality, however, most of the MEV is extracted by independent network participants called “searchers”. Searchers run complex algorithms on blockchain data to detect profitable MEV opportunities and have bots automatically submit these profitable transactions to the network. Both miners and “searchers” look for MEV opportunities from the mempool, where they insert transactions in the right places to extract the expected MEV. Common MEV strategies include: arbitrage, liquidation, front-running, sandwich attacks and reverse transactions.
Regular miners have access to the transactions in the mempool, which aggregates all pending transactions waiting to be processed. Some may also accept private transactions directly from users, without going through the mempool. Miners will sort these transactions in the order of the gas fee and insert their own transactions as MEV opportunities arise. In this case, for some highly competitive MEV opportunities, such as the DEX arbitrage, the searcher may have to pay the miner 90% or more of the total MEV revenue because many people want to run the same arbitrage trade at the same time, and the only way to ensure that the arbitrage trade runs is to submit the trade with the highest gas fee.
Flashbots is a standalone project that extends the go-ethereum client with a service that enables searchers to submit MEV transactions to miners without disclosing them to the public mempool. This prevents transactions from being front-run.
Flashbots has three main components: searchers, relays, and miners. The role played by searchers is that of people who submit transactions for arbitrage, clearing, front-running, privacy, MEV protection, and other reasons. The relay is the middleware between the miner and the searcher that validates the bundled transactions received from the searcher and pushes them to the Flashbots miner. Relays are critical because they provide flexibility in processing transaction packets (e.g. bundled packets) and prevent DoS attacks on miners.
Instead of writing complex algorithms to detect MEV opportunities, some searchers are front-runners, which are bots that monitor mempools to detect profitable trades. The front-runner will copy the code of a potentially profitable trade, replacing its address with the address of a front runner. The trade is then executed locally, and the modified trade is repeatedly checked to see if it is profitable for the front runner’s address. If the trade is indeed profitable, the front-runner will submit the modified trade with the replacement address and a higher gas price to front-run the original transaction and captures the MEV of the original searcher.
MEV after the Merge
In the current pre-merge marketplace, block proposers (currently miners, validators after the merge) look directly at the transactions in the transaction pool, select transactions and pack them into blocks in descending order of the gas fee they paid, and then broadcast the blocks onto the chain. The validators will replace the miners after the Ethereum upgrade. But there is no built-in mechanism at the protocol level to help validators capture MEV. If uncontrolled, this structure will allow specialized companies and larger entities to better capture MEV by setting up multiple validators and building optimal block strategies, while other validators will not be able to compete effectively. For this reason, Vitalik proposes the PBS (Proposer Builder Separation) scheme.
The PBS scheme involves separating the role of the block builders from the block proposers, who build the exec block bodies, consisting mainly of an ordered list of transactions that become the main load in the block, and then submit bids for the block generated. The original Proposer will no longer be responsible for block packing, but will simply receive the highest bid for the execution of the block. The Proposer (and everyone else) does not know the contents of the body of any execution block during and after the block selection process. This pre-confirmation privacy prevents miners from stealing MEVs, which essentially negates the miner’s access to the block transaction ordering task. Combined with the fact that all Beacon blocks and slice data are uniformly validated by a committee of random validators, as mentioned in our previous article, this enables MEV marketization and solves the problem of potential validator centralization.
Currently, Flashbots has created a MEV-boost solution based on PBS. Using MEV-Boost, validators can access blocks from the builder’s marketplace. The builder generates the block containing the transaction order flow and the block proposing the validator’s fee. Separating the roles of proposer and block builder promotes greater competition, decentralization, and censorship resistance in Ethereum.
Source: flashbots github
PoS node operators must run three pieces of software: a validator client, a consensus client, and an execution client. MEV-boost queries block builds and outsources them to the builder network. Block builders prepare complete blocks, optimize MEV extracts and distribute rewards fairly, then submit their blocks to relays. The relays aggregate blocks from multiple builders to select the highest-cost blocks. An instance of MEV-boost can be configured by the validator to connect to multiple relays. The validator’s consensus client proposes the most profitable blocks received from MEV-boost to the Ethereum network for proof and block inclusion.
On August 16, 2022, Vitalik Buterin tweeted about how the Ethereum community would react to “protocol-level censorship of Ethereum by validators of certain protocols (e.g. Lido, Coinbase, etc.)”, saying he would view such censorship as an attack on Ethereum and choose to burn the staking rewards of these validators through a broader consensus social consensus.
The trigger for this discussion was the recent sanction of Tornado Cash by OFAC. However, the current sanctions are for centralized operations, and technical sanctions are not yet available for the decentralized smart contracts. This suggests that if the U.S. wants to sanction Tornado cash completely, it must control the underlying Ethereum. Then it leads to a question, what will Ethereum face if regulated by U.S. government?
If the US government were to regulate Ethereum, the biggest possibility would be to require large PoS stake providers to conduct protocol-level transaction reviews of Ethereum. This is not “evil” on the part of the validators, but “targeted sanctions” on the part of the validators against on-chain addresses. In simple terms, this means that all requests from sanctioned addresses will be monitored and all blocks containing transactions from sanctioned addresses will be rejected from the block. When a block fails to pass more than 66% of the equity validation votes, all transaction requests for that block will be rolled back, which means that the sanctioned address will not be able to perform any operation and the validator will not face any penalty.
As of now, the number of Ethereum staked across the Ethereum is about 13+ million ETH, while the number of Ether staked through Lido already accounts for about 30.9%, Coinbase accounts for about 14.7%, and Kraken accounts for about 8.5%. If the US government requires large validators (service providers) represented by Lido, Coinabse, and Kraken to perform protocol-level transaction review of Ethereum, it would be difficult for staking providers with US legal entities to refuse similar requests.
Source: Dune Analytics
In response to the above possible scenario, a poll was launched in the Ethereum community on Twitter to discuss what to do if OFAC imposes regulation on Ethereum through validators. As stated at the beginning of this section, Vitalik supports treating the above scenario as an attack on Ethereum and burn the staking rewards of these validators through a social consensus.
4. Application layer
As we mentioned in the previous article, the Merge of Ethereum is planned to be done on a “minimal disruption” basis, so that the original running application clients can switch to PoS without feeling the disruption, i.e., despite the “minimal disruption”, there are some small changes in the process. This section describes what we should focus on from an application development perspective after the merge.
After the merge, the current Eth1 and Eth2 clients will become the execution layer and consensus layer (or engine) of Ethereum. This means that the node operator of the Eth1 or Beacon chain client will need to run the “other half” of the stack to get fully validators. The diagram below shows the complete Ethereum client architecture after the merge.
1. Ethereum client
Ethereum client after the merge (Source: Danny Ryan)
2. Block structure
When a merge occurs, the Beacon node will monitor the current PoW chain and wait for it to reach a predefined threshold of total difficulty, which is called TERMINAL_TOTAL_DIFFICULTY. i.e., once the PoW chain generates a block with total difficulty >= TERMINAL_TOTAL_ DIFFICULTY, it will be considered as the last PoW block on the chain. Subsequently, the data contained in the PoW block will become the data component of the beacon chain block, and the beacon chain can be regarded as the new PoS consensus layer of Ethereum, replacing the previous PoW consensus layer. Also when consensus validation is performed, the beacon node will communicate with its execution engine (the pre-upgrade Ethereum client) and ask it to generate or validate ExecutionPayloads, which contains information such as parent hashes, state roots, base fees and the list of transactions to be executed. Once these data are generated or validated, the Beacon node shares them with other nodes on the p2p network. And for end-users and application developers, these original ExecutionPayloads on the PoW chain are still the location where they will have direct interaction with Ethereum, and transactions will still be handled by the execution layer clients, which allows them to switch to the PoS chain senselessly. The following diagram shows this relationship.
Source: Danny Ryan
3. Execution engine
After the merge, the execution engine is mainly responsible for state management, block creation and validation functions, and no longer contains any consensus-related operations. As a result, the execution engine has been partially modified, and these modifications are described in EIP-3675 and consist of three main points.
First, some data fields of the block were modified. Several fields in the original block that were only relevant to PoW were set to 0 (or their data structure equivalents), specifically mining-related (difficulty, mixHash, nonce), and uncle block reward-related (ommers, ommersHash). In addition, the length of extraData will also be limited to 32 bytes on the mainnet.
Second, since only the merged Beacon chain can be blocked out, the execution engine will stop processing blocks and uncle block rewards. However, transaction fees are still processed by it, i.e. when the execution engine creates an ExecutionPayload, it needs to ensure that all transaction initiators can at least pay the current baseFeePerGas fee and send the remaining transaction fees to feeReceipient. Note that feeReceipient refers to the pre-upgrade Ethereum address, not the Beacon address of validators.
Finally, once PoS replaces PoW, the execution engine will no longer be responsible for broadcasting the blocks, but will still broadcast the transactions through the p2p network. The process is that first the user sends the transactions via a local RPC request to the consensus client, where they will be packaged into a Beacon block. The consensus client will then broadcast the Beacon block across their p2p network.
The following diagram shows the process when Ethereum merges: firstly, PoW out blocks are stopped, and then Beacon chain blocks start holding ExecutionPayload after the merge.
Source: Danny Ryan
4. BLOCKHASH & DIFFICULTY opcodes modification
After the merge, the BLOCKHASH opcode can still be used, but the pseudo-randomness provided by this opcode will be greatly reduced since it no longer generates the corresponding hash value by PoW.
At the same time, the DIFFICULTY opcode (0x44) will be renamed to RANDOM and will return a random value provided by the Beacon chain. Thus, this value will replace BLOCKHASH as a better random source for application developers to use (although there will still be deviations).
The RANDOM value will be stored in the ExecutionPayload where the mixHash used to be, which is relevant for PoW calculations. After the upgrade this value is renamed to random.
The following diagram explains how the DIFFICULTY and RANDOM opcodes work before and after the merge.
Source: Danny Ryan
Before the merge, the 0x44 opcode returns the difficulty field in the block header. After the merge, the RANDOM opcode, which is responsible for generating random numbers, points to the original mixHash field, which is renamed random.
5. Block time
The merge will affect the average block time for Ethereum. Currently under PoW, a block is generated on average every ~13 seconds, but the actual block interval can vary quite a bit due to network congestion. Under PoS, however, the block interval is a fixed 12 seconds, unless some extreme case occurs, e.g., a validator goes offline or misses a slot by not submitting a block in time.
In summary, the average block time of the upgraded network will be reduced by almost 1 second, which improves the rate of transactions. Note: If there is logic associated with a specific average block time in a smart contract, the developer needs to take this into account when calculating it.
If you have need any blockchain security services, please contact us:
Related Project Secure Score
Guess you like
Beosin and CLV have entered into a strategic partnership
September 02, 2022
All Web3 Events You Need to Know in Singapore This September!
September 13, 2022
Ethereum PoS and PoW Security
September 13, 2022
Introduction of EIP-3523: Semi-Fungible Token
September 14, 2022