A detailed explanation of Rollup technology, applications and data

Rollup’s technical solutions have inherited the ideas of other Layer 2 predecessors, such as Lightning Network, Plasma and other solutions.

For those who

[Huobi Research Institute] Zhao Wenqi, Chen Han, Yuan Yuming


The DeFi boom that broke out in 2020 has pushed the activity on the chain to a new level, and also put the performance problems faced by the public chain directly in front of the public. The Gas Price of Ethereum, which currently has the largest ecology, has soared and remained above 100 Gwei for a long period of time, giving Ethereum the nickname “Noble Chain”. Although the Ethereum Gas Price has declined recently, it cannot change the problem of reduced efficiency caused by redundant storage and redundant computing. Among the various efficiency-enhancing technologies that have been born, the Rollup technology under the Layer 2 track is undoubtedly the most eye-catching among the current solutions.

Rollup’s technical solutions have inherited the ideas of other Layer 2 predecessors, such as Lightning Network, Plasma and other solutions. But the most important thing is its idea of ​​storing the second-layer data back to the first layer. This idea is different from all previous Layer 2 solutions, and has become the key to Rollup technology to solve the problems of usability, ease of use, and derived security issues when users use the second layer.

Around Rollup technology, many excellent solution teams have been born. This article focuses on four of them-Matter Labs, Optimism, Offchain Labs, and Starkware. They have made many attempts on ZK Rollup, Optimistic Rollup and hybrid Rollup, and have become the main driving team for the implementation of the Rollup technology system in different directions. In addition to the technical solutions team, there are also many teams that are exploring applications with Rollup characteristics, such as the layer2.finance of the bus in the Layer2 world, Caspian, which reduces the liquidity segmentation problem caused by Layer2, and helps Optimistic Rollup users to achieve fast withdrawals Dai Bridge, etc., this article will also discuss these applications.

From the perspective of data performance, since the application scenarios of Layer 2 (data statistics do not include side chains) have not yet been rolled out, the current lock-up funds on Layer 2 are less than 3% of the overall lock-up of Defi, and Rollup occupies nearly 1/ of them. 3. At present, the landing of Optimistic Rollup is close at hand, and the general ZK Rollup system solution will take some time. The Op series technology is expected to increase the Ethereum TPS to around 500, and the ZK series can increase by about 100 times. There are also some hybrid Rollup solutions whose theoretical TPS can reach 20,000.

In general, Layer 2 is the only way for public chain development, and Rollup technology is the best technology that balances ease of use, security, scalability, and generality among Layer 2 technologies so far. In the next few months, we will also see Rollup’s solutions and applications on a large scale, which is worth looking forward to!

1. Overview of Rollup

1.1 What is Rollup?

In the off-chain world, people are accustomed to high-speed transactions, instant confirmation, massive storage, concentration and trust bring efficiency. Entering the chain, the distributed system based on code control and game mechanism operation realizes decentralization and trustlessness. Storage redundancy and computing redundancy have become important means to ensure system security. However, redundancy inevitably brings cost improvement and efficiency reduction, and the experience of the application on the chain makes users feel that the times are backward. For this reason, various improvement plans to improve the efficiency of blockchain operations have also been born.

The improvement plan on the chain includes expanding the block size, changing the consensus algorithm, sharding, and so on. Although the improvement plan on the chain has not fully demonstrated the ability to improve efficiency in the current stage of blockchain technology development (for example, the sharding of ETH2.0 is still under development), it cannot be changed on the blockchain. For security, it is necessary to bear the current situation of redundant storage and computing constraints. And this constraint can be broken by the improvement scheme under the chain. Transferring storage and computing to off-chain, and designing mechanisms to ensure the credibility and security of off-chain storage and computing are the core of the off-chain expansion plan. Rollup is one type of off-chain solutions.

So, what is Rollup? It is usually translated as “roll stack” in China, which is a bit weird to read, but it is still very vivid. It is packaged into rolls and compressed into stacks. The transaction data under the chain is packaged and compressed and then transmitted to the chain for storage. Rollup is suitable for this feature. A general term for a type of Layer 2 technology. An interesting fact related to this is that Matter Labs publicly stated that ZKSwap is not a Rollup, but a Validium, because ZKSwap at the time did not meet this feature.

1.2 How did Rollup evolve?

Before Rollup, Layer 2 had several generations of technology. However, due to issues of trustlessness, security, ease of use, or versatility, none of them has become a widely accepted solution. The emergence of Rollup technology has become the key to breaking this situation.

Coin World-a detailed explanation of Rollup technology, applications and data

Source: Huobi Research Institute

The earliest Layer 2 is the side chain technology, and its development has been tepid. Recently, the rise of Polygon has attracted a lot of discussion. However, sidechains such as Polygon are based on trusting a group of verifiers. This type of scheme with strong trust assumptions can be used as a compromise solution before the emergence of a scheme without easy-to-use trustless assumptions. , But it is by no means the ultimate optimal solution. In addition, the industry is skeptical or even skeptical about classifying the side chain as Layer 2 because the side chain will not maintain the synchronization state change to the main chain, and is closer to an independent chain, a new Layer 1.

The Lightning Network is one of the first Layer 2 solutions to try a trustless assumption. Through RSMC and HTLC technology, he respectively relieved the trust dependence on the counterparty of the transaction and the trust dependence on the fund routing node. That is, the user does not need to assume that the counterparty of the transaction and the intermediate node that forwards the funds will not do evil. However, this scheme has paid a price in terms of security, ease of use, and versatility, which limits the application and promotion of this technology.

Plasma is a technology that emerged after the Lightning Network. Its model has the characteristics of both the side chain and the lightning network. The difference between Plasma and Lightning Network lies in the delivery, organization, and submission of off-chain transactions. The transmission of transactions under the Lightning Network chain is based on a network connected by state channels. The transactions are stored in the state channels of both parties to the transaction, and the counterparties in the channel can submit state changes brought about by the transactions in the channel by themselves. However, Plasma chose a transaction delivery and organization form that is closer to the side chain. There will be Layer 2 operators who are responsible for receiving transactions, organizing storage (in the Plasma Cash solution, users need to store part of the transaction information themselves) and submit status changes. chain. However, the side chain is a trust-based model, and the operators (or miners) on the user side chain do not do evil. In terms of de-trusting, Plasma follows the idea of ​​using fraud proofs in the Lightning Network, and prevents evil by setting challenge periods and incentive games. However, Plasma also has security, ease of use, and versatility issues. Nowadays, it is basically a technical route that has been abandoned as an independent Layer 2.

The Rollup solution still retains the idea of ​​Plasma borrowing the second-tier operators to receive, store, and submit state changes. However, considering that the idea of ​​storing data off-chain in the previous solution has resulted in security and ease of use issues, it is directly Storing data on the chain cannot improve efficiency, so the idea of ​​compressing data on the chain was born. After the transaction data is put on the chain, the most direct solution is the user’s ease of use. The data on the chain is open and transparent, which means that it is no longer necessary to require users to do some behaviors that are very harmful to the experience in order to prevent fraud, such as maintaining a certain amount of online Frequency and self-saved data for self-certification (both Lightning Network and Plasma have this requirement). At the same time, data on the chain can indirectly solve some of the security issues that may arise, such as the privacy leakage of the Lightning Network watchtower and batch withdrawal on Plasma, which do not need to be considered in the Rollup scenario.

Coin World-a detailed explanation of Rollup technology, applications and data

Therefore, from the evolution to the present, Rollup has actually borrowed and absorbed many previous program ideas and integrated its unique on-chain compression storage ideas. At the current point of view, Rollup is undoubtedly the most anticipated among the Layer 2 solutions. When it is about to land, I hope to use this article to sort out the current technology, application and data of Rollup.

2. The core points of Rollup technology

