Original title: "Ouyi OKEx Research Institute: Ethereum Midfield War---Rollup Reality and False"
Original source: Ouyi OKEx
Summary
< span style="text-indent: 21pt;">
Since the birth of Ethereum, its low transaction processing Due to the lack of capacity, the Ethereum network is often blocked, and the Gas fee is high, which seriously limits the development of the Ethereum ecosystem. For this reason, the expansion of Ethereum has been concerned by the market. In the context of the DeFi explosion, Layer 2 expansion solutions such as side chains, state channels, and Plasma cannot meet the requirements of the market. Rollup has become the darling of the times.
Of course, Rollup is not a pure Layer 2 solution, but more like a mixture of Layer 1 and Layer 2: data is calculated off-chain, packed and compressed, and then stored on-chain. In addition, in order to solve the authenticity and validity of data and ensure the security of assets, Rollup has launched ZK-Rollup which uses "validity proof" and Optimistic Rollup which uses Plasma "fraud proof".
In general, ZK-Rollup and Optimistic Rollup have their own advantages and disadvantages. ZK-Rollup is suitable for non-contract fields such as payment and trading, with low cost and fast speed; and Optimistic Rollup is currently suitable for smart contract applications due to the existence of OVM ; But as ZK-Rollup projects launch Turing-complete EVM, ZK-Rollup may replace Optimistic Rollup in the future.
However, the upper limit of Rollup’s expansion depends on the upper limit of block Gas consumption, so it can only become the short-to-medium-term expansion plan of Ethereum in the future , to solve the urgent need of the DeFi ecology. In the long run, to fundamentally solve the scalability problem of Ethereum, we also rely on the smooth realization of Ethereum 2.0 sharding technology.
It is worth noting, however, that the Rollup protocol captures value and is economically sustainable. It is foreseeable that the tokens issued by the Rollup project will have huge investment potential.
After nearly two years of dormancy, Ethereum’s Rollup expansion plan has finally come to fruition: In February this year, Optimism announced the completion of the A round of financing and will launch the mainnet in March; ZkSync from Matter Labs , its mainnet was also launched last year, and will launch a Turing-complete smart contract this year; in addition, another Rollup solution that has attracted the attention of the industry --- Arbitrum, will also be launched on the mainnet this year.

Source: Ouyi OKEx Academy
At the end of the night in Rollup At that time, the market was also full of expectations and pursuit of it. But from the actual situation, many investors and Ethereum users do not have a clear understanding of Rollup, but a consensus has been reached on the whole: Rollup is very important and is the future of Ethereum.
The first half of this sentence is correct, Rollup For the current Ethereum, it is indeed important; but the second half is not accurate, Rollup is not the future of Ethereum. To be more precise, Rollup only represents Ethereum's short-to-medium-term expansion plan, and it is a halftime battle for Ethereum to solve the problem of network congestion. In the long run, to fundamentally solve the scalability problem of Ethereum, we must rely on Ethereum 2.0 The smooth implementation of sharding technology.
To correctly understand and predict the future of Rollup, To grasp the wealth opportunities, we also need to analyze Rollup's historical context, principles and mechanisms.
Since the birth of Ethereum, its inefficient performance has been constantly affected by the market: the TPS (transaction processing capacity) of the Ethereum network is about 15 transactions per second, while the Visa network is 2000 transactions per second seconds, Alipay reached 500,000 transactions per second during Double Eleven. The low transaction processing capacity leads to frequent blockages of the Ethereum network and high Gas fees, especially during the bull market in 2017 and the DeFi (decentralized finance) wave that has emerged since 2020. Serious This restricts the further development of the Ethereum ecology.

