How Ethereum Will Change: Understanding the Merge, Scalability, and the L2 Battle

Chain Tea House
2022-06-02 20:41:04
Collection
Although Ethereum's merge has been delayed, it is expected to achieve the end of the POW mechanism by the end of 2022. Meanwhile, L2 projects will be ready to take off.

Author: echo_z, Chain Teahouse

The Ethereum Merge, originally scheduled for June this year, has been postponed once again. Nevertheless, as an important milestone in the Ethereum upgrade process, the Merge remains one of the most noteworthy events of the year.

Some may confuse the "Merge" with "scalability," but these are actually two phases of the Ethereum upgrade. The core issue addressed by the "Merge" is the transition of the consensus mechanism from POW to POS, reducing energy consumption, which does not inherently bring scalability; scalability, on the other hand, is key to solving Ethereum's scalability issues and improving throughput.

Ethereum's insufficient scalability has always been the biggest constraint on its development, providing ample competitive opportunities for other public chains. If Ethereum successfully scales, it will unleash tremendous potential, and the evolution of this global infrastructure will inevitably impact the landscape of public chains and even give rise to new application tracks.

So, what are the core issues that Ethereum's scalability needs to address, what are the current mainstream solutions, and how should we understand the upcoming "Merge" along with the various Layer 2 projects that are emerging? Chain Teahouse summarizes the Ethereum upgrade process as follows.

1: The Logic and Impact of the "Merge"

1.1 Change in Consensus Mechanism: From POW to POS

The Ethereum mainnet currently adopts a Proof of Work (POW) consensus mechanism, where miners must first brute-force solve a specific value, proving their cost through the computational power consumed, to qualify for producing new blocks. POW leads to significant energy consumption, which has long been criticized, while POS replaces computational power consumption with validators' asset staking, thus not consuming excessive energy. The two most important parts of Ethereum's roadmap are the transition from POW to POS to avoid excessive energy consumption, and the aforementioned scalability path, with the change in consensus mechanism being prioritized.

In December 2020, the "Beacon Chain," which will serve as the future mainnet, was launched and operates independently of the mainnet. The Beacon Chain produces blocks stably, and validators can stake to mine and earn block rewards from the Beacon Chain's issuance, but it has not yet taken on actual functions. The "Beacon Chain" will also be an important component of the "scalability" route, which will be detailed below.

image

Source: https://beaconscan.com/

The goal of the "Merge" is to place the "consensus" logic of the Ethereum mainnet on the Beacon Chain, while the "execution" logic continues to run on the original mainnet. To understand what this change means for Ethereum's operation, one must first understand Ethereum's block production process.

A complete block production cycle in Ethereum includes the following steps:

1) Execution: Miners select and execute transactions from new transaction requests, verifying whether all transactions are valid, updating their local EVM copies, and generating potential blocks;

2) Proof of Work: After completing local execution and verification, miners will begin the proof of work to qualify for block production;

3) Consensus: Ultimately, a miner who qualifies for block production will broadcast the executed transactions to all network nodes, which will re-verify and execute them locally to confirm the validity of the block;

4) Multi-party Storage: After reaching consensus, all nodes will update the EVM copy state and save the latest transaction history[1].

After the Merge, the aforementioned "execution" and "multi-party storage" will remain unchanged, still operating on the original Ethereum mainnet, while miners will be replaced by ETH stakers on the Beacon Chain, with a minimum of 32 ETH required to participate in block production and verification. In each block production cycle (set at 12 seconds), an algorithm will select a block producer, and after the block is produced and broadcast, the Beacon Chain will assign a group of validators to verify the block and complete consensus[8].

Compared to the original process, miners are replaced by stakers, and the trust cost for miners shifts from consuming computational power to staking assets. "Proof of Work" is eliminated, thus reducing energy consumption by approximately 99%.

Due to the significant decrease in block production costs, many mistakenly believe this will lead to a decrease in ETH transaction fees or even an improvement in performance, but this is actually a misunderstanding. Next, we will introduce the impacts brought by the Merge.

1.2 Impact of the Merge: TPS and Fees Remain Essentially Unchanged

Contrary to many people's intuition, although the cost of block production decreases after the Merge, TPS and fees remain essentially unchanged. The core reason lies in the fact that the block size and block production speed have not changed significantly. Understanding the logic of TPS and the pricing mechanism of fees can help clarify this point.