In the previous chapter, we introduced what Rollup is and how the idea of ​​Layer 2 evolves and inherits until the birth of Rollup. In this chapter, we will introduce the core points of Rollup technology in depth. Different Rollup technical routes and different teams under the same technical route will have their own differences in the implementation of Rollup. Therefore, this section mainly introduces the common ideas of Rollup.

2.1. How does Rollup work?

As shown in Figure 2-1 below, it is a schematic diagram of the operating principle of Rollup. On Layer 2, various transactions of users will be sent to the operators of the second layer. The operator will compress a batch of transactions. After being compressed into a transaction, the processing contract on the chain is called for processing. This call transaction will enter the transaction memory pool like other Layer1 transactions. On Layer 1, the miners receive all the transactions in the first layer of the network and package them into blocks for release, which will include the transactions packaged up by the second layer.

Coin World-a detailed explanation of Rollup technology, applications and data

Although the specific implementation of different Rollups will be different, there are three common problems that need to be solved: how to achieve transaction compression, how to synchronize the state transitions of the second layer to the first layer, and how to ensure that the second layer operator faithfully submits all of the second layer State transition. We will discuss them separately in the following three subsections.

2.2. How to achieve transaction compression?

As for why we want to put data on the chain, we have already explained it in the previous chapter. After being on the chain, the data availability (or data validity, data availability) of the second-tier transaction data on the chain can be guaranteed. However, if the data is on the chain as it is, it is difficult to achieve the purpose of improving efficiency through the second layer, so it will be compressed. When it comes to compression, everyone usually understands the compression of the number of bytes occupied, that is, the compression in terms of volume, but it is not. Compression is mainly a compression of the number of gas consumed by transactions, because the block limit on Ethereum is limited by Gas instead of the number of bytes. A smaller number of bytes corresponds to a smaller storage footprint, but it is not the same as a smaller size. Gas consumption. The compression in Rollup, on the one hand, does compress the number of bytes occupied by the transaction, on the other hand, it will also reduce the amount of calculation performed by the transaction to reduce gas consumption.

The compression methods of transaction bytes mainly include using more efficient encoding methods, reducing the number of bytes occupied by transactions, and reducing the amount of data that needs to be uploaded.

Coin World-a detailed explanation of Rollup technology, applications and data

Figure 2-2 shows the number of bytes occupied by transactions on the first layer of Ethereum and on Rollup, as summarized by Vitalik. Although the teams are not exactly the same as Vitalik’s generalization in the final implementation, the ideas are the same, so we still quote Vitalik’s generalization in this article.

First of all, in the second-tier transaction, Nonce can be omitted in the transaction; Gas-related Gasprice and Gas do not have to appear in every second-tier transaction; To and From addresses do not need to use the Ethereum address, but use it. The index in the state tree (as shown in Figure 2-3, the second-tier accounts can be organized by a Merkle tree); Value can use scientific and technical methods to save digits; for signatures, you can save the number of bits in a batch The transaction signatures are aggregated to reduce the signature storage consumption of each transaction. At the same time, these transaction data will be stored in the field Calldata, which has a relatively low gas cost on the chain.

It is worth noting that the uploaded data of the first layer is not only the above-mentioned transaction content, but also the state root before and after the batch transaction (State Root in Figure 2-3), and it is used for proof (or for future reference). ) Data on the legitimacy of state transitions. ZK Rollup technology can achieve better compression effect than Optimistic Rollup technology. An important reason is that ZK needs to upload less transaction data than Op. Op needs to upload some intermediate state information to facilitate the challenge of verifiers, but ZK only needs Upload proof information for batch transactions.

Coin World-a detailed explanation of Rollup technology, applications and data

In addition to compressing the number of bytes occupied by transactions, the amount of calculation of transactions in Rollup will also be less than directly executing on the first layer, because the transaction does not need to be re-executed on the first layer, only need to verify whether the state transition submitted by the second layer operator is correct . For ZK, it mainly comes from verifying whether the state transition proof (zero-knowledge proof) is legal; for Op, it mainly comes from the challenge and consumption of fraudulent transactions.

At present, after compression, theoretically, the throughput that ZK series technology can bring is about 100 times higher, and Op is about 30 times.

2.3. How to synchronize the state transition of the second layer to the first layer?

In the previous section, when talking about transaction compression, it was mentioned that in addition to submitting transaction information, the second-tier operators also submitted the state roots before and after the batch transaction occurred. This state root is similar to the state root of the state tree on the first level of Ethereum, and is a collection of account states.

As shown in Figure 2-3, the state of Rollup can be organized by a Merkle tree, the leaf nodes are the account states, the intermediate nodes store the information that is hashed upwards, and the root node is the final hash value, which is owned by the second layer. A summary of the account status.

As shown in Figure 2-4, it is a schematic diagram of the state transition before and after the batch transaction occurs. The second-level transaction will change the state of the account related to the transaction, cause the information of the leaf node to change, and ultimately lead to the change of the root hash value. The second-tier operator will maintain the state tree of the second-tier account locally, record the root hash value before and after the batch transaction, and upload the second hash value when uploading the batch transaction.

Coin World-a detailed explanation of Rollup technology, applications and data

2.4. How to prevent fraud by second-tier operators?

Since the transaction information and state transition information are uploaded by the second-tier operator, how to prevent the operator from uploading false information? This problem exists for all Layer 2 that needs to synchronize state with the main chain.

Both the Lightning Network and Plasma before the birth of Rollup used the method of fraud proof, and the Op technology inherited the ideas of the two and also used this method. That is, when the operator submits the information, it does not check the legality of the state transition, but will reserve a challenge period for the submission of the batch of transactions. If no one challenges its legitimacy during the challenge period, the transaction is confirmed; if so, the challenger needs to provide a fraud proof to prove that the operator is doing evil.

Fraud proof is a relatively easy way to implement (compared to the validity proof mentioned later), but the price it brings is the sacrifice of user experience and capital efficiency. In the Lightning Network and Plasma solutions that do not guarantee the validity of the data on the chain, users are required to ensure a certain online frequency (also called user activity) to prevent fraud. At the same time, users’ funds cannot be withdrawn in time and need to wait for the end of the challenge period. Under Optimistic Rollup, although fraud proof is also used, the damage to user experience and capital efficiency has been improved. Because the data is on the chain, the challenger can be submitted by a third party other than the user, which reduces the assumption of user activity and greatly improves the experience. In addition, under the Op scheme, although there is still a challenge period, for non-fraudulent transactions, the finality of the transaction can be expected. Op users can build verification nodes on their own to quickly verify the legitimacy of the transaction without having to wait until the end of the challenge period. The transaction still has to wait until the end of the challenge period to be confirmed by the main chain, but its finality can be quickly confirmed. Using this, the liquidity provider can release the liquidity of funds for users in advance. However, this solution is not embedded in Op, it needs to rely on application solutions.

Compared with the fraud proof, the more technically challenging method of preventing fraud is to require the second-tier operator to provide a proof of validity, that is, the second-tier operator directly proves that the state transition submitted is valid (correct) and self-certifies innocence. . This is also the method used by the ZK Rollup system. In this way, the submission is correct, users do not have to worry about fraud, and there will be no freezing period for withdrawal of funds. The solution is almost perfect, and it is too difficult to counteract the flaws, so that for a long period of time, ZK-based solutions can only generate proofs for some specific operations and cannot be universal. But with the breakthroughs in cryptography technology theory and practice (PLONK, polynomial commitment, etc.), general ZK solutions are already at hand.

3. Analysis of the main technical team

In the last chapter, we introduced the core points of Rollup technology. In this chapter, we will sort out several representative Rollup teams and their solutions. At the same time, for each solution, we will also analyze the security, exit time, user activity assumptions, versatility, calculation volume, complexity, throughput improvement, etc. that Rollup focuses on to further understand the Rollup technology.

3.1 MatterLabs

