The Rollup War of Ethereum Layer2

CN
1 year ago

Basic Introduction

The Rollup War of Ethereum Layer2

Layer2 is one of the key solutions designed to address the scalability issues of Ethereum. By building an additional network layer on top of the Ethereum main chain, it allows for processing more transactions while maintaining the security and decentralization features of the main chain.

Rollup is a Layer2 scaling solution that processes transactions off-chain and then "packs" transaction data into the main chain. Its security is guaranteed by Layer1 and is currently the most mainstream Layer2 scaling solution. Compared to other off-chain transaction solutions such as state channels, sidechains, and Plasma, Rollup has three characteristics:

  1. Layer2 is a relatively independent platform from Layer1, and all participating users are independent Layer2 accounts. Users can transact with other Layer2 users on the Layer2 platform, but interactions between Layer1 accounts and Layer2 accounts need to be facilitated through smart contracts deployed by the Layer2 operator on Layer1 and Layer2. The most common interaction is the transfer of tokens such as ETH.

  2. All transaction information needs to be fully recorded on the main chain, i.e., Calldata or Blob data (EIP-4844). Even if Layer2 state is lost, anyone can recover the lost state from the information stored on the main chain, addressing the data availability issues present in previous off-chain transaction solutions.

  3. Transaction execution and state changes occur on the Layer2 platform, but the state summary is published to Layer1 chain, allowing the Layer1 chain to verify through some form of data validity verification. Upon verification, the state of Layer2 will be locked on the Layer1 main chain. Depending on its data validity verification method, Rollups can be further divided into Optimistic Rollups and ZK Rollups.

The Rollup War of Ethereum Layer2

Development History of Rollup

The Rollup War of Ethereum Layer2

Sidechains were one of the earliest Layer2 solutions. As the name suggests, a sidechain is an independent blockchain pegged to the main chain (Layer1), with its own consensus model and block parameters. When pegging one blockchain to another, it means that assets can be moved between the two blockchains. When faster transactions are desired, assets can be transferred from the main chain to the sidechain for trading, and then transferred back to the main chain upon completion.

Plasma, proposed in 2017 by one of the co-authors of the Lightning Network, Joseph Poon, and Ethereum's founder Vitalik Buterin, is an evolved solution of sidechains.

A Plasma chain is an independent blockchain built outside of Ethereum, also known as a subchain, similar to the branches of a tree, with Ethereum as the main chain, also known as the root chain. Each subchain can deploy custom smart contracts on Ethereum for different business purposes. Another layer of subchains can be built on top of the Plasma chain, forming a hierarchical Plasma network. The working principle of Plasma is to divide large computing tasks into smaller tasks and distribute them to various subchains for processing. The results are then aggregated layer by layer and submitted to the upper layer, achieving fast and low-cost processing of a large number of complex computations.

Plasma requires the submission of the Merkle root of transactions occurring on the Plasma chain. When users attempt to move their assets from the Plasma chain back to the root chain, they can submit the Merkle branch of the latest transaction sending the assets to Plasma. This initiates a challenge period, during which anyone can attempt to prove that the user's Merkle branch is fraudulent. If a fraudulent branch is found, a fraud proof can be submitted. Since the root blockchain only tracks Merkle roots, it has to process much less data compared to transactions occurring on the main chain, improving the scalability of the root chain.

Plasma is an unmanaged Ethereum sidechain technology, meaning that even if the Plasma chain is maliciously attacked or validators conspire to act maliciously, assets on the Plasma chain can be safely returned to the root chain. This is the biggest difference between Plasma and sidechains that rely on their own security models to protect user assets. The representative implementation of Plasma is Polygon 1.0 (Matic).

However, Plasma has three fatal flaws:

  1. The Plasma chain requires an operator to publish the Merkle root commitment to the root chain, and the operator can execute "data availability attacks," i.e., refuse to publish certain transactions to the chain. In this case, the lack of transactions for constructing fraud proofs prevents users from withdrawing their assets.

  2. When users attempt to withdraw assets from the Plasma chain, they must submit a withdrawal transaction request and then wait for a period, known as the challenge period. At any time during the challenge period, any user can challenge another user's withdrawal by providing proof that the withdrawal is invalid.

  3. Users must monitor and verify all transactions on the Plasma chain to detect malicious node behavior and withdraw in a timely manner. However, the cost of transaction verification is high, and this monitoring requirement adds significant expenses for participating in the Plasma chain.