TPS, or transactions per second, is equal to the number of transactions that can fit in each block divided by the block production time. After the implementation of EIP-1559 last August, the baseline space for a single block is 15 million gas (gas is the unit of measurement for operations consumed on Ethereum), and when demand increases, the space limit for a single block can reach 30 million gas.

Since the "execution" phase after the Merge does not change, the size of a single block remains unchanged, still adhering to the original baseline of 15 million and an upper limit of 30 million. As for block production speed, the Ethereum mainnet currently maintains a rate of approximately 13 seconds per block, which will change to 12 seconds per block after the Merge. This means that TPS may increase by at most ~1 second due to the improved block production speed, resulting in less than a 10% increase.

The limitations on Ethereum's block size and production speed are in place to ensure that nodes can fully verify and synchronize in real-time, achieving sufficient security and decentralization. The limitations on TPS are part of Ethereum's scalability issues and cannot be resolved by changing the consensus mechanism.

Understanding TPS also clarifies the logic of fees. The fee pricing mechanism on Ethereum underwent significant changes after the implementation of EIP-1559 last year, dividing it into two parts: Base Fee and Tips. The Base Fee is determined entirely by supply and demand, where demand is the transaction requests submitted by users, and supply is the computational space that Ethereum can provide. If the number of transaction requests received in a block exceeds the actual number processed in the previous block, the Base Fee for the next block will increase by up to 12.5%. Tips serve as rewards for miners and essentially act as a bidding mechanism to attract miners, also determined by demand.

image

Example of Base Fee Increase, Source: https://ethereum.org/en/developers/docs/gas/

Since TPS does not fundamentally change and computational space remains limited, the Merge cannot alter the supply-demand relationship and thus cannot impact fees.

1.3 Impact of the Merge: ETH Will Become Slightly Deflationary

Currently, ETH has both issuance and burning mechanisms, resulting in a slight inflation overall; however, after the Merge, due to the reduced issuance rate, it will present a slight deflation of about 1% to 2%.

The current ETH issuance mechanism provides 2 ETH as miner rewards for each block produced. Based on the current block production speed and total circulating supply, the annual issuance rate is approximately 4.3%. The burning mechanism involves the "Base Fee" mentioned in section 1.2, which is burned, amounting to about 2.9 million ETH burned annually. Overall, the estimated inflation rate is around 2%.

After the Merge, the most significant change will be a substantial reduction in block rewards, approximately 90% of the previous amount. Assuming the annual burning amount remains unchanged, the overall inflation will reach approximately 2% deflation.

image

ETH inflation models under POS and POW mechanisms, produced by Chain Teahouse.

2: The Scalability Dilemma of Ethereum

As the most mainstream smart contract platform, Ethereum is known for its security and decentralization; however, it still lags in scalability: Ethereum's current TPS (transactions per second) is between 10 and 15, with insufficient supply and high demand leading to high fees determined by bidding, costing several dollars to tens of dollars per transaction.

image

Ethereum TPS over the past week, Source: https://ethtps.info/Network/Ethereum

In comparison, BNB's TPS is between 40 and 50, while Solana has even reached over 1,000, on par with Visa.

image

image

BNB and Solana TPS, Source: https://bscscan.com/; https://explorer.solana.com/

Decentralization, security, and scalability can only choose two, which is also known as the blockchain trilemma. Ethereum's initial choice was to sacrifice scalability to align with the most important values of Web3.

If scalability is achieved in a simple and crude manner, it would sacrifice security or decentralization. As shown in the diagram below: the first method is to expand block capacity, but this would also increase the workload for validators, ultimately leading to a concentration of validators in data centers controlled by giants, losing the characteristic of decentralization. This is why Ethereum's current block capacity and production speed are limited; only in this way can ordinary people participate in validation. The second method is to have more altcoins (public chains), but this would lead to a proportional decrease in security due to the dispersion of validation.

image

Source: https://www.youtube.com/watch?v=OJT_fR7wexw

Despite this, Ethereum has been actively seeking scalability solutions and has determined a scalability route centered on Rollups and Sharding since 2020[2].

3: Ethereum's Scalability Route ------

Rollups + Sharding

According to the current classification on Ethereum's official website, "scalability" is divided into on-chain and off-chain scalability, where on-chain scalability refers to "Sharding," which involves changes to the Ethereum mainnet; off-chain scalability refers to Layer 2 and other various solutions independent of the Ethereum mainnet.

image

Produced by Chain Teahouse, based on: https://ethereum.org/en/developers/docs/scaling/#layer-2-scaling

