Let’s take a look at the TVL data released from l2beat before reviewing the history of these 4 scaling solutions of Layer2.
From the perspective of TVL, almost all of the top 15 projects adopt Rollup scaling solution, with Plasma and Validium each accounting for one. The proportion of TVL from the current Rollups technical route has exceeded 95%, and the two top projects, Arbitrum and Optimism of OP Rollup, account for nearly 80% of the total Layer2. This well proves the dominance of Rollup in the current Layer2 market.
It is noteworthy that the Polygon PoS with a $1.3B TVL wasn’t counted by l2beat. This is due to the fact that the definition of L2 becomes more precise and sidechains are considered irrelevant with L2 according to l2beat.
Ethereum community members like Vitalik have expressed their recognition of Rollups multiple times from the perspective of technical development and community consensus. Moreover, Vitalik has publicly announced that Ethereum main chain will follow the path of “Rollup-centric” with constant updates.
So why did Rollup become the mainstream solution? How were the other scaling solutions eliminated?
State channels: limited scenario
The state channel is the earliest L2 scaling solution, and everyone may have known it when they heard of the L2 solutions for the first time: for both sides with frequent transactions, they can build a “transaction channel” off the chain, which enables settlement after completing a stage of frequent transactions. In this way, the occupation and cost consumption of the network on the chain for each transaction alone is avoided.
This solution has been developed and applied to Bitcoin, which is absolutely centered on payment scenarios, and has evolved into the current Lightning Network; but for Ethereum, which is full of smart contracts and has a variety of application scenarios, its limitations are quite obvious. In addition, there are better alternatives in terms of subsequent technical solutions.
Sidechains: security issues and the “Authentic L2”
Sidechain refers to a new blockchain built on the main chain, aiming to share the burden of transactions on the main chain. The mechanism, consensus nodes, and operation of the sidechain are independent from the main chain. To some extent, it can be regarded as an independent public chain. At the beginning of its creation, a sidechain naturally established a relatively close data channel with the main chain of Ethereum. Current popular sidechain projects include Polygon PoS (The Polygon chain), Ronin(a sidechain designed for Axie Infinity) and xDai.
Generally speaking, sidechains are designed to focus on better performance, but their security level is much lower than that of the main chain. If the sidechain is attacked after you transfer your asset, there is no way to get your asset back, which won’t happen in the following mentioned Layer2 solutions. For example, on March 23, 2022, more than 173,600 ETH and 25.5 million USDC were stolen in a hack. As for the owners of these assets, their belongings were permanently gone.
The reason why Ethereum can firmly top the ranking of public chains is its exceptional level of decentralization and robust security that far exceeds other public chains. As an L2 solution that can not inherit the security level of the Ethereum main chain, the concept of sidechain is actually difficult to thrive.
In fact, the concept of “Authentic L2” has emerged in some L2 technical discussions, which defines L2 more clearly: the scaling solution needs to inherit the security level of the main chain; which means, if L2 goes wrong due to vulnerabilities or infrastructure failures, L1 will protect the user’s assets within the smart contract bridge. Under this definition, ordinary sidechains no longer belong to the category of L2.
Plasma：malicious attacks and inconvenient withdrawl
At the beginning of 2017, Vitalik Buterin and Joseph Poon posted an article and introduced a brand-new scaling solution called Plasma.
Originally, the Plasma white paper described a mechanism for constructing a MapReduce “Merkle Tree”. Each node on the tree represents a unique blockchain that connects to its parent node, all of which are arranged in a giant hierarchy. Plasma’s design minimizes the trust requirements for sidechain operators. Plasma prevents funds from being stolen even if the service provider (or majority in consensus) misbehaves. But in real-world scenarios, Plasma creates more problems than solutions. In 2018, the Ethereum research community tried to improve Plasma and proposed a new version called Plasma Cash, which enables high trading volume per second with no upper limit.
Nevertheless, Plasma Cash did bring some new issues like:
- First, malicious users or past owners of tokens might withdraw by mistakes. Because users need to prove that they own their tokens, it is actually up to these users to discover and question that their money has been scammed. Therefore, Plasma Cash, like Plasma MVP, requires users to go online at least once every two weeks in order to spot unintentional withdrawals in a timely manner.
- Furthermore, in order to prove ownership of a token, users must safeguard an entire history of the token and the corresponding proof of inclusion or exclusion, resulting in ever-increasing storage needs.
Till now, the Merkle Tree turned out to be a daydream, and most companies developing clients’ sides for Plasma Cash have put work on hold and their implementations are left half-finished.
Rollup：OP Rollup and ZK Rollup
The logic of Rollup scaling is to aggregate hundreds of processed transactions into a single batch and execute batch transactions on L2 chain that is parallel to the Ethereum main network. The final completed transactions are then released to the underlying blockchain (L1, Layer1) in batches only once, so as to improve transaction speed and reduce GAS fees.
Optimistic Rollup and zero-knowledge together proved that Rollup gained achievements of different levels in various solutions. Their execution logics are quite similar and the major difference lies in the verification process of transactions.
What is Optimistic Rollup?
As with the literal meaning, the Optimistic scaling solution is based on an “optimistic” mechanism, which adopts fraud-proof methods, that is, the system optimistically believes that the transaction data is correct while the data is not validated and will directly enter a waiting period. During this period, if any nodes raise objections and corroborate malicious transactions, the transaction will be cancelled; if there is no objection, then the transaction is automatically completed and written into the block when the waiting period ends. This “fraud-proof” method does not need to arrange verification in every transaction, which greatly saves computational resources and costs, and also guarantees final certainty in a timely manner.
Arbitrum and Optimism are the two most prominent solutions of OptimisticRollup, with the former ranking first and the latter ranking second. In fact, Optimism is the first company that invented Optimistic Rollup agreements which are compatible with EVM. However, Arbitrum caught up from behind, given the lag of Optimism mainnet activation. The two solutions are quite similar in terms of structure, with the major differences lying in their anti-fraud logic, and there will be a slight difference in the way they deal with compatibility issues in the future.
Optimism：adopts non-interactive fraud-proof methods with a single round
The L2 validator synchronizes the compressed data to L1 and stakes margins at the same time. If someone disputes the transaction data of the Rollup blocks, they need to initiate a challenge and also stake margins. Then the Rollup protocol will recalculate all transactions in the block on the L1 chain to determine whether it is right or wrong. Margins will be forfeited if you are on the wrong side, and those on the right side will be rewarded.
The advantage of this solution is that only a single round of interaction is required, which is much simpler in terms of design and it eliminates the need for coordination between multiple sides, allowing fraud proof to be completed instantaneously.
The problem is that although the cost is much less than that of the main chain of Ethereum, on-chain calculation costs much higher than that of the single calculation. Even if there are too many transactions that need to be recalculated, it may be limited ( gas limit ) by the size of L1 block.
Arbitrum ：adopts interactive fraud-proof methods with multiple rounds
Validators of L2 synchronize the compressed data to L1 and stake margins at the same time. If someone argues the transaction data of Rollup blocks, they need to initiate a challenge and also stake margins. The validator and the challenger continuously split the procedures with disputes off-chain through a dichotomy method until the range of disputes is narrowed to a specific step, and then this single step is determined on L1 chain to resolve the disputes efficiently.
Advantages: there is no need to worry about gas limits and disputes on chains can be settled with relatively low costs, given the method only verifies a single step.
Disadvantages: due to an increase in the number of interactions, the corresponding window design is more complex than the single-round interactive design, and the interactive fraud-proof requires multi-side cooperation to cope with the challenge, which takes longer to solve.
What is ZK Rollup?
A zero-knowledge proof is a method of proof by which one side (the prover) can prove to another (the verifier) that a secret or a statement is true without revealing any actual information. The concept was introduced by researchers at MIT in 1980, and it has always been thought that ZKPs are too complicated, therefore people humorously call it “Math for Moon.”
ZK Rollup is a scaling solution that adopts zero-knowledge validity proofs. It processes off-chain transactions in batches and generates cryptographic validity proofs to verify the authenticity of each batch of transactions. Validity proofs add batch transactions to L1 blockchain. When a transaction batch is submitted, the proof can be quickly verified by L1 contract, and invalid batches can be rejected directly.
In addition, there are multiple strategies to prove ZK scaling solutions, like SNARK, STARK, PLONK and DARK. However, data footprint, time of proof, time of verification and risks of collaboration should be taken into consideration in terms of their security levels.
Currently, there are multiple solutions that are related to ZK Rollup and the following are two major examples.
Hermez（Currently known as Polygon Hermez）
Currently, there are 2 versions of Hermez: 1.0 is a payment platform and is running smoothly; 2.0 is still under development and will adopt the ZK-SNARK zero-knowledge proof EVM (zkEVM). This is actually a transparent method to execute the EVM, including smart contracts with zero-knowledge proof. The acquisition of Hermez 2.0 was carried out by Polygon with a price of $250 million due to its innovative actions, with a brand new name coming out: Polygon Hermez.
Through the zero-knowledge proof protocol, Starkware protects the private data of blockchain, verifies private information without spending a lot of computational power and specifically installing software. In addition, it can also compress the data, thus improving efficiency, transparency and security.
Advantages and disadvantages of these two solutions
The advantages of OP: lower costs and threshold with better operability, able to excute smart contracts automatically; higher throughput; stronger scalability.
The disadvantages of OP: challenge waiting period for about 1 week; use margins and waiting period instead of algorithm to guarantee security, leading to higher risks of malicious operation.
The advantages of ZK: challenge waiting period is not required and is more efficient; higher security level; stronger privacy protection.
The disadvantages of ZK: more sophisticated technology with higher developing costs; bigger computational power and higher costs; unable to excute smart contracts directly.
The rival between OP Rollup and ZK Rollup, is actually a rival of different methods of proof–validity proof vs fraud proof. Now the Ethereum community has basically reached a consensus on this issue: in the long run, ZK Rollup will stand out as it ensures the validity of transactions in real time and is able to confirm the transaction status; but in the short and medium term, the ecosystem development of ZK will lag behind OP Rollup with lower hardware requirements and better EVM compatibility, due to the barriers of ZK technology itself and further challenges of EVM compatibility implementation