Due to these drawbacks, Plasma encountered development bottlenecks starting in 2019. At this time, John Adler, who served as a Layer2 scalability researcher at ConsenSys, proposed the Optimistic Rollup solution, which mainly addressed the data availability issues of Plasma by still using fraud proofs.

On the other hand, Vitalik Buterin introduced the zero-knowledge proof technology for proving the validity of block state changes in 2018, which laid the foundation for ZK Rollup. Zero-knowledge proof was first proposed by S. Goldwasser, S. Micali, and C. Rackoff in the early 1980s. It refers to the ability of the prover to make the verifier believe a statement is correct without providing any useful information. In other words, the prover convinces the verifier that they know or possess a certain message without revealing any information about the message being proven.

zk-SNARK (Zero-Knowledge Succinct Non-interactive Arguments of Knowledge) is a widely used general zero-knowledge proof scheme. It transforms any computation process into the form of a circuit and uses a series of mathematical properties of polynomials to convert the circuit into a polynomial, thereby generating non-interactive proofs, enabling the application of various complex business scenarios.

However, zk-SNARK cannot avoid the centralized trusted setup. In a trusted setup, multiple parties each generate a partial key to initiate the network and then destroy the key. If the confidential information used to create the trusted setup keys is not destroyed, it could be exploited to forge transactions through false verification.

In 2019, the Aztec research team proposed the Plonk algorithm to solve the generality problem of zk-SNARK, which is independent of the trusted setup and application, and only requires a one-time trusted setup to satisfy all applications. Moreover, the trusted setup can be arbitrarily updated, and as long as there is a trusted participant, the security of the trusted setup can be guaranteed. It can be said that the proposal of the Plonk algorithm greatly accelerated the development of ZK Rollup.

The Rollup Race

Looking at the Rollup race, the competition is currently very intense. Among the Layer2 Rollups that have been launched on the mainnet, Optimistic Rollups still occupy the majority of TVL. The main reason is that Optimistic Rollups were the first fully implemented Rollup solution. However, with the maturity of ZK Rollups technology, more and more people are starting to pay attention to and participate in the ZK Rollups ecosystem.

Optimistic Rollups

The Rollup War of Ethereum Layer2

Optimistic Rollups rely on an "optimistic" assumption that most transactions are valid and allow for challenges and rollbacks when fraudulent behavior is discovered. The Layer1 contract of Rollup does not directly verify the new state submitted by Layer2 but prepares a challenge period for each submitted new state. Since Rollup submits all transaction information to the main chain and makes it public, anyone can verify the state update (especially when it involves their own wallet). If the new state is incorrect, validators can generate a fraud proof against that incorrect state and submit it during the challenge period, invalidating the incorrect state update.

The representative solutions for Optimistic Rollups are Arbitrum and Optimism.

Arbitrum officially launched its mainnet in September 2021 and is currently the protocol with the highest TVL in Layer2.

Currently, the Arbitrum ecosystem mainly consists of three networks, including Arbitrum One, Arbitrum Nova, and Arbitrum Orbit.

  • Arbitrum One is the core Rollup chain of the current Arbitrum ecosystem, and all transaction data is stored on the mainnet Ethereum. Many L2 and on-chain ecosystem applications run on this mainnet.

  • Arbitrum Nova is a new network designed based on the AnyTrust technology, specifically for gaming, social applications, and high-throughput DApp use cases. The network's transaction data is stored off-chain and managed by a data committee DAC.

  • Arbitrum Orbit is an open-source toolkit for building Layer 3 networks, allowing developers to deploy and create their own chains. Developers can use the Orbit toolkit to build their own Rollup and AnyTrust chains (Layer 3) and choose either Arbitrum One or Arbitrum Nova as the settlement layer to achieve scalability.

Optimism went live on the mainnet in August 2021 and currently has the second-largest TVL in Layer2, second only to Arbitrum.

Optimism has achieved EVM equivalence, allowing Solidity smart contracts on Ethereum to run on Optimism's Layer2 without the need to build additional functionality. Developers can seamlessly transition to developing applications on Optimism.