Since on-chain scalability through Sharding involves changes to the Ethereum mainnet and will migrate all historical data, the process is slow, with the official expectation that Sharding will be realized in 2023. Meanwhile, various off-chain scalability solutions have already been implemented, among which Rollups are the primary route chosen by the Ethereum community and the short-term focus of the scalability roadmap. The following sections will introduce off-chain and on-chain scalability separately.

3.1 Off-Chain Scalability: The Success of Various Layer 2 and Rollups

In the Ethereum official classification, the definition of Layer 2 is relatively narrow, only referring to Rollups and State Channels as solutions that complete consensus through the mainnet. Generally, all off-chain scalability can be referred to as Layer 2.

Here are a few types of solutions briefly introduced:

1) Rollups: Transactions are executed off-chain (outside the mainnet), and then multiple transactions are packaged and published to the mainnet, where consensus is achieved. By executing computations off-chain and compressing some data back to the mainnet, the utilization of mainnet space is reduced.

It is important to note that the information published by Rollups must include: a) State Root, representing the balances of all accounts after the transaction is completed, i.e., the state of the transaction results; b) Transaction Information, i.e., the transaction instructions for how much A transfers to B. With these two pieces of information, mainnet nodes can fully verify the transaction history on Rollups, ensuring that Rollups' security is guaranteed by the mainnet. This is crucial and distinguishes Rollups from Plasma/Validium, which lack recognized security.

image

Source: https://vitalik.ca/general/2021/01/05/rollup.html

Rollups are further divided into two categories: Optimistic Rollups, which use fraud proofs and set up challenge mechanisms allowing validators to challenge problematic transactions, requiring challenged transactions to be re-executed on the L1 mainnet, assuming all transactions are valid under normal circumstances, hence called "Optimistic Rollups"; and ZK Rollups, which use validity proofs, requiring all transactions submitted to the L1 mainnet to pass zero-knowledge proofs.

Optimistic Rollups have mature cryptographic technology solutions, are compatible with EVM, and are the earliest implemented Rollups, with typical projects being Arbitrum and Optimism. ZK Rollups require simpler data to be uploaded to L1, making transaction execution faster and more efficient, but the technical difficulty is higher and they are not inherently compatible with EVM, leading to high migration costs for developers.

2) State Channels: Participants can complete multiple transactions off-chain through multi-signature contracts, accumulating amounts, with only the final transaction recorded on the mainnet. However, the application scenarios for this type of solution are very limited, usable only by network participants, and require staking a significant amount of funds in complex transactions.

3) Sidechains: EVM-compatible chains independent of the mainnet, which can bridge to the mainnet through a bi-directional bridge, but their consensus logic and block parameters are unrelated to the mainnet. Due to their complete independence, security cannot be guaranteed by the mainnet, with typical projects like Polygon.

4) Plasma: A lower-security version of Optimistic Rollups. Plasma itself is a blockchain that can have an infinite number of child chains, each child chain resembling a branch on a tree, executing some transactions, with all transaction states ultimately summarized into a hash value published to L1. However, this hash value cannot restore the entire transaction history, as transaction information is stored across various child chains, i.e., branches, and validating nodes cannot be sure that all blocks on the child chains have sufficient data validity proofs. If any block's information cannot be confirmed as valid, the entire transaction history on that chain will be at risk, which is known as the Data Availability Problem[3].

image

Source: http://plasma.io/plasma-deprecated.pdf, P10

Plasma and Optimistic Rollups share two similarities: both place computation off-chain and both use fraud proofs. However, the key difference is that Rollups upload compressed data that still includes the full transaction history, while Plasma does not.

5) Validium: A lower-security version of ZK Rollups, also using zero-knowledge proofs, but the data is not stored on L1, with typical projects like Immutable X and DeversiFi using StarkWare technology.

Overall, Rollups are the most secure and widely applicable off-chain scalability solution (unlike State Channels, which only allow network participants to use). Therefore, before Sharding is realized, Rollups are considered the most important scalability path.

The following diagram shows some mainstream Layer 2 projects, and it can be seen that Rollups are indeed the most widely adopted technology, with the technically mature Optimistic Rollups having broader application scenarios, suitable for any smart contract; while ZK Rollups, due to their limitations in EVM compatibility, often have restricted use cases.

image

Source: https://l2beat.com/

It is worth noting that Metis, ranked 5th in TVL, has been excluded as an "Optimistic Chain" rather than an "Optimistic Rollup" because it does not store all transaction data on-chain but uses the off-chain decentralized storage project MEMO to save data, achieving ultra-low fees at the cost of data availability.