Source: Etherscan, OKEx Research Institute
Solving blockchain The congestion of the network and the improvement of the scalability of the public chain have gradually become the focus of the industry. Various blockchain expansion schemes are also coming in, mainly including two categories: on-chain expansion scheme, also called Layer 1 scheme, which mainly achieves expansion by increasing the transaction capacity of the blockchain itself. Common Layer1 solutions include increasing block capacity (for example, BCH uses a large block with a capacity of 32M), isolated witness (BTC, which separates digital signatures from transaction data, and changes the original block structure to achieve expansion), fragmentation technology (Ether Square 2.0, divide the status and historical records of the main chain into different shards to achieve expansion). The off-chain expansion solution, also known as the Layer2 solution, mainly executes most transactions off-chain through the second-layer protocol to reduce costs and improve efficiency. The current mainstream Layer 2 solutions include state channels, side chains, and Plasma.

Source: Ou Yi OKEx Research Institute
In the early days of Ethereum development, people generally believed that Sidechain technology is the best solution to the problem of blockchain expansion. The so-called side chain, that is, another independent blockchain parallel to the main chain, realizes the expansion of the main chain by transferring some transactions to the side chain in a managed manner, but this brings two serious problems: first, the side chain The security of the funds on the chain cannot be guaranteed. Once a hacker controls a certain side chain, the funds on the side chain can be stolen; secondly, the side chain cannot guarantee the availability of data. As long as the hacker controls the side chain, You can refuse to share the underlying transaction data, causing a major blow to the security of the main chain.

Source: Ouyi OKEx Research Institute
In order to solve the problems existing in the side chain and realize the Ethereum In 2017, Ethereum founder Vitalik launched a Layer 2 expansion solution called "Plasma". The special feature of Plasma is that it has designed a set of fraud proof mechanism: Plasma sends specific underlying data to users for safekeeping, which solves the problem of data availability; in addition, Plasma has an "exit period" design, even if hackers obtain side When trying to withdraw the control of the chain and try to withdraw, any user can submit evidence to challenge within the "exit period". If the challenge is successful, no one can withdraw this asset, and the operator will also be fined, thus ensuring The authenticity, validity and accuracy of the data solve the problem of financial security.
However, Plasma solves the problem of side chains, but creates new problems: First, users must go online every two weeks , to realize the monitoring of the Plasma chain, otherwise the "exit period" is missed, and the hacker can take out the assets; secondly, the user must save the underlying transaction data by himself to ensure the availability of the data, but it brings huge storage to the user. cost. Therefore, Plasma is not user-friendly and has a very poor experience. In the context of the big bear market in 2018, the Plasma solution that was once based on the high hopes of the Ethereum community was gradually abandoned.
In fact, even without the big bull market in 2018, it would be difficult for Plasma to adapt to the development of the Ethereum ecosystem---from 2019 At the beginning, DeFi gradually emerged, and AMM represented by Uniswap has become one of the best. For liquidity providers (LPs) on Uniwap, the assets stored in the trading pool are easy to change, and it is impossible to meet the requirements of the Plasma scheme for LPs to perform challenge verification every time they trade. In fact, a large number of DeFi protocols can change the account status without the user's consent, so Plasma is doomed to decline in the DeFi era.

< /p>
Source: OKEx Research Institute
The same , the state channel also has the problems faced by side chains and Plasma: the state channel cannot represent objects that do not logically have clear owners (such as Uniswap), and all objects need to have clear asset owners.
Therefore, as DeFi is becoming more and more important to the Ethereum ecosystem today, whether it is a state channel, a side chain, or Plasma, None of them can meet the actual needs of Ethereum. Rather than saying that V God played a decisive role in promoting Rollup, it is better to say that the era chose Rollup. So what's so special about Rollup?
Before analyzing Rollup, we might as well understand the expansion method of Plasma: under the chain, the Plasma operator will aggregate the transactions waiting for batch processing to generate a Mei Merkle Tree, each leaf in the tree 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, and at the same time sends the branch of the Merkle tree to the user for safekeeping.
Therefore, the main chain actually only saves the hash value of the Merkle root, and the Merkle root The index of the branch leaf can be used to find the specific transaction information in the branch leaf, but these specific transaction information is stored off-chain by the user, thus saving a lot of space in the blocks on the chain and realizing the expansion of the main chain.

