I have learned a lot of new things recently, and I plan to systematically study the concepts that I had a superficial understanding of before, so that I can have a good basic knowledge reserve and more skills to seize more opportunities to make money. This article is a summary of my Rollup learning, and I also share with you the recent learning results:

Let’s first talk about Ethereum’s scaling battle. In the blockchain world, there is a scalability trilemma: ensuring scalability, security, and decentralization at the same time.

Ethereum is the most widely used public chain, and its ecosystems such as Defi, Gamefi, and NFT are booming. Also due to its flourishing ecosystem, Ethereum, as the first public chain, was not designed to accommodate so many ecosystems and users. Therefore, Ethereum was criticized for its slow TPS (transaction processing speed per second), which can only process about 15 transactions.

The transaction fee is too high, with a handling fee of $5-$30 for just one interaction; all Dapps (decentralized applications) share a main chain, which has poor scalability. As Ethereum has the best asset richness and abundant liquidity, its expansion plan is imperative.

In this environment, Layer2 came into being. Layer2 is regarded as the most effective expansion solution before the arrival of ETH2.0. From the definition point of view, Layer2 is a secondary layer based on the base layer, which inherits the security of the main chain and provides more transaction capacity (TPS) for the entire block.

The Layer2 solution is to keep the main chain unchanged and unaffected by what is built on it, and any problems that occur on another layer will not harm the base layer. Instead, Layer2 exists as an off-chain software that interacts with smart contracts on Ethereum.

How to understand it? I roughly think of it as a math test. There are a lot of calculation questions in this math test. It takes a lot of time and energy for me to solve the answers to these calculation questions. At this time, I found a way to ask people outside the venue to help me solve the questions. After they finish, they send me the answers. After receiving the answers, I write the answers on the test paper.

In this example, the behavior of those who help me calculate the answer can be considered as layer 2. I don't need to process a lot of data information and can get the transaction result directly. At the same time, during the process of their calculation, they have no influence on me and the test paper, they just provide the calculation result.

Well, I believe everyone has a certain understanding of the working principle of Layer2. The following are the most mainstream Layer2 solutions:

ZK Rollups

Optimistic Rollups

State Channels

Plasma

Sidechains

Hybrid Soulution

Today we will mainly talk about Rollup: ZK Rollups (zero-knowledge proof) and Optimistic Rollups (optimistic rollups)

Both of them use the Layer2 solution of Rollup. As the name implies, Rollup "packages" a bunch of things. The packaged content is expensive and computationally intensive data, which can also be understood as the math problems that need to be calculated in the previous example. The innovation of Rollup is that they move the calculation off-chain and only store minimal transaction data on the chain. This can achieve exponential scalability benefits without sacrificing security, to achieve the goal of increasing TPS.

The Rollups chain executes Ethereum transactions on its own chain, "rolls up" them, and Ethereum accepts and stores the results. However, in order to do this, the Ethereum mainnet needs to verify whether the transactions occurring off-chain are valid in some way. There are currently two ways to verify. They correspond to the two Rollup solutions mentioned above, respectively:

1. Optimistic Fraud Proof corresponds to Optimistic Rollups

2. Zero-knowledge Proof corresponds to ZK Rollups (Zero-knowledge Proof)

Let's first talk about what a fraud proof is: Assume that all transactions and data are valid, but allow someone to raise objections, set up a supervisory body to supervise it, and if it is not falsified within a certain period of time, then it is valid. In essence: This is an innocent until proven guilty model. Simple understanding: Using the example of a homework, student A handed in a homework, and the teacher assumed that he got full marks. At the same time, several students formed a review group. If they did not question the homework submitted by student A, then it was a full mark.

Let’s talk about zero-knowledge proof: it means that the prover can convince the verifier that a certain statement is correct without providing any useful information to the verifier. The following figure can simply explain zero-knowledge proof:

There are two people, Xiaolan and Xiaohuang. Then in the middle of the circle there is a door with a password lock. Xiaohuang wants to prove to Xiaolan that he knows the password to the door. Xiaohuang does not need to tell Xiaolan the password directly. He can walk in from 1 and walk out from 2. When Xiaohuang can walk out from 2, Xiaolan can naturally confirm that Xiaohuang knows the password to the door. At the same time, Xiaolan does not know the password to the room. This can also be understood as protecting the privacy of the data. This is the so-called zero-knowledge proof.

Here are some comparisons of the two solutions:

Compared to Optimistic Rollups, I am more optimistic about ZK Rollups.

Because it has the following advantages:

  1. ZK Rollup can reduce transaction costs. Compared with Optimistic Rollup, ZK Rollup consumes more gas. However, it packs more data, so the actual gas consumption is less than that of Optimistic Rollup.

  2. No need for anyone to monitor

  3. Privacy enabled by default

  4. No need for fraud dispute windows like in Optimistic Rollups, reducing withdrawal times from 2 weeks to minutes

However, it is not decentralized enough due to its small number of nodes. At the same time, ZK’s initial architecture and integration into the Ethereum network are more difficult than Optimistc Rollups.

So the emergence of Optimistic Rollup is good news for ZK Rollup. Migrating to the Layer2 scaling solution requires huge changes to wallets, oracles, dApps, and user habits. Optimistic Rollup can help the entire ecosystem prepare for such a migration and provide a way to scale for applications that are not currently built on ZK Rollup. This gives ZK Rollup time to grow and make the adoption of ZK Rollup as smooth as possible while maintaining Ethereum's growth momentum.

 

This post is concluded hastily, everyone is welcome to leave comments for discussion.

That's all, Dyor.

Author: Beyond, Twitter @Beyond0x009; Editor: Gemini, Twitter @Gemini0x17