Matter Labs’ two-layer solution zkSync is the head project of the ZK Rollup technical route. The current mainnet version carries more than 9 million US dollars of funds, and the single transaction fee for the second layer can be as low as $0.001 (but currently at the $0.1 level). However, although its theoretical throughput can reach thousands, due to insufficient demand, the actual operating TPS is less than 0.1. At the same time, the withdrawal time is still at the hour level.

These data reflect to a certain extent that the ZK series solutions are not performing well at present, but this kind of insufficiency is more due to the current development stage of the entire second layer and the bottleneck of the ZK series technology that needs to be broken through. Matter Labs is in an absolute leading position on the ZK Rollup technical route, and its EVM-compatible virtual machine will also be a milestone in the next stage of ZK technology.

3.1.1. Project Progress

Matter Labs developed the zkSync solution based on cryptographic proofs. The solution was launched on the mainnet in July 2020, zkSync 1.x version will be launched in May 2021, and the public testnet version 2.0 will be launched in May 2021. 8 The mainnet will be launched in January.

Version 1.0 supports asset transfer and does not support general smart contracts; version 1.x supports functions such as NFT atomic swap and casting; version 2.0 will use the ZK Rollup and zkPorter hybrid account architecture, which supports the full interoperability of the two accounts, and supports diagrams The smart and complete ZincVM can port the existing Solidity source code, natively supports all Ethereum wallets, and the zkPorter under development, by giving up on-chain data availability, has brought a significant increase in TPS, far exceeding the theoretical value of ZK Rollup 2000 , Can reach more than 20,000 pens.

3.1.2. Technical Solution

The current mainnet version of zkSync is based on ZK Rollup technology, and its solution ideas are basically the same as those of ZK Rollup introduced in the previous two chapters. We will not repeat them. However, the zkPorter solution that Matter Labs officially released in mid-April is worth paying attention to.

The most important feature of pure Rollup’s technical solution is to ensure the availability of data on the chain, and the availability of data on the chain eliminates the requirement for user activity, greatly improving user experience and usability, but it also brings limited scalability . Because each block on the chain has a gas upper limit, in theory, all technical solutions to ensure the availability of data on the chain will have an upper limit of scalability, which can only bring a linear improvement.

In order to simultaneously avoid the assumption of user activity and greatly improve scalability, zkPorter stores data off-chain to bypass the very limited throughput limit caused by gas limit. At the same time, for all transactions, the proof of state transition will still be submitted On the chain, it is verified by the guardian off the chain. Another important point in zkPorter is the introduction of shards. The shard where ZK Rollup is located is the basic shard. All other shards can be determined by the user on the data availability plan. The availability of these shards can be determined by the guardian of zkSync. It can also be maintained by the protocol on the shard. Under this structure, TPS can be increased to 2w, and the handling fee can be reduced by ten times (Figure 3-1).

Coin World-a detailed explanation of Rollup technology, applications and data

3.1.3. Features

 High security, no upper limit of capital volume. The Rollup part has the same security as Layer 1, and the increase in the amount of funds carried on the second layer will not reduce the security of the second layer. Data validity and zero-knowledge proof on Layer1 are the keys to the zkSync solution. Smart contracts can automatically verify the validity of transactions based on the status, data and proofs on Layer1, without other security assumptions.

 The exit time is relatively short. The current zkSync actual exit time takes up to several hours, but the theoretical exit time is about 15 minutes. The main reason is that there are not many transactions on the second floor. Extending the launch time can reduce the amortized handling fee for each transaction. Even so, compared to the use of fraud proof-type technical solutions (such as Op Rollup, Plasma, Lightning Network, etc.) several weeks to launch time is still relatively short.

 No user activity assumption. Because this technical solution guarantees the availability of data on Layer 1, and all transactions have proof of validity, there is no need for users to guarantee a certain online frequency to prevent fraud.

 It has poor versatility and does not support general smart contracts for the time being. The current version of zkSync only supports deposits and withdrawals and transfers. The limited capabilities lead to the lack of many application scenarios for zkSync, and the overall lock-up volume is not impressive in the zk-based solution. This is a common problem currently facing the entire ZK Rollup technical route, that is, it only supports dedicated operations. However, the zkSync team is currently studying EVM compatibility and the implementation of universal smart contracts, and the team expects to be online this year to support the 2.0 version of universal smart contracts and EVM.

 Large amount of calculation. For each transaction, in addition to calculating the state transition brought about by each transaction itself, it is also necessary to generate a corresponding state transition certificate. The process of generating the certificate requires a large amount of computing resources. In comparison, others such as Lightning Network, Plasma, and Op Rollup save this part of the computing resource consumption. In the same transaction, the cost of the second-tier operator of zksync will be higher than the cost of the op series solution, but this resource consumption has not become an important challenge for the development of zksync under the situation that the current second-tier utilization is not high. If the second-tier application scenario based on ZK Rollup grows, a dedicated prover or customized hardware can also alleviate the impact of this problem on resource consumption and user experience. In addition, zkPorter’s solution also provides solutions for low computation and higher tps.

 High complexity. Due to the complexity of zero-knowledge proof technology, ordinary application development teams can hardly use ZK Rollup’s solution to migrate and develop applications. The ZK Rollup solution compatible with EVM will greatly improve this problem, but the complexity of its code will also increase significantly, and the code audit will be much more difficult than OVM. The security and robustness verification of the ZincVM may need to be verified. The test of several years.

 Partial throughput improvement of Rollup is limited, but part of zkPorter throughput is expected to be greatly improved. Due to the upper limit of the gas limit of a layer of blocks, the throughput improvement of Rollup technology cannot be compared with other Layer 2 solutions that do not guarantee the validity of the data on the chain. But the Matter Labs team is also aware of this problem and proposed a new zkPorter solution to greatly improve TPS.

3.1.4. Application

Currently, zkSync, as the head solution of ZK Rollup technology, has attracted the attention of many ecological application parties. For example, Curve has integrated zkSync on the Ethereum testnet, imToken has reached a deep cooperation with zkSync and will support zkSync in the wallet. SushiSwap and Argent have selected Take zkSync as the final expansion plan. However, due to the limited operations supported by the current zkSync, few actually complete the integration and application, mainly in the field of payment. For example, Gitcoin, Storj, Golem, etc. all integrate zkSync as one of the payment methods. These application scenarios are far from the prosperous first-tier ecology in terms of practicability and financial return, which results in the actual throughput of zkSync being only about 0.05 tx/s.

3.2 Optimism

Just as Matter Labs is the head team of ZK Rollup technology, Optimism is the head team of Optimistic Rollup technology route. The team was born out of the Plasma Group team that originally studied Plasma technology, and then gave up Plasma and turned to Optimistic Rollup.

The OVM proposed by him provides an important idea for reducing the cost of code migration from one to two. Convenient code migration is the basis for rapid ecological integration. Although its main network has not yet been launched, Synthetix is ​​already running on its foundation. Currently, the carrying amount of funds exceeds 100 million U.S. dollars, and the cost of a single transaction can be as low as about $0.07. In terms of throughput, the theoretical value of the Optimistic Rollup technical solution is around 500.

The main reason why the data performance is not strong is that Optimism is still in the stage of limited access and only opens a few functional tests for some authorized applications, but its better compatibility with general smart contracts is still favored by many project parties. In the short term, its application scenarios will be broader.

3.2.1 Project Progress

Optimism proposed OVM based on Optimistic Rollup technology and built Optimistic Ethereum. It will start the soft start (trial run) of the Optimistic Ethereum mainnet in January 2021. Subsequently, in March, Synthetix began its migration to OE. Currently, Layer 2 staking can be performed on Synthetix, but its more core synthetic asset and transaction business has not yet been deployed to the main network. It is expected that in July 2021, OE will launch the public mainnet.

3.2.2 Technical scheme