Source: Plasma White Paper, OKEx Research Institute
But as mentioned earlier, users save specific transaction information off-chain, which discounts data availability and is not suitable for DeFi applications. To this end, the Ethereum community proposed a new solution: compress transaction data and put it on the chain, which is the Rollup (aggregation) solution.
Specifically, Rollup compresses transaction data into a Merkle tree and stores it on the chain; The root of the Merkle tree (state root) is saved in the contract. The Rollup operator can publish a batch of summary transactions (Batch), which is a compressed set of transactions and includes the previous state root and the new state root (the new Merkle tree root after processing the transaction). The smart contract checks and updates the state root, thereby realizing the transfer of assets.
Of course, we can see from the above that Rollup is not a pure Layer 2 solution, but more like Layer 1 A hybrid with Layer 2: data is calculated and packaged off-chain, but stored on-chain. Therefore, it is more appropriate to call Rollup a half-chain expansion or semi-layer 2 solution.
< br>
Source: Vitalik.An Incomplete Guide to Rollups, OKEx Research Institute
< br>
Using an image metaphor, now we want to save a lot of movies, Plasma is similar to how we store movies On the computer, and then only save a directory file on the U disk, according to the guidance of this directory file, we can easily find the location of any movie in the computer; and the Rollup method is to compress the movie first, and then Then save all to the U disk. In this way, we can store more movies in the U disk.
So how does Rollup achieve compression? ---It is mainly to compress the parameters of the transaction, mainly including Nonce, Gasprice, Gas, To, Value, Signature, as shown in the following table:
p>

Source: Vitalik.An Incomplete Guide to Rollups, OKEx Research Institute
p>
In the past, a transaction required 112 bytes of storage space, but now it only requires 12 bytes of space, and one byte costs about 16 Gas; while on Ethereum, the upper limit of Gas is 12.5 million, we Assuming that Rollup needs to spend 500,000 Gas, then on Rollup, its transaction processing capacity is:
< br>
At present, a transfer on Ethereum needs to consume about 21,000 Gas, which means that if all of them are used for transfer, the maximum transaction processing capacity of Ethereum is: Upper limit of block gas consumption/gas consumption of a single transfer/block generation time = 12,500,000 / 21,000 /13 = 45 transactions/second
This means that Rollup reduces the TPS of Ethereum in the transfer scenario by 100 times. Similarly, according to Vitalik's calculations, in the ERC20 transfer and Uniswap application scenarios, the Ethereum TPS can be expanded by 100-400 times under the same conditions.
The previous analysis has been very smooth, but we have overlooked an important issue similar to side chain technology: how to prevent Rollup operators What about falsifying data to steal assets? The Ethereum community has proposed two solutions: ZK-Rollup using "validity proof", and Optimistic Rollup using Plasma's "fraud proof".
First of all, let's look at the ZK-Rollup scheme for proof of validity. ZK-Rollup uses ZK-SNARK (concise non-interactive zero-knowledge proof, zero-knowledge succinct non-interactive argument of knowledge) to ensure the security of transactions.
"Zero Knowledge Proof (ZKP)" was developed by S.Goldwasser, S.Micali and C.Rackoff in the 1980s Originally proposed, it means that the prover can convince the verifier that a certain assertion is correct without providing any useful information to the verifier.
A classic example: a circular corridor with a gap, the exit and entrance are very close (within the eye distance) , but somewhere in the middle of the corridor there is a door that can only be opened with a key, and Alice needs to prove to Bob that she has the key to the door. Using zero-knowledge proof, Bob watches Alice enter the corridor from the entrance, and then walk out of the corridor from the exit. At this time, Bob does not get any information about the key, but it can be proved that Alice has the key.

