Huobi Research
Published in

Huobi Research

An in-depth look at Rollup’s tech, application, and data

Abstract

Authors

Contact the Authors

I. Overview of Rollup

1.1 What is Rollup?

1.2 How did Rollup evolve?

II. Core of Rollups

2.1 How Rollups work?

2.2How to realize transaction compression?

2.3 How to synchronize the state transitions from Layer2 to Layer1

2.4 How to ensure the L2 operators submit all state transitions honestly?

III. Analysis of major technical teams

3.1 MatterLabs

3.1.1 Project progress

3.1.2 Technical solution

3.1.3 Feature

  • High security, no upper limit of funds volume. We are aware of that Rollups have the same security as Layer1. At the same time, no matter how much the amount of funds deposited on Layer2 increases, its security will not be affected. Data validity on L1 and zero-knowledge proof are important part for zkSync. Furthermore, smart contract can automatically verify transaction validity based on state, data and proofs on Layer1, without other security assumptions.
  • Relatively short withdrawal time. At present, it takes up to several hours for users to withdraw their money in zkSync, while only 15 minutes will be cost in theory. The main reason is that the trading volume on Layer2 is relatively sluggish. Extending the total time can effectively reduce the amortized fee for each transaction. Anyway, compared to the solutions using fraud proofs (e.g. Optimistic Rollups, Plasma, Lightning Network) which takes several weeks to withdraw, zkSync is still very convenient for users.
  • No activity assumption. Zksync ensures data availability on Layer1 and transaction validity. Therefore, users are not required to stay online as much as possible to prevent fraud.
  • Poor universality. Current Zksync is only equipped with some limited functions, such as deposit, withdrawal, and transfer. As a result, zkSync is not outstanding among all ZK Rollups in locked value. However, it is a common problem for the whole ZK Rollups solutions to support some specific operations, not only for zkSync. The team is now doing a research on EVM compatible solution and more universal smart contract. A fully functional zkSync 2.0 is expected to be published before 2022.
  • Large calculation amount. For each transaction, in addition to calculating the state transition, the corresponding proof shall be generated, which will consume large computational resources. In contrast, solutions including Lightning Network, Plasma, Op Rollup eliminate such consumption. For the same transaction, zksync’s cost of layer 2 operators are higher than that of the Op, while resource consumption makes no significant challenge for zksync’s in the current context of low layer 2 utilization. If the ZK Rollup-based Layer 2 application scenario grows, dedicated provers or customized hardware could also mitigate the impact of issues on resource consumption and user experience. Alternatively, zkPorter’s solution offers a solution for less amount of computation and higher tps.
  • Great complexity. Zero-knowledge proofs are too difficult to migrate and develop for general ZK Rollups teams. An EVM compatible may greatly improve the problem but will also significantly increase its code complexity. The code audit is more difficult to audit than OVM. Meanwhile, it may take several years to verify the security and robustness of ZincVM.
  • Limited throughput improvement in Rollups, greater throughput improvement expected in zkPorter. Due to the gas limit ‘s upper bound of layer one blocks, Rollup’s throughput improvement remains low-level comparing to solutions not guaranteeing the on-chain data validity. Since Matter Labs has aware of the situation, the zkPorter was proposed to massively increase TPS.

3.1.4 Application

3.2 Optimism

3.2.1 Project progress

3.2.2 Technical solution

3.2.3 Feature

  • Weaker security than of layer one. Solutions using fraud proofs rely on censorship resistance on Layer1. If the amount of funds on Layer2 is too large, 51% attack may happen. Miners on Layer1 may
  • Long withdrawal time and low fund efficiency. The game model of Optimistic Rollups based on economic incentives cannot guarantee the transaction certainty before the end of challenge period. Moreover, end users who cannot run full nodes are not able to verify in advance. Therefore, Optimistic Rollups has a longer verification time than ZK Rollups. The challenge period of PoW and PoS are two weeks and a week, respectively.
  • No user activity hypothesis, but a verifier is needed. Optimism ensures on-chain data availability. An external verifier can be used to monitor different status, instead of monitoring by users themselves.
  • High flexibility, supporting general smart contract. Optimistic Ethereum is the first solution that has a complete cross-layer migration function without rewriting smart contract, i.e. the code migration cost for application on Ethereum is relatively low. Hence, it is widely chosen by many application teams.
  • Low calculation cost and gas consumption on Layer1. It is unnecessary to actively verify the validity of state transition, which will save a lot of gas consumption compared with ZK Rollups. At the same time, it also saves the calculation cost of generating proofs on Layer2.
  • Limit improvement on throughput. Optimistic Ethereum needs to provide more intermediate state data to facilitate fraud proofs than Rollups, so it can only bring dozens of times throughput improvement.

