The mid-battle of Ethereum, the reality and illusion of Rollup
This article was published by OKEx Research Institute.
Abstract
Since the birth of Ethereum, its low transaction processing capacity has led to frequent congestion on the Ethereum network, with soaring Gas fees severely limiting the development of the Ethereum ecosystem. As a result, the issue of Ethereum scalability has always attracted market attention. Against the backdrop of the DeFi explosion, Layer 2 scaling solutions such as sidechains, state channels, and Plasma have failed to meet market demands, making Rollup the darling of the era.
Of course, Rollup is not a purely Layer 2 solution; it is more like a hybrid of Layer 1 and Layer 2: data is computed and packaged off-chain, and then stored on-chain. In addition, to address the authenticity and validity of data and ensure asset security, Rollup has introduced ZK-Rollup, which uses "validity proofs," and Optimistic Rollup, which employs Plasma's "fraud proofs."
In summary, ZK-Rollup and Optimistic Rollup each have their pros and cons. ZK-Rollup is suitable for non-contract areas such as payments and transactions, being low-cost and fast; while Optimistic Rollup, due to the existence of OVM, is currently suitable for smart contract applications. However, with ZK-Rollup projects launching Turing-complete EVMs, ZK-Rollup may replace Optimistic Rollup in the future.
However, the scalability limit of Rollup depends on the upper limit of block Gas consumption, so it can only serve as a short- to medium-term scaling solution for Ethereum to address the urgent needs of the DeFi ecosystem. In the long run, to fundamentally solve the scalability issue of Ethereum, it still relies on the successful implementation of Ethereum 2.0 sharding technology.
It is worth noting that the Rollup protocol can capture value and is economically sustainable. It is foreseeable that tokens issued by Rollup projects will have enormous investment potential.
After nearly two years of dormancy, Ethereum's Rollup scaling solution has finally reached the dawn of blossoming results: in February this year, Optimism announced the completion of its Series A financing and will launch its mainnet in March; ZkSync from Matter Labs also launched its mainnet last year and will introduce support for Turing-complete smart contracts this year; additionally, another highly anticipated Rollup solution—Arbitrum—will also launch its mainnet this year.
- Table 1. Progress of Rollup Solutions
|-------------------|---------------|-------------------|--------------------------| | Optimistic Rollup | Optimism | Uniswap, Compound | March 2021 | | ZK Rollups | Matter Labs | Curve, SuShiSwap | Launched testnet in 2020, Turing-complete smart contracts this year | | Arbitrum | Offchain Labs | Bancor Paraswap | Expected to launch this year |
Source: OKEx Research Institute
As the dawn of Rollup approaches, the market is filled with anticipation and enthusiasm. However, in reality, many investors and Ethereum users do not have a clear understanding of Rollup, but there is a general consensus: Rollup is important and is the future of Ethereum.
The first half of this statement is correct; Rollup is indeed important for current Ethereum. However, the second half is inaccurate; Rollup is not the future of Ethereum. More precisely, Rollup only represents Ethereum's short- to medium-term scaling solution and is a mid-game battle for Ethereum to solve network congestion issues. In the long term, to fundamentally address Ethereum's scalability issues, it still relies on the successful implementation of Ethereum 2.0 sharding technology.
To correctly understand and predict the future of Rollup and seize the wealth opportunities within, we need to analyze the historical context and underlying mechanisms of Rollup.
1. The Scalability War of Ethereum and the Rise of Rollup
Since the birth of Ethereum, its inefficient performance has been constantly criticized by the market: the TPS (transactions per second) of the Ethereum network is about 15 transactions/second, while the Visa network can handle 2000 transactions/second, and during the Double Eleven shopping festival, Alipay even reached 500,000 transactions/second. The low transaction processing capacity has led to frequent congestion on the Ethereum network, with soaring Gas fees, especially prominent during the bull market of 2017 and the DeFi wave that began in 2020, severely limiting the further development of the Ethereum ecosystem.
Figure 1. Daily Average Transactions and Gas Consumption Changes on the Ethereum Network
Source: Etherscan, OKEx Research Institute
Solving blockchain network congestion and enhancing the scalability of public chains has gradually become a focus of industry attention. Various blockchain scalability solutions have emerged, mainly divided into two categories:
On-chain scalability solutions, also known as Layer 1 solutions, primarily achieve scalability by increasing the transaction capacity of the blockchain itself. Common Layer 1 solutions include increasing block size (e.g., BCH uses 32M large blocks), Segregated Witness (BTC, separating digital signatures from transaction data to change the original block structure for scalability), and sharding technology (Ethereum 2.0, dividing the state and historical records of the main chain into different shards for scalability).
Off-chain scalability solutions, also known as Layer 2 solutions, primarily execute most transactions off-chain through second-layer protocols to reduce costs and improve efficiency. Currently, mainstream Layer 2 solutions include state channels, sidechains, and Plasma.
Figure 2. Main Blockchain Scalability Solutions
Source: OKEx Research Institute
In the early development of Ethereum, it was widely believed that sidechain technology was the best solution to the blockchain scalability problem. A sidechain is an independent blockchain parallel to the main chain, which transfers some transactions to the sidechain in a custodial manner to achieve main chain scalability. However, this brings two serious issues: first, the security of funds on the sidechain is not guaranteed; if a hacker gains control of a sidechain, they can steal funds from it. Second, sidechains cannot guarantee data availability; if a hacker controls the sidechain, they can refuse to share the underlying transaction data, significantly impacting the security of the main chain.
Figure 3. Sidechain Technology Solution Principle
Source: OKEx Research Institute
To address the issues of sidechains and achieve Ethereum scalability, Ethereum founder Vitalik introduced a Layer 2 scaling solution called "Plasma" in 2017. The uniqueness of Plasma lies in its design of a fraud proof mechanism: Plasma sends specific underlying data to users for safekeeping, solving the data availability problem. Additionally, Plasma has an "exit period" design; even if a hacker gains control of the sidechain and attempts to withdraw funds, any user can submit evidence during the "exit period" to challenge the withdrawal. If the challenge is successful, no one can withdraw the asset, and the operator will be penalized, thereby ensuring the authenticity, validity, and accuracy of the data and solving the issue of fund security.
However, while Plasma solved the problems of sidechains, it created new issues: first, users must go online every two weeks to monitor the Plasma chain; otherwise, if they miss the "exit period," hackers can withdraw assets. Second, users must store the underlying transaction data themselves to ensure data availability, which imposes significant storage costs on users. Therefore, Plasma is not user-friendly and has a poor experience. In the context of the bear market in 2018, the Plasma solution, once highly anticipated by the Ethereum community, was gradually abandoned.
In fact, even without the bear market of 2018, Plasma would struggle to adapt to the development of the Ethereum ecosystem—since 2019, DeFi has gradually risen, with AMMs represented by Uniswap becoming the leaders. For liquidity providers (LPs) on Uniswap, the assets stored in the trading pool can easily change, making it impossible to meet Plasma's requirement for LPs to challenge and verify every transaction. In fact, many DeFi protocols can change account states without user consent, making Plasma destined to decline in the DeFi era.
Figure 4. Evolution of Layer 2 Scaling Solutions
Source: OKEx Research Institute
Similarly, state channels also face the issues encountered by sidechains and Plasma: state channels cannot represent objects that logically have no clear owner (e.g., Uniswap), as they require objects to have clear asset ownership.
Therefore, in today's context where DeFi is becoming increasingly important to the Ethereum ecosystem, neither state channels, sidechains, nor Plasma can meet the real needs of Ethereum. Rather than saying that Vitalik played a decisive role in promoting Rollup, it is more accurate to say that the era has chosen Rollup. So what is special about Rollup?
2. Rollup Principle Analysis
Before analyzing Rollup, let's understand the scalability method of Plasma: off-chain, Plasma operators aggregate transactions waiting for batch processing, generating a Merkle Tree, where each leaf can represent the information of a transaction asset; if there is no transaction, the leaf value is 0. Subsequently, Plasma sends the root of the Merkle Tree to the main chain while sending the branches of the Merkle Tree to users for safekeeping.
Thus, the main chain only retains the hash value of the Merkle Tree root, and through the index of the Merkle Tree root, specific transaction information can be found in the branch leaves. However, this specific transaction information is stored off-chain by users, saving a significant amount of space on-chain and achieving scalability for the main chain.
Figure 5. Plasma Scalability Principle
Source: Plasma White Paper, OKEx Research Institute
However, as mentioned earlier, having users store specific transaction information off-chain compromises data availability and is not suitable for DeFi applications. To address this, the Ethereum community proposed a new solution: compressing transaction data and storing it on-chain, which is the Rollup (aggregation) solution.
Specifically, Rollup compresses transaction data into a Merkle Tree and stores it on-chain; at the same time, it retains the root of the Merkle Tree (state root) in a smart contract. The Rollup operator can publish a batch of aggregated transactions (Batch), which is a collection of compressed transactions that includes the previous state root and the new state root (the new Merkle Tree root after processing transactions). The smart contract checks and updates the state root, thereby achieving asset transfer.
Of course, from the above, we can see that Rollup is not a purely Layer 2 solution; it is more like a hybrid of Layer 1 and Layer 2: data is computed and packaged off-chain but stored on-chain. Therefore, it is more appropriate to refer to Rollup as semi-off-chain scaling or a semi-layer 2 solution.
Figure 6. Rollup Scalability Principle
Source: Vitalik. An Incomplete Guide to Rollups, OKEx Research Institute
To illustrate, if we want to store many movies, Plasma is like storing the movies on a computer and only keeping a directory file on a USB drive. Based on this directory file, we can easily find the location of any movie on the computer; whereas Rollup's method is to compress the movies first and then save them all on the USB drive. This way, we can store more movies on the USB drive.
So how does Rollup achieve compression?—mainly by compressing transaction parameters, including Nonce, Gas price, Gas, To, Value, Signature, as shown in the following table:
- Table 2. Rollup Compression Method
|-----------|---------------|----------------------| | Parameter | Original Storage Size (bytes) | Storage Size under Rollup (bytes) | | Nonce | >3 | 0 | | Gas price | >8 | 0-0.5 | | Gas | 3 | 0-0.5 | | To | 21 | 4 | | Value | >9 | >3 | | Signature | >68 | >0.5 | | From | 0 | 4 | | Total Storage Size (bytes) | >112 | >12 |
Source: Vitalik. An Incomplete Guide to Rollups, OKEx Research Institute
In the past, a transaction required 112 bytes of storage space; now it only requires 12 bytes of space, with one byte costing about 16 Gas; and on Ethereum, the Gas limit is 12.5 million. Assuming Rollup requires 500,000 Gas, then on Rollup, its transaction processing capacity is:
(Block Gas consumption limit -- Rollup Gas consumption) / Gas consumption per byte / Bytes per transaction / Block time = (12,500,000 -- 500,000) / 16 / 12 / 14 = 4464 transactions/second
Currently, a transfer on Ethereum consumes about 21,000 Gas, which means if all are used for transfers, Ethereum's maximum transaction processing capacity is: Block Gas consumption limit / Gas consumption per transfer / Block time = 12,500,000 / 21,000 / 13 = 45 transactions/second.
This means Rollup increases Ethereum's TPS by 100 times in transfer scenarios. Similarly, according to Vitalik's calculations, in ERC20 transfers and Uniswap application scenarios, Ethereum's TPS can be expanded by 100-400 times under the same conditions.
The previous analysis has gone smoothly, but we overlooked an important issue similar to sidechain technology: how to prevent Rollup operators from fabricating data to steal assets? The Ethereum community proposed two solutions: ZK-Rollup using "validity proofs" and Optimistic Rollup using Plasma's "fraud proofs."
3. ZK-Rollup VS Optimistic Rollup
First, let's look at the ZK-Rollup solution that implements validity proofs. ZK-Rollup uses ZK-SNARK (Zero-Knowledge Succinct Non-Interactive Argument of Knowledge) to ensure the security of transactions.
"Zero-Knowledge Proof (ZKP)" was proposed by S. Goldwasser, S. Micali, and C. Rackoff in the early 1980s, referring to the ability of the prover to convince the verifier that a statement is true without providing any useful information.
A classic example: there is a circular corridor with a gap, where the exit and entrance are very close (within sight), but somewhere in the middle of the corridor, there is a door that can only be opened with a key. Alice wants to prove to Bob that she has the key to that door. Using zero-knowledge proof, Bob watches Alice enter the corridor from the entrance and then exit the corridor. At this point, Bob has not received any information about the key but can fully prove that Alice possesses it.
Figure 7. Zero-Knowledge Proof Example
Source: OKEx Research Institute
From the above, we can see that ZKP has computational asymmetry. In the ZK-Rollup scheme, the Rollup operator invests significant resources to perform ZK-SNARK computations and includes them in the aggregated transactions (batch), while the smart contract (verifier) can quickly and cost-effectively verify transaction security. Therefore, ZK-Rollup has many benefits: it can verify the authenticity and validity of data quickly while protecting privacy; but its drawbacks are high computational load, technical complexity, and difficulty in supporting virtual machines.
In the earlier Plasma scheme, we introduced its designed "fraud proof" mechanism, which can ensure the authenticity, validity, and accuracy of transaction data, thus guaranteeing asset security. Optimistic Rollups adopt this mechanism: this type of Rollup tracks all historical state roots and the hash values of each batch. If anyone finds that the post-state root of a batch is incorrect, they can submit a proof to the blockchain to demonstrate that the batch was computed incorrectly. The smart contract will verify the proof and roll back that batch and any subsequent batches.
Optimistic Rollup's choice of Plasma's fraud proof mechanism means there is a lengthy "exit period" (about a week), which greatly reduces the efficiency of fund utilization. However, the good news is that with the maturity of the DeFi ecosystem, a large number of liquidity providers can provide funds for users during the "exit period," effectively addressing the issue of fund utilization offset. Additionally, most importantly, Optimistic Rollup inherits Plasma's OVM, which means that smart contracts compatible with Ethereum EVM can be deployed on the Optimistic Rollup network, which is particularly important for DeFi.
- Table 3. Performance Comparison of ZK-Rollup and Optimistic Rollup
|----------------|---------------------------------------|----------------------------------------------| | Feature | Optimistic Rollups | ZK Rollups | | Fixed gas consumption per batch | About 40,000 (light transactions, mainly just changing the state root value) | About 500,000 (large computation required for verifying ZK-SNARK) | | Withdrawal period | About a week (withdrawals have delays, need time to submit fraud proofs; if fraud occurs, withdrawal must be canceled) | Extremely fast (only needs to wait for the next batch) | | Technical complexity | Low | High (ZK-SNARK is a very new technology and mathematically complex) | | Generality | Easy to achieve (general EVM rollups are about to launch on the mainnet) | More difficult to achieve (using ZK-SNARK proofs for general EVM execution is more complex than simple computation proofs) | | Gas consumption per on-chain transaction | Relatively high | Relatively low | | Off-chain computation cost | Relatively low (although requires a lot of full nodes to recompute) | Relatively high (ZK-SNARK proofs specifically for general computation can be very expensive, potentially thousands of times more than directly running computations) |
Source: Vitalik. An Incomplete Guide to Rollups, OKEx Research Institute
In summary, ZK-Rollup and Optimistic Rollup each have their advantages and disadvantages. ZK-Rollup is suitable for non-contract areas such as payments and transactions, being low-cost and fast; while Optimistic Rollup, due to the existence of OVM, is currently suitable for smart contract applications. However, as ZK-Rollup projects launch Turing-complete EVMs, ZK-Rollup may replace Optimistic Rollup in the future.
4. The Future of Rollup and Wealth Opportunities
From the above, we can see that compared to other Layer 2 solutions, Rollup can better ensure data security and availability. However, is Rollup really the future of Ethereum?
Not necessarily. From the Rollup scalability solution, it can be seen that the upper limit of block Gas consumption is also the upper limit of the Rollup solution. This is similar to taking the subway during rush hour; to fit more people into the subway car (block), we can squeeze more people into the car (compression). However, no matter how much we compress, there is a limit. In the future, as blockchain applications continue to develop, will we be satisfied with merely expanding capacity by 100 times? Therefore, in the long term, the future of Ethereum's scalability still depends on the successful implementation of Ethereum 2.0 sharding technology.
However, according to Ethereum's official plan, the implementation of Ethereum 2.0 sharding may have to wait until 2030. But even now, due to the popularity of DeFi, Ethereum is already overcrowded, with high Gas fees. Previous Layer 2 solutions like state channels and Plasma cannot meet the demands of DeFi, and sharding technology is still a distant goal. It is precisely because "what has passed cannot be pursued, and what is to come cannot be chased," that Rollup naturally becomes the best solution for addressing Ethereum's scalability in the short to medium term, serving as a relay to Ethereum 2.0.
Of course, another reason Vitalik strongly promotes Rollup is that the Rollup protocol can capture value and is economically sustainable.
First, regarding economic value, Rollup can alleviate Ethereum's congestion and reduce Gas fees. The cost savings can be partially converted into revenue for the Rollup protocol (e.g., through fees and MEV[1]), making it economically sustainable.
So why can Rollup capture value? This is related to the uniqueness of Rollup: data is stored on the main chain, with computations performed off-chain. This hybrid solution between Layer 1 and Layer 2 allows Rollup to become a special DApp application on the main chain, enabling Rollup projects to issue tokens based on the Rollup protocol on the main chain, capturing the value of the protocol through tokens.
It is foreseeable that after the explosion of Rollup in the coming months, numerous Rollup projects will issue tokens, and those willing to attach the economic value of the protocol to their tokens will see their tokens have significant investment potential.
[1] Note: MEV, or Miner Extractable Value, refers to a measure of the profits miners (or validators, orderers, etc.) can obtain through their ability to include, exclude, or reorder transactions within the blocks they produce.