Source: OKEx Research Institute
From the above we can see that ZKP has computational asymmetry. In the ZK-Rollup scheme, the Rollup operator invests a lot of resources to perform ZK-SNARK calculations and put them in a summary transaction (batch), while the smart contract (verifier) can quickly and cost-effectively prove transaction security. Therefore, ZK-Rollup has many advantages: it can verify the authenticity of data concisely and quickly while protecting privacy; but its disadvantages are large amount of calculation, high technical difficulty and difficulty in supporting virtual machines.
In the previous Plasma scheme, we have already introduced its The designed "fraud proof" mechanism can realize the authenticity, validity and accuracy of transaction data and ensure the security of assets. Optimistic Rollups follow exactly this mechanism: this type of Rollup keeps track of all historical state roots and hashes for each batch. If anyone discovers that the post-state root of a batch is incorrect, they can post a proof to the blockchain that the batch was miscalculated. The smart contract verifies the proof and rolls back the batch and subsequent batches.
Optimistic chose Plasma's fraud proof mechanism, which means that there is a long "exit period" like Plasma (about a week ), which greatly reduces the utilization efficiency of funds, but 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", which can effectively solve the problem of offsetting capital utilization. question. In addition, the most important thing is that Optimistic Rollup also inherits Plasma's OVM, which means that smart contracts compatible with Ethereum EVM can be deployed on the Optimistic Rollup network, which is especially important for DeFi.

Source: Vitalik.An Incomplete Guide to Rollups, OKEx Research Institute
In general, ZK-Rollup and Optimistic Rollup have their own advantages and disadvantages, and ZK-Rollup is suitable for payment, Non-contract fields such as transactions are low-cost and fast; Optimistic Rollup is currently suitable for smart contract applications due to the existence of OVM; however, as ZK-Rollup projects launch Turing-complete EVM, ZK-Rollup may replace Optimistic Rollup.
From the above we can see that, compared with other Layer2 solutions, Rollup can better guarantee data security and data availability , but is Rollup really the future of Ethereum?
No, it can be seen from the expansion plan of Rollup that the upper limit of block Gas consumption is the upper limit of the Rollup plan. This is similar to taking the subway during the morning rush hour. In order to make the subway car (block) hold more people, we squeeze more people into the car (compression). However, no matter how compressed, there is an upper limit. With the continuous development of blockchain applications in the future, will we only be satisfied with a maximum expansion of 100 times? So in the long run, the future of Ethereum expansion still depends on the smooth realization of Ethereum 2.0 sharding technology.
However, according to the official plan of Ethereum, the realization of Ethereum 2.0 sharding may have to wait until 2030. But even at present, due to the popularity of DeFi, Ethereum is already overcrowded and Gas fees are high. Layer 2 solutions such as state channels and Plasma a few years ago cannot meet the requirements of DeFi, and sharding technology is a distant goal. It is precisely because "the past cannot be dissuaded, and the coming cannot be pursued", so Rollup has naturally become the best solution to deal with Ethereum's expansion plan in the short and medium term, and has become a midfield relay towards Ethereum 2.0.
Of course, another reason why Vitalik promotes Rollup is that the Rollup protocol can capture value and is economically sustainable.
Let’s talk about the economic value first, Rollup can alleviate the congestion of Ethereum and reduce the gas fee. Part of the saved cost can be converted into the revenue of the Rollup agreement (such as charging and MEV), and it is economically sustainable.
So why can Rollup capture value? This is related to the particularity of Rollup: the data is placed on the main chain, and only the data calculation is performed off the chain. This hybrid solution between Layer 1 and Layer 2 makes Rollup a special Dapp application on the main chain. Therefore, the Rollup project can issue tokens based on the Rollup protocol on the main chain, and the value of the protocol can be captured through tokens.
It is foreseeable that in the next few months Rollup After the outbreak, there will be many Rollups issuing project tokens. Those projects that are willing to attach the economic value of the agreement to the tokens will have great investment potential.
This article is from a contribution and does not represent the opinion of Rhythm BlockBeats
Welcome to join the official BlockBeats community:
Telegram Subscription Group: https://t.me/theblockbeats
Telegram Discussion Group: https://t.me/BlockBeats_App
Official Twitter Account: https://twitter.com/BlockBeatsAsia