Optimism’s Optimistic Ethereum is a representative implementation of Optimistic Rollup. Its core technical ideas have been discussed in depth in the first two chapters and will not be repeated here, but it needs to be specifically explained for its OVM.

Optimism supports the use of OVM on the second-tier network. On the one hand, it is compatible with the Ethereum virtual machine to ensure maximum versatility. On the other hand, some adaptive adjustments have been made to ensure that OVM can implement Optimistic Rollup. These adjustments mainly include three aspects. The first aspect is to adjust some opcodes in the virtual machine to ensure that the program can get the same results when executed on the first and second layers, such as adjustments to TIMESTAMP, ADDRESS, and other opcodes; The second aspect is to adjust the compiler to ensure that the programs written by Solidity can be correctly compiled into the opcodes supported by OVM; the third aspect is to modify the Geth client to be compatible with OVM’s transaction processing methods.

3.2.3 Features

 Security is weaker than one level. The scheme of the fraud proof route relies on a layer of censorship resistance. If the amount of funds in the second-level transaction is large, it may induce the first-level miners to launch a 51% attack to review the challenge transaction, and the false transaction submitted by the second-level malicious sorter cannot be successfully challenged.

 Long exit period and low capital efficiency. Op Rollup’s game model based on economic incentives makes transactions indefinite before the end of the challenge period, and end users who cannot run full nodes cannot verify the certainty of transactions in advance. Therefore, Op Rollup has a longer verification time than ZK Rollup. The challenge window under the PoW consensus mechanism is about 2 weeks, and the challenge window under the PoS consensus mechanism is 1 week.

 There is no user activity hypothesis, but a verifier is required. The Optimism team’s solution guarantees the availability of data on the first level. Although the status of the first and second levels still needs to be monitored to prevent fraud, it does not require users to monitor themselves and can be replaced by a third-party verifier.

 High flexibility and support for general smart contracts. Optimistic Ethereum is the first Rollup solution that has a complete cross-layer migration function without the need for large-scale rewriting of smart contracts, that is, the cost of contract code migration for applications on Ethereum is very low. ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? Therefore, in the short term, it has become the solution that many application teams pay attention to and choose.

 Low calculation overhead and low gas consumption for one layer. The validity of the state transition in this solution does not need to be actively verified at the first layer, which can save a lot of gas consumption for verification compared with the ZK-based solution. And it saves the computational overhead of generating the certificate in the second layer.

 The throughput improvement is very limited. With pure Rollup technology, the increase in throughput is limited by the gas limit of a layer of blocks, which is very limited. In addition, Op needs to provide more intermediate state data to facilitate the challenge, so it can only bring dozens of times Throughput improvement is the most limited solution among all types of Layer 2 technologies.

3.2.4 Application

Although Optimistic Ethereum based on Optimistic Rollup is inferior to ZK technology in terms of security and capital efficiency, its EVM-compatible solution is expected to be the first to land in Rollup technology, and many teams adopt it as the next stage of expansion. solution. Currently, Synthetix has implemented a pledge service on Optimistic Ethereum, and Uniswap has been cooperating with it to promote the implementation of the second layer, and recently announced that it will launch an alpha version on it. . Volmex develops applications on Optimism’s local testnet and deploys OVM. IDEX has launched version 2.0 with low latency and high TPS. MakerDAO provides Optimism with a two-tier DAI quick withdrawal solution to shorten the withdrawal time to a few minutes. Compound expects to choose Optimistic Rollup. Saddle will migrate smart contracts to Optimism in the future.

3.3 Offchain Labs

The Arbitrum solution was proposed and created by Offchain Labs. It was originally a pure research academic project. After continuous optimization and improvement, it gradually turned into practice.

This solution is also based on the Optimistic Rollup solution, which maintains security through the game model of economic incentives and maintains the validity of transactions through fraud proofs. The main difference lies in the challenge mechanism and the implementation form. At present, the Arbitrum mainnet has not yet been launched, but it has been running on the main testnet of Ethereum for a period of time, and its performance is good. The data of the test case shows that its optimal throughput is around a few hundred, and the challenge period is only tens of minutes. However, the shorter challenge time setting may bring some security problems, which need to be further solved and improved by the technical team.

3.3.1. Project Progress

So far, the Arbitrum testnet has been running smoothly for about six months. In March 2021, the Offchain Labs team updated the fourth testnet version and selected it as a candidate version of the mainnet. On May 28th, its mainnet beta version, Arbitrum One, has been opened to developers. If nothing happens, its public mainnet will be launched in 2021. According to Arbitrum’s roadmap, the next step for the team is the official launch of the mainnet. To this end, the team is actively cooperating with multiple project parties to jointly conduct network integration, audit and stress testing.

According to the current progress, Arbitrum may overtake Optimistic Ethereum and become the first general-purpose Rollup on Ethereum. This is a major breakthrough for the entire Ethereum ecosystem and Rollup.

3.3.2. Technical Solution

The design of the Arbitrum technical solution is similar to Optimism, which is compatible with Ethereum smart contracts, and can maintain the validity of transactions through fraud proofs and economic games. The main difference between the two lies in the challenge mechanism. Optimism only requires the sorter and the verifier to perform a fraud proof interaction to determine the result. Arbitrum believes that one interaction may cause a fraud proof to contain a large number of transactions and exceed the gas limit, and proposes that the fraud proof is caused by a single instruction execution exception. No need to execute all instructions. Therefore, Arbitrum divides the fraud proof into multiple rounds of steps. It only needs to prove that the sequencer is abnormal when executing a certain instruction, which can prove that the sequencer is evil and save costs.

3.3.3. Features

Arbitrum’s solution is consistent with the main features of Optimism Rollup. We will not go into details, but mainly focus on the changes brought about by changes in the fraud proof mechanism.

 Multiple rounds of fraud proof interaction. Arbitrum uses multiple rounds of fraud proofs to verify the validity of transactions, reducing the gas consumption for a single challenge, and there is no need to worry about gas fees exceeding the limit.

 Stronger compatibility with EVM. Although the OVM of the Optimism team is compatible with the EVM, it is not 100% compatible. Existing projects still need to modify the code when migrating from the first layer. The Arbitrun team’s solution is almost 100% compatible.

 Multi-step transactions may have security issues. The validity verification of Arbitrum transactions requires multiple rounds of interaction, and the built-in virtual machine needs to support an asynchronous mechanism, which is more complex and has a larger amount of code, which may have security issues.

3.3.4. Application

Due to strong expectations for Arbitrum’s landing, many applications have announced support for the Arbitrum ecosystem. Including Uniswap, Sushiswap, MCDEX, Bancor, ImToken, etc. Among them, the Uniswap community has voted to deploy V3 on Arbitrum; the V3 version of the decentralized perpetual contract exchange MCDEX that can create contracts without permission has been registered in the Arbitrum test network, and the development team is cooperating with the development team to promote the test and application of the program ; At the same time, MCDEX V3 also plans to complete the deployment immediately after the Arbitrum mainnet goes online, and is open to users; in addition, OKEX also announced that it will support Arbitrum network recharge and withdrawal. Users no longer need to interact with the first layer of Ethereum, reducing transaction fees.

3.4 Starkware

StarkWare is a zero-knowledge proof research and development organization from Israel, focusing on the research of Ethereum’s second-layer expansion technology. The team’s technical accumulation in the second layer is also very deep, including the second-tier technical route, the second-tier network network, the zero-knowledge proof protocol, the programming language, and the second-tier applications. Almost all the technical core points of the second floor are covered.

The underlying technology of Layer 2 that it proposed was Validium, and then Volition was further introduced. The StarkWare team has launched a decentralized two-layer expansion network, StarkNet, which supports general computing on Ethereum and has a certain degree of permission-free and censorship resistance. According to the StarkNet roadmap announced by StarkWare at the end of January this year, the plan is divided into four phases to gradually realize decentralization and ecological integration. At present, the team has completed the construction of Phase 0, which mainly completes three important components, namely, the certification protocol zk-STARK, the programming language Cairo, and the exchange expansion solution StarkEx.