OP Stack is an open-source modular toolkit launched by Optimism, covering data availability, execution, settlement, governance, and more. Developers can use the OP Stack toolkit to assemble a customized Layer2 network based on their specific needs. Therefore, OP Stack introduces the concept of a superchain to Optimism, which refers to a group of Layer2 blockchains (also known as OP chains) built on OP Stack. Currently, there are dozens of Layer networks built on OP Stack, including Base, opBNB, Magi, Worldcoin, and other heavyweight projects.

ZK Rollups

The Rollup War of Ethereum Layer2

ZK Rollups use zero-knowledge proof technology to ensure the validity and correctness of off-chain processed transactions, providing higher security and efficiency. After the state change on the Rollup Layer2 platform, a zero-knowledge proof must be provided for the correctness of the state change and submitted to the main chain. The contracts on the main chain will verify this proof to determine the correctness of the state update. Compared to the Optimistic Rollup solution, ZK Rollups do not require a long challenge period to finalize Layer2 transactions and do not rely on the assumption that incorrect state updates will be discovered during the challenge period.

The representative solutions for ZK Rollups are zkSync, StarkNet, Polygon zkEVM, and Scroll.

ZK Rollups was the first zkEVM project to go live on the mainnet, based on zero-knowledge proofs, allowing transactions to be verified without revealing underlying data. One of the main features of zkSync is the use of "optimistic" transfers, allowing users to send and receive transactions without waiting for them to be confirmed on the Ethereum blockchain. This significantly reduces transaction time and allows for higher transaction throughput. In addition to using zero-knowledge proofs and optimistic transfers, zkSync also utilizes other technologies to improve scalability and security, including signature aggregation, which allows multiple signatures to be compressed into one, and multi-chain support, which helps zkSync interact with other blockchain networks.

StarkNet uses zkSTARK for its scaling solution, a zero-knowledge proof system that allows users to prove the correctness of computations without revealing underlying data. This increases the privacy and security of the network and enables complex computations to be performed without the need to trust third parties. StarkNet also utilizes sharding, which allows the blockchain to be divided into smaller chains, or "shards," for parallel processing. This allows for greater throughput and faster transaction times, as each "shard" can be processed independently of the others.

Polygon 2.0 introduced its ZK Rollups technology, known as Polygon zkEVM. This technology uses zero-knowledge proofs to address the scalability issues of the Ethereum blockchain, making transactions on the Ethereum network faster, cheaper, and compatible at the bytecode level rather than the language level.

Scroll is a ZK Rollups compatible with EVM, supporting the same programming languages and smart contracts as Ethereum, allowing developers to easily migrate their existing applications to the Rollup network without any modifications to their code.

Conclusion

The performance issues of blockchain have made it difficult to meet current demands. Scalability solutions based on Optimistic and zero-knowledge approaches are expected to address the performance bottlenecks of blockchain, increasing transaction speed and throughput without sacrificing decentralization and security. Rollups increase blockchain throughput by moving computations off-chain, bundling a large number of transactions into a Rollup block, and generating a validity proof for that block off-chain. Layer1 smart contracts only need to verify this proof to directly apply the new state, achieving lower gas fees and higher on-chain security.

In the short term, Optimistic Rollups are likely to prevail in general EVM computations, while ZK Rollups may prevail in simple payments, transactions, and other specific application scenarios. The main reason is that although ZK Rollups are faster and more efficient than Optimistic Rollups, they do not provide a simple way for existing smart contracts to migrate to Layer2.

However, thanks to the development of emerging technologies such as blockchain and privacy computing in recent years, zero-knowledge proof technology has become an important technology for building trust. In the medium to long term, with the improvement of ZK-SNARK technology, ZK Rollups are expected to prevail in all scenarios and become the ultimate solution for Ethereum's scalability.

免责声明:本文章仅代表作者个人观点,不代表本平台的立场和观点。本文章仅供信息分享,不构成对任何人的任何投资建议。用户与作者之间的任何争议,与本平台无关。如网页中刊载的文章或图片涉及侵权,请提供相关的权利证明和身份证明发送邮件到support@aicoin.com,本平台相关工作人员将会进行核查。

Share To
APP

X

Telegram

Facebook

Reddit

CopyLink