3.2.4 Application

3.3 Offchain Labs

3.3.1 Project progress

3.3.2 Technical solution

3.3.3 Feature

  • Multiple rounds of fraud proofs interaction. Arbitrum uses multiple rounds of fraud proofs to verify transaction validity, which will reduce the gas consumption for a single challenge. No more worries about exceeding gas fee.
  • Stronger compatibility with EVM. Compared with OVM, which is not 100% compatible, existing applications are not required to modify their codes when migrating to Arbitrum.
  • Multiple interactions may have security issues. Built-in oracles are supposed to execute asynchronous procedure to verify, which is more complex for sure. The more codes, the more potential risks.

3.3.4 Application

3.4 Starkware

3.4.1 Project progress

3.4.2 Technical solution

3.4.3 Feature

  • Weaker security. Validium stores data off-chain and the Notary only provides the proof of state transition, not the transaction details. If the Notary intends to hide the newest state, users will not be able to proof their account state by themselves. Therefore, the Notary may be malicious to freeze users’ funds.
  • Shorter withdrawal time. Because the Notary in Validium provides a validity proof for state transition, so a challenge period is no long needed.
  • No user activity assumption. Although data validity is not guaranteed in this solution, SNARK proofs can easily prevent the Notary from publishing a fraud transaction. As a result, users are not required to stay online all the time, even if the Notary freezes funds.
  • Stronger universality, incompatibility with EVM. Cairo is not EVM-compatible so that existing protocols require additional development work to migrate. We assume that it is one of the reason why Starkware is not widely adopted.
  • Higher TPS. Because data are placed off-chain, TPS in Validium is much higher than ZK Rollups.

3.4.4 Application

IV. Application Solutions Explained

4.1 Celer:Layer2.finance

4.1.1 Background

4.1.2 Solution

4.1.3 Strength

  • Low cost. If we consider DeFi as various subway stations, then Layer2.finance is the subway shuttling through different DeFi protocols. Layer2.finance acts like a “DeFi Public Transportation System” so that multiple people split the cost of individual layer1 DeFi transactions in a completely trust-free and non-custodial way
  • No migration. For users, their own funds can still be used in multiple DeFi protocols as before, avoiding the problem of liquidity fragmentation caused by Layer2. For DeFi protocols, it can not only save the work of dedicated network but also help to attract more Layer2 users when connected to Layer2.finance.
  • High scalability. In the short term, a single Layer2.finance chain is confined to the blockchain capacity, and may not be able to maintained as transaction scale increases. In the long term, once ETH2.0 is realized, multiple Layer2.finance Rollup chain can be added to the corresponding liquidity system. Furthermore, system scalability may usher in an outbreak.

4.1.4 Limitation

4.2 Starkware:Caspian

4.2.1 Background

4.2.2 Solution

4.2.3 Strength

4.2.4 Limitation

4.3 MakerDAO:Dai Bridge

4.3.1 Background

4.3.2 Solution

4.3.3 Strength

  • Fast withdrawal time. The withdrawal time is cut down from one week to a few minutes.
  • No counterparties. Maker is able to issue Dai as required, so fDai is just used as a bridge. Moreover, the solution is logically connected with existing mortgage and lending contract to provide asset protection. Users are unnecessary to interact with Maker, so counterparty will not be involved.
  • Strong flexibility and high liquidity. Maker has set up a fDAI vault where users can not only obtain fDAI through above process, but also trade fDAI from other users.
  • No risk for the average users on Layer2. Even if the oracles fail, causing an over issue of DAI, Layer2-users will not be affected. Specifically, increased DAI is a debt for Maker, which will trigger Maker Protocol Auction. The system increases the amount of MKR in circulation to pay off debts then MKR holders have to take the loss. A DAI locked in L1 will be still worth an oDAI.

4.3.4 Limitation

V. Data Analysis

5.1 Development Progress

5.2 Locked Value

5.3 Actual Performance

VI. Summary and Outlook

Reference

About Huobi Blockchain Research Institute

Contact us:

Scan code to add our learning assistant

Disclaimer

--

--

Blockchain industry top think tank, affiliated to Huobi Group.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store