3.4.1. Project Progress

StarkWare has improved the currently popular SNARK algorithm and independently developed a new generation of zero-knowledge proof protocol STARK. The agreement was launched on the mainnet in June 2020, which can greatly improve operating efficiency and provide zero-knowledge signatures against quantum computing. It is the cornerstone of the entire StarkNet decentralized proof layer.

In addition, StarkWare also created a unique programming framework Cairo to generate STARK proofs for general computing. Cairo will be launched on the mainnet in October 2020, open to all developers. This framework is not only Turing complete, but also avoids the complicated circuit design in zero-knowledge proofs, and separates proof generation and verification. The StarkWare team continues to improve Cairo, introducing many new functions, syntax and internal plug-ins, and is currently exploring the application of voting scenarios.

StarkWare also launched StarkEx, the first STARK-based ZK Rollup application, in Phase 0. StarkEx is not only the first batch of specific applications of StarkNet, but also a second-tier expansion engine focusing on exchange scenarios. StarkEx first launched the Ethereum mainnet in June 2020, and then launched version 2.0 in December 2020. Version 2.0 is completely built on the Cairo framework and supports one- and two-layer interactions and functions such as ERC721, off-chain coin minting, and smart contract key recovery. Currently, StarkEx is still in an iterative update state. The team plans to launch StarkEx 3.0 in May 2021. This version will include L1 limit orders and batch long-term lightning loan functions.

According to the team plan, the following three stages correspond to single-operator single-application Rollup, single-operator multiple-application Rollup, and decentralized operation multiple-application Rollup. The deployment will be gradually completed before the end of 2022 (Figure 3-2).

Coin World-a detailed explanation of Rollup technology, applications and data

3.4.2. Technical Solution

The first two-layer solution proposed by Starkware is Validium, which stores data off-chain, but at the same time combines ZK’s ideas to prove the validity of state transitions. Specifically, the validity of the data off-chain is guaranteed by the off-chain notary. At the same time, the notary will convert the state of the off-chain transaction to generate a SNARK certificate and upload it to the chain. SNARK proves that it prevents the notary from uploading the wrong state and transferring it to the chain. But because the data is stored off-chain, notaries can collude not to submit the data and freeze the user’s assets. Therefore, in fact, the Validium solution is not a technology of the Rollup series, but after the issue of user assets being frozen in the Validium solution was discussed, Starkware launched a new solution, Volition. Volition is actually a combination of the ZK Rollup solution and the Validium solution (Figure 3-3). Users can choose whether to place the guarantee of data availability on the chain or off the chain according to their needs. Therefore, we still put the work of the Starkware team into this Rollup article.

Coin World-a detailed explanation of Rollup technology, applications and data

In the previous chapters, we introduced Matter Labs’ zkPorter solution. The idea of ​​this solution is derived from Validium, but in zkPorter, the off-chain guardian cannot freeze the user’s assets, and there is a shard in zkPorter. For ZK Rollup shards, data availability is guaranteed on the chain. Users can choose to put their assets in ZK Rollup shards or the availability of other zkPorter shards off the chain. So in fact, zkPorter’s solution is more similar to Volition’s solution.

3.4.3. Features

 The security is weaker than one level, and the notary has the right to freeze funds. Validium saves the data off-chain. The second-tier notary will only provide proof of state transition on the chain, and will not submit detailed transaction information. As a result, if the second-tier notary does not announce the latest status to the user, the user cannot Construct your own proof to prove the account status. Therefore, the second-tier notary may freeze user funds for extortion.

 The exit time is relatively short. Because the notary under the Validium scheme provides a proof of validity for the state transition, no challenge period is required, so the exit time is relatively short.

 No user activity assumption. Although this scheme does not guarantee the validity of the data on the chain and there is a possibility of fraud, SNARK proves that it can prevent notaries from submitting false transactions, so users do not need to maintain online frequencies to prevent fraud. In addition, even if the aforementioned notary public freezes funds, it cannot be resolved by the user staying online.

 It is more versatile than zkSync, but it is not compatible with EVM. The Starkware team has developed the Cairo language, and the application team can use this language to develop applications without the need to write and generate certificates by themselves. However, due to the incompatibility of EVM, the migration of existing Ethereum ecological applications requires additional development work, which is one of the important reasons why the Starkware team’s solution has not been widely adopted.

 Throughput has been greatly improved. Because the data is placed off-chain, Validium’s throughput improvement is an order of magnitude higher than that of ZK Rollup.

3.4.4. Application

Currently, many applications have announced the integration of StarkWare’s two-tier expansion plan. The decentralized autonomous organization BadgerDAO was launched on StarkNet in February; Celer also plans to use the Cairo programming language to develop a zero-knowledge proof-based version for its own expansion solution Layer2.finance; spot exchange dYdX, derivatives exchange DeversiFi and NFT trading The market Immutable has been launched to support the StarkEx program, which has generated more than $1 billion in transaction volume so far. Among them, DeversiFi was the first to use the StarkEx expansion engine to provide a token exchange function. Users entering the network from Layer 1 do not need to pay any gas fees; the second-layer network version of dYdX was officially launched on the Ethereum main network in April, providing ten types of tokens forever. Renewal of contract transactions; while Immutable Trading Market cooperated with StarkEx in the field of NFT and released the Alpha version of the second-tier solution ImmutableX, which supports blockchain card game players to conduct transactions.

4. Interpretation of the application plan

In the previous chapters, most of the content has been analyzed around the idea of ​​Rollup technology and the implementation of its main technical team, but in addition, applications are also a part of the Rollup ecosystem that cannot be ignored. In addition to some projects that have been running for a long time on the first layer of Ethereum, they will land on Rollup, and there are also some specially designed applications for the characteristics or shortcomings of Rollup (such as bringing liquidity fragmentation, challenging periods, etc.) . This section will also interpret three of the representative application schemes, and show the reader how the application featuring Rollup is designed.

4.1. Celery : Layer2.finance

Celer Network released the latest solution Layer2.finance in February 2021 to lower the threshold for using DeFi and share the transaction fees borne by individual users by aggregating demand. At the end of April 2021, the Layer2.finance v0.1 mainnet was officially launched, and currently supports AAVE, Compound and Curve three DeFi protocols. According to the data disclosed by the team, the total amount of locked positions has exceeded 1.4 million U.S. dollars a week after the program was launched, saving nearly 34,000 U.S. dollars in gas handling fees for more than 900 transactions, and its performance is good.

4.1.1. Problems solved

When talking about Layer 2, everyone is thinking more about moving the applications on Layer 1 to Layer 2, in order to realize the transfer of computing and storage to Layer 2 to reduce the load on the main chain. However, when this kind of scheme is implemented, it often involves the migration of code, capital, and ecology. Under the current development stage of Layer 2, these migrations are not easy. Celer’s layer2.finance does the opposite, does not transfer the original application on the chain, aggregates the transaction instructions on Layer2, and then executes them in a unified manner on Layer1, bypassing the aforementioned problems and reducing transaction costs.

4.1.2. Scheme

Celer proposes a new Layer2 solution Layer2.finance based on in-situ expansion. The program contains the following parts:

First, users need to deposit funds on the Ethereum chain into a layer of Rollup fund pool contract of Layer2.finance. These funds will be divided into three different states: idle, committed and allocated. Among them, the committed funds represent the intermediate state of the transaction from submission to actual execution; the allocated funds represent the liquidity voucher stToken received by the user after the transaction is executed, which can be used to redeem liquidity in the future and convert the proceeds to idle funds.

Then, users can allocate funds in layer.finance’s second-tier network, that is, invest funds into different DeFi protocols to obtain revenue or withdraw from the agreement.