Metis's trade-offs also reflect a problem with Rollups: since they still need to publish transaction data on L1, their scalability is limited by the storage space of the Ethereum mainnet. What Rollups can do is compress and upload as little data as possible to L1 to improve throughput.

In this regard, ZK Rollups have an advantage over Optimistic Rollups. Since ZK Rollups solve the verification problem through zero-knowledge proofs, all transaction data published to L1 has already been verified. Therefore, if some transaction information is only used for verification and not for computing the latest results, this information can be kept off-chain in ZK Rollups, while in Optimistic Rollups, it must be kept on-chain for querying in fraud proofs[4]. ZK Rollups save more on-chain space than Optimistic Rollups.

The following diagram compares the fees of multiple L2 solutions (assuming Metis is still classified as L2), showing that, except for the privacy-focused Aztec and the controversial Metis, the fees for ZK-based Loopring/ZKSync/Polygon Hermez are all lower than those for OP-based Optimism/Boba/Arbitrum.

image

Source: https://l2fees.info/

So, to what extent can Rollups improve TPS? Simply put, if Rollups occupy all the space of the mainnet, then the theoretical upper limit can reach about 100 times that of the mainnet[5]. Estimating with ZK as the upper limit, a transaction sending ETH requires about ~12 bytes, while on the mainnet it requires ~110 bytes, and the proof space needed for ZK is minimal, with the extra space required for a single ZK packaged data occupying less than 5% of Ethereum's block space. Therefore, roughly calculating, TPS could be 100 times that of the mainnet. Currently, the mainnet's daily TPS is about 15, and the theoretical upper limit TPS is about 100, so the theoretical upper limit TPS for ZK Rollups is about 10,000.

Of course, 10,000 TPS is a very ideal number and almost impossible to achieve: first, it is difficult to have only one packaged transaction in a single Ethereum block; if there are multiple transactions, the space required for verification will also increase; second, the mainnet is unlikely to sustain the theoretical upper limit, because after the implementation of EIP-1559, if the demand for block space continues to rise, fees will keep increasing until users can no longer afford them[6].

From the recent transfer data of Optimism, the simplest ETH transfer can improve TPS by about 5 to 6 times. Below is an example of the simplest ETH transfer transaction, which would consume 21,000 gas on the Ethereum mainnet but only about 3,800 gas through OP.

image

Source: https://optimistic.etherscan.io/tx/10153071

In summary, Rollups can theoretically increase the mainnet TPS by 100 times, but a more pragmatic estimate is that Optimistic Rollups can increase TPS by several times, while ZK Rollups should be able to increase it by several dozen times.

Is there a way to expand the storage space of the Ethereum mainnet and further improve TPS while maintaining security and decentralization? This is the significance of Sharding.

3.2 On-Chain Scalability: The Principles and Significance of Sharding

To continue breaking through TPS, it is necessary to expand the storage space of the mainnet, and Sharding is the technical solution to achieve this goal.

In the Sharding scheme, the mainnet is referred to as the Beacon Chain, with 64 shards above the mainnet used to produce blocks and store information. In each block production cycle (Slot, set at 12 seconds), a proposer is randomly generated within each shard to produce a shard block (Shard blob) and broadcast it to the mainnet[7].

image

Source: https://hackmd.io/@vbuterin/sharding_proposal

The idea of Sharding is somewhat similar to Rollups, both storing data through an external data layer to free up space, but Sharding employs two technologies that distinguish it from Rollups and achieve the goal: a single node does not need to download all data to verify transaction history.

The first technology is the random selection of the verification committee. For each shard block, all validators are randomly shuffled to form a one-time verification committee to verify that specific shard block. This randomness ensures that it is difficult for malicious actors to bribe all validators in the same committee for verification unless they control more than 1/3 of the validators.

image

Source: https://hackmd.io/@vbuterin/sharding_proposal

The second technology is the random sampling of data availability, meaning that each client verifying a shard block does not need to download all data but only needs to randomly sample part of the shard block to verify at least 50% of the data's validity.

image

Source: https://hackmd.io/@vbuterin/sharding_proposal

Through these steps, Sharding achieves the verification of randomly sampled nodes and randomly sampled data, no longer requiring nodes to verify the entire data of the mainnet, thus achieving the scalability of the mainnet.

