Original Author: msfew@ Foresight Ventures
This article focuses on the Layer 2 Rollup universe of Ethereum (only includes Secured rollup), and will start from the core concepts and mechanism design that are easy to understand, discuss the current good and bad of Rollup, and imagine their future decentralization and further expansion. Potential routes and solutions for composability, privacy and other additional functions have their own advantages and disadvantages.
A Secured Rollup is a model like Arbitrum or Optimism, settlement, consensus, and data availability all rely on L1 such as Ethereum, and it is only responsible for the execution of the Rollup.
mdnice editor
mdnice editor
a) The nature of Rollup
There are two ways to expand the blockchain: one is to optimize the blockchain itself, and the other is to use the blockchain in a better way.
Rollup is the second type, its real essence is very simple, it is faster, cheaper and "trusted" to use the blockchain to expand the blockchain (basically referring to Ethereum).
Rollup is: smart contract on the chain + aggregator off the chain.
It's that simple. The combination of these two features defines Rollup and enriches its concept.
Smart contracts on the chain,It means that its trust model is a smart contract on Ethereum, which borrows the security of Ethereum, instead of establishing a new trust consensus like Alt L1. We can trust Uniswap's protocol (the core is a smart contract) Trust Arbitrum's protocol.
off-chain aggregator,It means that it will execute and aggregate transactions off-chain, compress a large number of transactions, and finally put them on the Ethereum main network to achieve faster and cheaper goals.
The principle of Ethereum is that each node stores and executes every transaction submitted to it by users, so such a decentralized network is very expensive.
mdnice editor
b) Principle of Optimistic Rollup
As the name suggests, Optimistic Rollup is optimistic. It adopts the presumption of innocence. Everyone will default to believe that each execution is correct, and the status of each batch can be challenged by fraud proof to ensure security.
The user submits the transaction in Arbitrum, and Arbitrum's sequencer executes the transaction, and submits the state root and transaction data to the smart contract on the Ethereum mainnet in batches.
What should I do if an error occurs during Optimistic Rollup execution?
Optimistic Rollup has a dispute validation period,mdnice editor
c) Principle of zk Rollup
As the name suggests, zk Rollup uses zk zero-knowledge proof technology (actually Validity Proof), which is similar to the presumption of guilt. Everyone will default to question that every execution is wrong, and the security is guaranteed through the proof contained in each batch. .
The user submits the transaction in zkSync, the sequencer of zkSync executes and stores the transaction, and submits the status proof and new status to the smart contract on the Ethereum mainnet in batches.
How does zk prove that its execution is not wrong?
Prover (sequencer in most cases) will generate unforgeable proofs for the execution of transactions, proving that these new states and executions are correct.Sequencer will compress the proof and other data and submit it to the smart contract in the Ethereum main network for verification.
How do they compress data, thereby reducing gas fees?
Rollup can compress on the number of bytes per transaction,Including Nonce and signature etc.For zk Rollup, it can be further compressed without uploading data unrelated to state updates,Because zk proofs can already prove the correctness of state updates, and Optimistic Rollup needs to be challenged, so this part of the data cannot be ignored.
Why do they both have to be in full state?
Because in order to prevent the sequencer from running away,mdnice editor
d) The difference between the two types of Rollup
If you still don't understand, you can check the diagram below.
The design of Optimistic Rollup is more like Arweave. The mechanism is designed through economics and games. The performance is good, but it cannot be guaranteed to be 100% correct.
The design of zk Rollup is more like Filecoin. The mechanism is designed through cryptography and mathematics, which can guarantee 100% correctness, but there will always be additional calculation and time overhead.
The difference is thatOne uses a challenge period to ensure that errors can be corrected, and the other uses cryptography to ensure that errors cannot occur.
mdnice editor
1. Rollup is excellent
First of all, let's take stock of the overall excellence of the Rollup network:
Ecology: Arbitrum ran out of NFT and metaverse ecology; Optimism issued coins, with governance and community; StarkNet is brewing various GameFi innovations; zkSync has many new DeFi projects. Each Rollup is self-contained faction.
Expansion: TPS is indeed excellent, although not as high as the theoretical peak, but the fast confirmation of L2 provides a fast and cheap Web3 experience.
Experience: For developers and users, switching to Rollup is a simple matter, and the experience is almost the same as that of Ethereum. Various cross-chain bridges, wallets, Uniswap and other infrastructures also serve for the user's smooth experience . This is also supported by a good ecology.
Innovation: Rollup is already an excellent soil for Ethereum application innovation, and it is also more imaginative than Polygon's "large testnet" network.
In addition, if you are interested in the comparison between subnet and Rollup, you can refer toour previous research,And Toghrui's point of view.
In more detail, the major Optimistic Rollups and zk Rollups respectively give the following performances:
Arbitrum: TVL is about 2.4 billion USD. The Nitro upgrade has been launched on the test network, and WASM-Geth will be used to replace Arbitrum’s existing VM in order to optimize performance and adaptability. potential)
Optimism: The currency has been issued, and on this basis, many "groundbreaking and extremely Optimistic experiments" have been made (all kinds of mistakes, concealed facts and indifference, recently often questioned by disappointed users as "Ethereum Foundation's Wasted prince"). Bedrock upgrade will make the VM into MIPS-Geth, achieving EVM equivalence. The developers of Optimism have been talking about the concept of zkMIPS. I wonder if they will work hard in this direction in the future?
StarkNet: At present, the cross-chain bridge has not been fully opened. The development ecology of the special language Cairo and StarkNet is well established, and the game ecology is worthy of attention. The Validium model of StarkEx has also produced dYdX, ImmutableX and other applications. And StarkNet itself can also be used as a settlement layer, Build L3.
zkSync: It was the first to make a relatively complete zkEVM. The Volition mode of version 2.0 allows users to flexibly choose zkPorter or Ethereum data availability solutions.
Aztec: The private zk Rollup of the UTXO model will soon support the private DeFi ecosystem (but due to the large size of transaction data, additional optimization is required at present). Although it does not support general computing, it is one of the few real zk Rollups.
Fuel: V1 is an Optimistic Rollup, and it is very decentralized. V2 does not take the usual path, does not adapt to the EVM, but supports parallel tx processing through a high-performance VM of the UTXO model, and is committed to creating the fastest execution layer .
In addition to the Rollup with Ethereum as the main network, there are these:
everPay: based on ArweaveSCP ParadigmLayer2.
Milkomeda: EVM Rollup on Algorand.
Orbis: Rollup in Validium mode on Cardano.
mdnice editor
2. Rollup needs to be improved
mdnice editor
a) Centralization
Rollup Network's silky user experience is achieved by compromising security,Many components of the network are centralized, although the following three points can be used to "quibble" on this issue:
The zk proof in zk Rollup cannot be forged mathematically.
Users can reconstruct all states through L1's DA.
The trust model itself is a centralized smart contract.
However, the centralization of Rollup will still lead to problems such as censorship and extremely low security. At present, its centralization is mainly reflected in:
Centralized sequencer:Most of the sequencers of Optimistic Rollup and zk Rollup exist in a centralized form. That is to say, tx-like execution, sorting, and block generation are all supported by a centralized server. Before Arbitrum, due to the hardware problem of the sequencer, The whole network is down...
Centralization upgrade:Most Rollup network upgrades are centralized, which means that the cost of actually hacking the entire Rollup is negligible compared to the billions of TVL on the network. For example, zkSync uses a security council to manage upgrades. Recall before In the Ronin hacking incident, it is absolutely unsafe to let more than one billion funds depend on the multi-signature of so few people.
Closed source components:Some key components of Rollup are closed source. For example, almost all key components of StarkNet are not open source, and are still developed in a centralized manner, and there is no open source license. This is not so Web3.
mdnice editor
b) Real performance
The ultra-high performance that Rollup currently exhibits is "false". The real Finality is not so good, and there is still room for improvement in performance. This is a double-edged sword.
When a user submits a transaction on L2, he will immediately get feedback on the success or failure of the transaction, but in fact, this instant user experience is only Finality on L2.
During the period when the data has not been submitted to L1 or the Prover is still in the certification or arbitration window, the data has not obtained L1 Finality. Therefore, the user experience of Rollup is so good, in fact, because the user borrows some time through Rollup, allowing the user to take it first to a soft confirmation.
Due to the above design, the following problems are caused:
Fake Finality:The real finality is only when the data is uploaded to the real blockchain such as Ethereum, so how fast is the real finality of Rollup? should be taken into consideration), how often do they submit data to Ethereum? Here is a real analysis of the data on the chain.
Overblown TPS:mdnice editor
c) Economic mechanism
We take Optimism's token as an example to study the business and economic mechanism of Layer2 Rollup, the token model, and MEV.
business model:Rollup profit = Layer2 fee - Layer1 block space fee (the security cost of storing and verifying data such as proofs on L1) - computing costs such as node servers. Among them, Layer2 fee = gas fee + MEV + some premium charged by Layer2. But Users of this business model cannot participate as nodes, only Rollup developers can earn. The following are the benefits and costs of Arbitrum and Optimism in Layer2 fees and Layer1 block space fees.
Token mechanism:Optimism's network is good, but the token economy is still weak. The OP has the following three fatal problems: 1. There is no utility, such as unable to pay network gas or PoS pledge (of course, these two are not good Rollup utilities) , only for governance. 2. Cannot capture the value of network revenue and block space, how much money the sequencer earns has nothing to do with the currency holders. 3. The number of circulation is very small, the selling pressure is very high, and the accidents during market making make it even worse This situation is even worse. These problems are not only the problems of Optimism, other Layer2 Rollups are also likely to face these tests.
MEV: Since Rollup is now a centralized sequencer, these benefits can be captured by the sequencer. MEV is a two-sided thing. On the bright side, the Rollup network can embrace the value of MEV for the network, making it an economic mechanism after network decentralization and an important part of miner incentives; at worst, the Rollup network would need to eliminate any MEV, as it is often seen as an additional tax on users. Arbitrum chose to "ignore" MEV, taking a first-come, first-served mechanism, but it has higher requirements on node performance and reduces the cost of DDoS.
mdnice editor
3. The final performance comparison between Optimistic Rollup and zk Rollup
I don't really want to compare the TPS and other paper performances of Optimistic and zk Rollup camps like other articles (if you are curious, you can read more references at the end of the article in detail), but from their essence and characteristics, as well as the long-term outcome Performance to compare:
The detailed interpretation of this picture and the points worthy of attention are as follows:
Difficulty in implementing EVM equivalence: In fact, whether in terms of EVM compatibility, node configuration requirements, or optimization, the overall implementation difficulty of zk Rollup is higher than that of Optimistic Rollup. This is actually a way to prove the existence of additional overhead... Extra The proof overhead not only makes the performance of the network always have an extra burden, but also is a huge obstacle to the implementation of EVM compatible technology.
It is more convenient to meet privacy and other requirements: Now that zk has been used, the difficulty of developing a truly private zk-zk Rollup will be much easier than zk-Op Rollup. Of course, there are also zk-Op Rollup projects such as ZKOPRU that have already been launched .
Optimization direction: For Optimistic Rollup, parallelized tx processing is a very direct and effective optimization, and if zk Rollup uses the same scheme (the sequencer of the next version of StarkNet can be parallelized), in the long run it will still be Lost to Optimistic Rollup (again due to additional proof overhead), so zk Rollup will take the alternative of Fractal L3 scaling, that is, continue to build Rollup on top of Rollup. The recursive superpower not only allows L2 to verify that the proof of L3 is correct At the same time, it can also allow L1 to verify whether L2's verification of L3 is correct or not.
Specific optimization direction: all are obtained from the roadmap and the expected design plan, and there is no practice at present. I personally think that it will take a long time to complete these upgrades. Some of these upgrades have side effects, such as introducing a new mechanism. Additional trust assumptions are required.
Although this figure draws the conclusion that the performance of Optimistic Rollup will be higher than that of zk Rollup in the long run, the trust guaranteed by mathematics is stronger.I think the end result of Rollup performance is Optimistic, but the real overall end result will be zk.
mdnice editor
4. The future of rollups
mdnice editor
a) decentralization
From the perspective of decentralization, we focus on the issues of sequencer and contract upgrades,In the future, a Rollup must be decentralized,Then the following decentralized design is required:
Decentralized sequencer:The sequencer mechanism of Optimistic Rollup will basically be PoS (leader election, MEV auction, rotation mechanism) of various magic changes; and zk Rollup’s mechanism like Hermez’s Proof of Efficiency or Proof of Validity Proof or Tendermint PoS. Of course, if The network is a PoS mechanism, so in fact, additional capital costs are required.
Decentralized contract upgrade:Contract upgrades should not be managed by multi-signatures, but by decentralized governance management (involving tokens) or completely abandoning contract upgrade rights (such as non-mandatory upgrades such as Uniswap V2 upgrade V3).
Multilingual client:Like Ethereum, a multilingual client is also a necessary condition for decentralization, which can guarantee 100% uptime of the network.
mdnice editor
b) Composability
The composability of Rollup is the ability of smart contracts on different Rollups to read and write directly to each other.
For Rollup on Ethereum, in factAs a settlement layer, Ethereum is a shared bridge for Rollups.In the future, the composability between Rollups is likely to form a call through L2 ⇒ L1 ⇒ L2 (such as the dAMM designed by StarkNet).
mdnice editor
c) function
For functional expansion, zk Rollup has more potential.The concept of L3 makes App-specific Rollup particularly attractive,Immutable X has also announced that it will implement additional protocol deployment on StarkNet so that it can exist as an L3.
The appeal of L3 is that:
Let the application transform into a protocol, open its own interface and service, and achieve greater composability
L1 acts as the hour hand, L2 acts as the minute hand, and L3 acts as the second hand. It further improves the overall performance of the network without affecting the pulse of L1.
I envision the most interesting features of L3 to be:
Privacy L3
Pure payment L3
NFT Market L3
Game Engine L3
DEX and DeFi L3
But the challenge of L3 is how exactly DA handles it. We may adopt the following different models:
Secured Rollup: It is still considered a Rollup, and puts DA on L1 like L2, but it may involve a more complicated exit mechanism.
5. Summary
5. Summary
The above is what we need to understand about Rollup.
In addition, Rollup created countless new topics: L3, modular blockchain, data availability solution, UX improvement brought by account abstraction, new technology stack, new programming language, new developers, new Auditors of…
Everything about Rollup is so new, so shiny, yet so immature…
How to better "use" the blockchain like Rollup is a question worth exploring.