Subsequently, the block producer of Layer2.finance will collect transactions on the Rollup chain and aggregate and classify them according to the destination DeFi protocol address. When enough transactions have been aggregated or the fixed period is over, the block producer will package these transactions into blocks and provide the main chain with the state root of each user and the specific plan for fund allocation.

Finally, the on-chain contract of Layer2.finance executes the corresponding fund allocation operation according to the received instructions. At the same time, the block producer will also update the fund status of the second-tier user based on the first-tier transaction result, and return the user’s corresponding liquidity certificate after confirming that the fund allocation is correct.

Coin World-a detailed explanation of Rollup technology, applications and data

Since Layer2.finance currently uses the Optimistic Rollup framework, there will be a challenge period when the Rollup block interacts with the first layer. During this challenge period, if the Layer2.finance protocol makes a wrong allocation of funds, anyone can submit a fraud proof to roll back the transaction. In the future, Layer2.finance will adopt the ZK Rollup route to adapt to high-concurrency aggregation transaction scenarios, and it is no longer necessary to set a challenge period to ensure the effectiveness of state transitions.

4.1.3. Advantages

 Low cost. If DeFi is likened to a subway station, then Layer 2.finance is the subway that shuttles through various DeFi agreements. Once users change the high-consumption “special car” in the past, they only need to buy a cheap “metro ticket” and reduce the cost of interaction between individuals and DeFi through the form of “multi-person grouping”.

 No need to migrate DeFi protocol. For users, their own funds can still be used in multiple DeFi protocols on the chain as before, reducing the problem of liquidity fragmentation caused by Layer 2; for each DeFi protocol, it can not only save the development of dedicated The work of the second-tier network version can also realize the accumulation of its own second-tier users by connecting to Layer2.finance.

 Scalable scalability. In the short term, a single Layer 2.finance is limited by the capacity on the chain, and may not be able to be maintained as the transaction scale increases; but in the long term, once ETH2.0 is implemented, the system can add multiple Layer 2.finance Rollups. Link to the corresponding liquidity system, breaking the upper limit of scalability.

4.1.4. Limitations

Layer2.finance also has certain limitations at present. The first is the delay caused by the package aggregation transaction. There is a fixed delay between the user’s intention to allocate funds and the actual allocation of funds, and it is necessary to make a choice in cost and timeliness; second, the program has limitations in advanced operations, users It is not possible to implement advanced customized combinations of multiple DeFi protocols; finally, the user’s choice in this solution is limited. At present, Layer2.finance only has three DeFi agreements online. Although more strategic agreements will be gradually integrated in the future, projects with relatively stable and conservative yields may be given priority.

4.2. Starkware:Caspian

StarkWare released the L2 AMM liquidity aggregation solution Caspian in April 2021, which can effectively cope with the liquidity fragmentation problem caused by the diversion of Layer 1 liquidity to the second layer. According to the team’s estimation, this plan is expected to be realized in the StarkEx3.0 upgrade that will be launched in June, but it seems to be delayed at present.

Coin World-a detailed explanation of Rollup technology, applications and data

4.2.1. Problems solved

As offline expansion gradually becomes the main theme of the development and construction of the Ethereum network in 2021, a new AMM project will be born on Layer 2. The existing AMM project on the first layer will also migrate part of the liquidity to the second layer, resulting in the liquidity of the first layer being lost. Diversion, aggravating the problem of capital fragmentation. For AMM applications, their capital accumulation effect is very significant, and often requires a large amount of capital to provide a good trading experience. Therefore, it is very necessary to properly solve the problem of liquidity fragmentation and improve capital efficiency.

4.2.2. Scheme

StarkWare proposed Caspian, a two-tier-driven AMM design scheme, which places transactions on the second-tier, and then allocates funds to each transaction address from the AMM pool on the first-tier. Caspian is divided into two parts: off-chain and on-chain. The off-chain includes operators, traders, and liquidity providers. Among them, the operator is a market maker that can process two-layer network transactions, and it can process multiple transactions in batches. Transaction, when a batch transaction ends, a STARK validity certificate will be generated, and the transactions in the batch will be settled according to the status change; the trader refers to the user on each second-tier application; and the liquidity provider is the ether The various liquidity providers on the blockchain. On the chain is an AMM smart contract driven by Layer 2 and a StarkEx contract. The former is a standard AMM contract, but the difference is that its only counterparty is the off-chain operator and the withdrawal has to wait for the previous batch The second transaction processing can only be carried out; the latter is the StarkEx system that supports operators. The specific process of the program is as follows:

First, the operator aggregates a batch of transactions sent by the second-tier users, and matches the received quotation orders by themselves; then, the operator can generate a limit order in the AMM contract on the chain, and generate it in the batch The net balance of the transaction is matched with the order to complete the user’s remaining fund allocation; finally, the operator sends the batch of transactions to the StarkEx system to generate a batch of STARK certificates, and complete the settlement and status of the batch of transactions after verification by the verifier Update. In the whole process, the liquidity of the tokens in the AMM contract pool is provided by a layer of liquidity providers. The essence is to maintain the liquidity of the tokens at L1 and allocate funds according to the L2 transaction instructions.

Coin World-a detailed explanation of Rollup technology, applications and data

In addition, in Caspian’s design, a lightning loan function has been added. By extending the loan period to the entire transaction batch process, operators can mint off-chain and send them to traders in advance, but only if they must be destroyed at the end of the batch of transactions. In this way, the efficiency of the operator as an intermediary in order matching can be greatly improved.

4.2.3. Advantages

At present, many applications can only rely on multiple market makers to deploy funds in different networks and implement market-making strategies. The Caspian solution can realize the deployment of instructions and the aggregation of transactions on the second layer, send funds to the user address in the liquidity pool of the first layer, complete the AMM across L1 and L2, and alleviate the liquidity caused by the second layer diversion of funds. Fragmentation problem.

4.2.4. Limitations

From the perspective of the design mechanism of the program, Caspian has a centralization risk. Because the operator is not only the counterparty of the AMM smart contract, but also the only object interacting with the first layer, it can decide whether to leave or leave part of the transaction requirements. Once malicious behavior occurs, it is likely to cause the loss of user funds; in addition, the solution is still conceptual At this stage, there are still some components to be added, such as L1 limit orders and batch lightning loans. The specific implementation of these functions will not be possible until the StarkEx3.0 network upgrade in June; finally, Caspian’s design ideas are similar to Celer’s Layer2.finance Similarly, the latter was launched in April and has a certain first-mover advantage.

4.3. MakerDAO: Dai Bridge

At the beginning of March, the MakerDao smart contract team released a new solution, Optimism Dai Bridge, on its official forum to support fast withdrawals, and was used to solve the problem of Optimistic Rollup requiring a week of withdrawal time. According to the team, this feature will be officially launched in the third or fourth quarter of this year.

4.3.1. Problems solved

Since Optimism draws on Plasma’s fraud proof mechanism in its design, the transfer of tokens from the first layer to the second layer network can be completed quickly, but the reverse movement requires users to wait for a dispute period of about one week to verify whether the status is updated correctly. . The Maker team believes that too long time for fund withdrawal will become an important factor restricting the development of Optimistic Rollup and affecting user experience.

Figure 5-4 Comparison of Optimism deposit and withdrawal time

Coin World-a detailed explanation of Rollup technology, applications and data

4.3.2. Scheme

Optimism Dai Bridge introduces an oracle machine to quickly verify the transactions submitted by the sorter. After the verification is correct, the DAI that the user wants to withdraw on the second floor is used to cast the same amount of DAI on the first floor through the bridge of the intermediate token fdai, which avoids a long time. The problem of capital utilization and composability decline caused by the waiting time.