So, how much scalability can Sharding contribute? According to the current design, there are 64 shards, and each shard will produce approximately 250KB of data every 12 seconds, meaning it can carry 16MB of data every 12 seconds and approximately 1.3MB of data per second. In comparison to the current state of the ETH mainnet, where each block's target carrying space is 15 million gas, a simple ETH transfer requires about ~110 bytes, consuming 21,000 gas. Assuming an average of 13 seconds per block, it can be estimated that the current mainnet can carry approximately ~77KB of data per second. Therefore, Sharding can bring about ~17 times (1.3MB/77KB) performance improvement.

Sharding does not have a clear timeline expectation. Although the official plan is for 2023, given that the Merge has not yet been implemented as scheduled, the expectation for 2023 may be overly optimistic. Current scalability relies on L2 solutions.

3.3 Overview of Leading L2 Projects

Arbitrum, Optimism, ZKSync, and StarkNet are currently the four most mainstream L2 projects. Reviewing the basic information of these projects reveals:

1) The OP series is more mature, with Arbitrum occupying the top spot in TVL, far ahead of ZK series projects like ZKSync and StarkNet. The ZK series has high technical difficulty, is not inherently compatible with EVM, and has a slower ecological development.

2) Whether OP series or ZK series, they are backed by strong capital forces. In September last year, Arbitrum was valued at $1.2 billion, and in May this year, StarkNet's parent company stunned Web3 with an $8 billion valuation. Leading crypto investment institutions like a16z and Paradigm have bet on both OP and ZK projects. Optimism has just issued its token; although its initial performance was not great, its FDV is still $5 billion; in addition, the other three have yet to issue tokens, which is also a wave of potential airdrops to look forward to.

image

Overview of mainstream L2 projects, produced by Chain Teahouse.

4. Conclusion

The "change in consensus logic" and "scalability" of Ethereum constitute the two main themes of Ethereum's upgrade. This article has elaborated on these two parts, introducing the changes and impacts of consensus logic, various scalability solutions, and their implementation levels.

The purpose of the Ethereum Merge (The Merge) is to shift the consensus logic from POW to POS, significantly reducing energy consumption; however, since the execution logic does not change and the computational storage space of Ethereum remains unchanged, there is essentially no impact on TPS and fees. After the Merge, the issuance rate of ETH will significantly decrease, resulting in slight deflation.

In parallel, the scalability (Scaling) process of Ethereum aims to enhance Ethereum's processing performance/TPS, and only after the supply capacity increases can the fees, which are priced based on supply and demand, decrease. Scalability is divided into on-chain and off-chain categories, with on-chain referring to changes in the operational logic of the Ethereum mainnet, adopting the Sharding scheme to partition the mainnet into 64 sub-blockchain partitions; however, the timeline for implementation remains distant. Before this scheme is realized, the Ethereum community will focus on the Rollups solution within off-chain scalability as a medium-term path, and four major mainstream L2 projects have emerged in this track, with individual project valuations in the billions of dollars.

An interesting question is how Rollups and Sharding will combine in the future. Vitalik's ideal hypothesis is that the utility of both will be additive: ZK Rollups can theoretically increase TPS by ~100 times, and Sharding can theoretically increase it by ~20 times. Assuming ETH's TPS is 50 (currently around ~15), the theoretical upper limit for Ethereum's TPS could reach ~100,000, far exceeding Visa's 1,000 to 4,000. However, this hypothesis is overly idealistic and almost impossible to achieve.

A pragmatic estimate is that current OP Rollups can increase TPS by ~5 times, while ZK Rollups should be able to increase it by several dozen times. Nevertheless, ZK's potential for performance enhancement remains impressive, far surpassing OP, but due to its lack of inherent support for EVM and limited use cases, its ecosystem lags behind OP. If ZK achieves friendly compatibility with EVM and its potential is fully realized, OP's ecosystem may suffer. In fact, it is possible that ZK alone could achieve ~1,000 TPS, raising the question of whether Sharding would still be necessary.

Although the Ethereum Merge has been postponed, it is expected to conclude the POW mechanism by the end of 2022. Meanwhile, L2 projects are gearing up, with multiple projects set to issue tokens, which is likely to attract a new wave of users and capital. The road to Ethereum's upgrade is long, but it will ultimately impact the landscape of public chains.

ChainCatcher reminds readers to view blockchain rationally, enhance risk awareness, and be cautious of various virtual token issuances and speculations. All content on this site is solely market information or related party opinions, and does not constitute any form of investment advice. If you find sensitive information in the content, please click "Report", and we will handle it promptly.
ChainCatcher Building the Web3 world with innovators