The specific process of the program is as follows: First, all transaction requests related to oDai on the second layer (DAI on the second layer is called oDAI in this program) will be on the chain CTC (Canonical Transaction Chain, which is the solution of the Optimism team) A component of the) contract is recorded; then, the transaction withdrawal request will be verified by Maker’s oracle to confirm the validity and amount of the transaction; the verified withdrawal transaction will be mapped to the first floor to cast the corresponding amount of fDai These fDai can be regarded as the user’s withdrawal vouchers for the DAI originally locked on the first floor; finally, the user pledges the fDai in his hand to cast a new DAI on the first floor for the user to withdraw. When the challenge period of the transaction ends, the mortgaged fDai and the DAI locked in the first-level contract will be liquidated, and the user only needs to pay a certain amount of interest. In this way, users do not need to wait for the one-week lock-up period of DAI, and withdrawals can be realized almost immediately.

Not only that, the Maker team also proposed to extend this service to the rapid exchange of any second-tier tokens. In addition to the stable currency DAI, users can first convert their assets to oDAI on the second layer, then use the Optimism Dai Bridge to exchange oDAI for DAI, and finally exchange them back to the original assets according to the ratio. This process requires the integration of AMM on L2 and collaboration with AMM on L1. If it is successfully implemented, the rapid flow of assets from the second layer to the first layer can be greatly improved.

The core of the whole scheme is to believe in the advance verification of the transaction status by the oracle, and therefore believe in the finality of the withdrawal transaction, and release the funds to the user in advance.

Coin World-a detailed explanation of Rollup technology, applications and data

4.3.3. Advantages

 Fast withdrawal time. Solved the pain points of Optimism users and shortened the withdrawal time from one week to a few minutes.

 No counterparty is required. Maker itself has Dai’s issuance capabilities. Here we just use fDai as a bridge to realize Dai’s issuance. In addition, the solution is logically connected with the existing mortgage lending agreement to provide asset protection. Users only need to interact with the Maker protocol itself, without the counterparty participating in the transaction process.

 Strong flexibility and high liquidity. The system has established the fDAI library of the Maker protocol. Users can not only obtain fDAI according to the above scheme, but also trade fDAI from other users to cast DAI and complete withdrawals.

 Guarantee the interests of second-tier users. Even if the oracle fails, causing the over-issue of DAI, it will not affect the interests of the second-tier users. The reason is that the increased DAI is equivalent to the liabilities of the Maker agreement. At this time, the debt auction mechanism in Maker will be triggered. The system will increase the amount of MKR in circulation to pay off the debt and transfer the loss to MRK holders. The value of DAI locked in the contract on the first layer and oDAI in the second layer are still equal.

4.3.4. Limitations

In this scheme, it is assumed that the oracle is operating normally and can be trusted, but the original scheme does not explain the more detailed working principle of this oracle, and it does not rule out the occurrence of the oracle and the second-level sequencer colluding or predicting. Situations such as machine downtime.

Five, data performance

The above detailed introduction of the current mainstream Rollup representative projects and application directions, although most of them are still in the early or early stage of the launch, but there are some data worthy of attention. This chapter will compare and analyze mainstream projects in terms of capital carrying, development progress and actual performance.

As of June 25, the value of more than 1.18 billion U.S. dollars was carried by the Ethereum Layer 2 (Layer 2 data in this section does not include the side chain) project, accounting for approximately 2.57% of the total lock-up volume of nearly 45.9 billion U.S. dollars in Ethereum DeFi. Among them, Rollup occupies 32.77% of the funds of the Layer2 program. According to the data of the carrying funds of the head projects in each plan, ZK Rollup accounted for 29.23%, followed by Optimistic Rollup (3.54%) and Validium (1.73%).

Due to the slow implementation speed of the Rollup system, there is also a certain degree of development difficulty in project migration. Therefore, the overall capital carrying capacity has not yet seen a second flashpoint since the launch of pioneer projects such as ZKSwap and Loopring. At the same time, with the rise of the Polygon ecosystem in the past two months, it disrupted the pattern of the entire Layer 2 track, causing the proportion of Rollup branch funds to drop by more than 50% since the end of April, and the proportion dropped by more than 17 percentage points in the past two months. .

Coin World-a detailed explanation of Rollup technology, applications and data

The ZK system relies on the early rapid deployment of ZK Swap and Loopring to the second-tier Ethereum exchange, and currently it still carries nearly 85% of the funds under the direction of Rollup; the OP system is based on the early layout of the head project Synthetix, which carries nearly 10% of the funds of the branch. ; Validium, represented by StarkWare, was launched late and its application scenarios are limited to a few decentralized exchanges, only carrying nearly 5% of the branch funds.

Coin World-a detailed explanation of Rollup technology, applications and data
Coin World-a detailed explanation of Rollup technology, applications and data

On the whole, ZKSwap and Loopring are the pioneers of the ZK series, carrying about 123 million U.S. dollars and 140 million U.S. dollars, respectively, and currently occupy the lead among the four technical routes studied in this article. It is worth mentioning that, as a new L2 DEX, ZKSwap has shrunk by more than 90% from over 1.3 billion U.S. dollars in the past two months to the current 123 million U.S. dollars. This may be the common dilemma faced by DEX that independently developed the ZK Rollup path: After the early mining dividends disappeared, how does the technology that does not support EVM break through the blockade of L2 asset islands? From the perspective of the solution, we see that ZKSwap has made two types of attempts: through overweight mining, repurchase and destruction of the ecological token ZKS to continue to stimulate users to enter; through the development of the NFT protocol to try to increase the gameplay, this function has not yet been launched. At this stage, the former is a strategy aimed at stock users, while the latter may open up new incremental markets. In addition, although dYdX, as an early project, also adopted the StarkEx solution, it used its ZK Rollup version. Relying on its first-level TVL conversion, it also provided a bonus for the ZK series of carrying funds.

The OP plan is limited by the delayed release of the Optimism team. Currently, the carrying funds are basically supported by Synthetix’s pledge function. In the future, with the synthetic asset casting at the core of Synthetix, the access to the second-tier version of Uniswap V3, and the migration of other head Defi applications, its carrying capital may be greatly increased. Unlike the current ZK path, OP is naturally friendly to EVM and smart contract development, or is easier to replicate and create ecological heat; but at the same time, OP’s longer exit cycle in mechanism will exacerbate the problem of asset islands in another dimension, and users It may need to think twice before entering the ecology, which puts forward higher requirements on the safety and profitability of each project. It is speculated that early or only sufficiently mature projects can attract a large amount of funds.

Finally, Validium has a relatively small ecological environment due to the connected projects such as DeversiFi and ImmutableX, so the overall carrying capital is relatively small. Arbitrum has just entered the developer testing stage, and the emergence of a certain amount of funds is still to be observed after its main network is officially launched and users are connected.

5.3 Actual performance

In terms of actual performance, we mainly observe the throughput (tps), the time to withdraw/exit to the first floor, and the improvement and change of the overall fee rate compared to Ethereum.

We have listed the comparison of recent actual throughput (tps) of each project within the statistical scope in Figure 5-2. It can be seen that although the theoretical tps of each project has a greater increase than the value of 15 tx/s in Ethereum. The ZK series supports 100 times the theoretical throughput peak of Ethereum, and the OP series is about 33 times (500 tps) of Ethereum. However, since all the projects are still in the beginning of the launch, the transaction activity is still not high, and the functions are not yet available. It is completely open, so the measured throughput value is still very low.

Judging from the time it takes to withdraw funds to the first floor, the Rollup program is still relatively slow at present. Although in theory the transfer of funds between the first and second layers of ZK Rollup can withdraw funds within a few minutes, because the transaction activity is still not high enough, due to the consideration of reducing the single transaction fee, the current withdrawal time can only be achieved Level within a few hours; the fastest ones such as ZKSwap and Hermez also take 20 minutes. As Optimistic Rollup has set up a fraud proof mechanism, it often takes about 1 week to withdraw funds.

Coin World-a detailed explanation of Rollup technology, applications and data

In terms of costs, for projects that are currently online or under test, the cost of performing basic functions such as transfer and clearing in the second floor has been greatly reduced, and the price is less than 1 US dollar; transaction behavior depends on the profitability of each project The models are quite different. In the first and second layers of deposits and withdrawals, due to the interaction with the contract on the first layer of Ethereum, fees still need to be charged based on the Ethereum rate, which is less than or equal to the ordinary transaction fee of Ethereum. Among them, the recharge part of the fee is due to the automatic execution of the transaction, so it generally depends on the complexity of the project code. According to the survey, the current overall recharge fee of the project is about 0.5-1 times of an ordinary transfer fee of Ethereum. In terms of withdrawal, the project method is slightly different. For example, ZKSwap charges a fixed L1 network fee of $5; the Optimism team in the test decided to reduce the fee in the early stage; the actual withdrawal fee of Loopring is about 1/4 of the Ethereum transaction, and the early stage is reduced. ; ZkSync is basically equivalent to Ethereum transfer transactions.

Combining funding data and performance, the current ecosystem under the Layer 2 solution is still quite early, and it is still waiting for the head DeFi projects to converge under the same two-tier project, attracting a large number of users to migrate through composability and leading the wave. The current difficulty is mainly due to the low maturity of zkSync and Optimism, which have obtained a large number of DeFi head projects. The official versions supporting all functions are planned to be launched in August and July, respectively. Head projects including Curve, Sushi, Uniswap, Compound, etc. have not yet released a version that can be tested by users.

In the future, with the smooth landing of the two projects, and the above-mentioned head projects have also launched two-layer versions, users can experience more complete on-chain activities in a Layer 2 ecosystem, and the speed and cost can be “how fast and cost-effective” , It will gradually form a virtuous circle. At the same time, since Uniswap v3 was launched, although the capital efficiency has been greatly improved, the corresponding costs have also continued to rise. This can be greatly alleviated in the second-tier version, or it will be supported by more small and medium-sized liquidity providers. The new projects developed by its NFT are also very exciting.

On the whole, the progress of each Rollup project has accelerated since 2020, and the development progress and the amount of funds carried have improved significantly, but it is still in an early stage; ZK is due to the early entry of ZKSwap and Loopring, and the OP is about to come out. In terms of performance, due to the immature ecology and activity, the measured performance of each project still has a large gap based on its theoretical peak, but the high cost has been basically reduced. However, due to factors such as the difficulty of technology development and implementation, the safety and ecological considerations of the project party, and the user’s choice based on habits, the overall situation is still in the early stage, and the ecology is not yet complete.

6. Summary and Outlook

As a new generation technology of the second layer of Ethereum, Rollup has higher expectations than Lightning Network, Plasma, sidechains, etc. At present, Rollup is still mainly in the early stage of technology accumulation and difficulty overcoming, and it has not yet rolled out the application ecology on a large scale.

From the technical landing, it is foreseeable that the Optimistic Rollup route plan can be the first to realize a universal Layer 2 network compatible with EVM, and the general plan will be implemented before the ZK system technology. For Layer 2, regardless of the type of Rollup, compatibility with EVM will be an important factor in determining whether the ecosystem can grow rapidly. This is not only reflected in Rollup, but in the side chain field, we can also see compatible EVM Polygon and the incompatible xDai have a huge difference in development. At the same time, due to the limitations of the technology itself, it is expected that the ZK series and the OP series will work on EVM compatibility and shorten the exit time respectively in the future to overcome the obstacles brought about by this. In addition, cross-Layer 2 interaction will be another important issue in the long term. Solutions in this field are likely to be based on scenarios and trust-based solutions will be born first.

From an ecological point of view, all branches under the Rollup direction are currently in the early stage and the ecology is not perfect. Although we have observed that the top projects are already deployed on ZK, OP and Arbitrum, the overall category is still dominated by DEX. With the advancement of Rollup technology in the second half of last year to the present, we will see important updates and landings of the various head teams of Rollup in the second half of this year. From this, we also speculate that the first batch of landed projects will still be head DEX, wallets, oracles, and some data-type middleware projects; as the first batch of infrastructure continues to improve, various Rollup projects continue to be technically optimized , The head defi application will begin to be implemented on a large scale on Layer 2; as throughput increases and transaction fees drop by orders of magnitude, the shackles that are bound to the first layer of applications will be unlocked, cross-Layer 2 interaction and cross-Ethernet With the simultaneous follow-up of the technology of Fang Interactive, a new defi scene will be born.

Whether the future of Rollup has come, we look forward to it together.


[1] https://zksync.io/faq/

[2] https://community.optimism.io/docs/

[3] https://offchainlabs.com/Arbitrum-USENIX.pdf

[4] https://www.chainnews.com/articles/996131059338.htm

[5] https://ethfans.org/posts/the-why-s-of-optimistic-rollup

[6] https://ethfans.org/posts/whats-up-with-rollup

[7] https://medium.com/offchainlabs/whats-up-with-rollup-db8cd93b314e

[8] https://blog.godsunchained.com/2021/04/07/immutable-x-marketplace-early-access/

[9] https://www.theblockcrypto.com/linked/100653/dydxs-layer-2-live-ethereum-scaling-solution-starkware

[10] https://medium.com/starkware/starks-over-mainnet-b83e63db04c0

[11] https://mp.weixin.qq.com/s/fGX1vZ9ylp3QAzBK0GIjVw

[12] https://mp.weixin.qq.com/s/oRSnb0EyCGfUdj5f3GlpUQ

[13] https://mp.weixin.qq.com/s/ogqwq4oSa2D9SVKaF1w1sg

[14] https://www.sohu.com/a/445659790_100217347

[15] https://medium.com/starkware/caspian-an-l2-powered-amm-f20e93b5421

[16] https://www.youtube.com/watch?v=vDiMYP8vc60&list=PLcIyXLwiPilUFGw7r2uyWerOkbx4GFMXq&index=18&t=1s

[17] https://www.chainnews.com/articles/908635230658.htm

[18] https://www.chainnews.com/articles/021738991995.htm


1. Huobi Blockchain Research Institute and the projects involved in this report or other third parties do not have any relationship that affects the objectivity, independence, and impartiality of the report.

2. The information and data quoted in this report are from compliance channels. The sources of the information and data are considered reliable by Huobi Blockchain Research Institute, and necessary verifications have been made for their authenticity, accuracy and completeness. , But Huobi Blockchain Research Institute does not make any guarantees for its authenticity, accuracy or completeness.

3. The content of the report is for reference only, and the conclusions and opinions in the report do not constitute any investment advice for related digital assets. Huobi Blockchain Research Institute shall not be liable for any losses caused by the use of the contents of this report, unless it is clearly stipulated by laws and regulations. Readers should not only make investment decisions based on this report, nor should they lose their ability to make independent judgments based on this report.

4. The information, opinions and speculations contained in this report only reflect the judgments of the researchers on the date of finalizing this report. In the future, based on changes in the industry and updates of data and information, there is the possibility of updating opinions and judgments.

5. The copyright of this report is only owned by Huobi Blockchain Research Institute. If you need to quote the content of this report, please indicate the source. If you need a large quotation, please inform in advance and use it within the allowed scope. Under no circumstances shall this report be quoted, abridged or modified contrary to the original intent.

Posted by:CoinYuppie,Reprinted with attribution to:https://coinyuppie.com/a-detailed-explanation-of-rollup-technology-applications-and-data/
Coinyuppie is an open information publishing platform, all information provided is not related to the views and positions of coinyuppie, and does not constitute any investment and financial advice. Users are expected to carefully screen and prevent risks.

Like (0)
Donate Buy me a coffee Buy me a coffee
Previous 2021-07-13 05:43
Next 2021-07-13 05:47

Related articles