Carefully! Lots of text.

Cryptocurrencies and blockchain are rapidly gaining popularity, pushing developers to find new ways to scale networks to meet growing demand. Sharding, sidechains, state channels, and rollups are all tools used to increase scalability. Blockchain rollups transfer the process of executing transactions to third-party chains, transferring the received data to the main network of the first level. In this article, we will look at two types of rollups that are used in the cryptocurrency space - optimistic rollup and zero-knowledge rollup (ZK rollup).

Introduction

Interest in cryptocurrency is actively growing, and some blockchains are unable to meet mass demand. This leads to network congestion and increased transaction fees. In order to solve this problem, solutions are being developed and tested to scale and increase throughput and transaction processing speed. Such solutions can be divided into two groups: solutions of the first and second levels.

Layer 1 scaling solutions (such as sharding) make changes directly to the main blockchain (also known as the underlying blockchain or layer 1 blockchain). In turn, second-level solutions work on top of the first-level blockchain. Such solutions include, for example, state channels, sidechains and blockchain rollups.

Blockchain rollups are protocols designed to provide high throughput and lower costs. They aim to solve a problem faced by many popular blockchains by grouping transactions and reducing the size of data for more efficient processing and storage.

What are blockchain rollups?

Rollup is a second-layer solution that aggregates transaction data and moves it outside the main network (first-layer blockchain). Transactions are executed off-chain, and assets are stored in a smart contract on the chain. Once processing is complete, transaction data is sent back to the main blockchain.

In theory, any first-tier solution can use rollup to optimize transaction processing and increase throughput. Rollups are an effective way to increase the speed of transaction processing on the blockchain.

There are currently two types of rollups: optimistic rollups and zero-knowledge rollups (ZK rollups).

What is an optimistic rollup

Optimistic rollup is a protocol that improves network performance by grouping multiple transactions together for further off-chain processing. The data obtained as a result of processing is transferred back to the main chain using data compression methods, which reduces commissions and increases the speed of transactions. According to Ethereum, optimistic rollups can increase scalability by 10-100 times.

Transaction confirmation in optimistic rollups

To improve efficiency, all transactions are considered valid by default. Such a high processing speed in this manner may raise security concerns. However, the point is that optimistic rollups use a fraud testing scheme with a dispute resolution period (dispute period). During this time, anyone can file an appeal and check whether the transaction was processed correctly and passed the fraud check.

If errors are detected, the rollup protocol will correct them by re-executing the transaction(s) and updating the block. Parties who approve the execution of an incorrect transaction will be punished.

Limitations of optimistic rollup

Despite eliminating the transaction verification process, optimistic rollups implement a dispute period that ZK rollups do not, which increases transaction processing time.

In addition, transactions in optimistic rollups generally take longer to complete than in ZK rollups. The completion time is the period during which the user waits for confirmation that his transaction has been completed and will not be canceled or changed. Withdrawals through optimistic rollups also take longer as they include a dispute period. Withdrawal of funds through ZK rollups, in turn, is carried out immediately as soon as the smart contract checks for fraud.

Some users also believe that optimistic rollups are less effective than ZK rollups. To complete transactions in an optimistic rollup, all data about this operation must be placed on the chain. When using ZK analogues, only on-chain fraud checking is required.

What are zero-knowledge rollups (ZK rollups)

Zero-knowledge rollups are protocols that group transactions together to be executed outside the main network. For each group, the ZK rollup operator provides data on the necessary changes after executing transactions in the group. Operators perform fraud checks to prove changes are correct. This evidence is much smaller than transaction data, making it much less time-consuming and costly to verify.

On Ethereum, ZK rollups reduce data through compression when recording transactions in Ethereum in the form of calldata, which allows for lower fees.

Confirmation of transactions in ZK rollups

ZK rollups use zero-knowledge proofs (ZKP) to confirm transactions. The prover provides ZKP to the other party (the verifier), thereby confirming that he has any information - that is, the transaction can be completed.

Here's how it works:

  1. The prover provides a mathematical proof that can only be obtained by him.

  2. Using this mathematical proof, the verifier can confirm the validity of the transaction.

  3. This allows you to verify the accuracy of information without disclosing its content.

Advantages of ZK rollups

When implemented correctly, ZK rollups can provide a high level of security for users. One of the key features that improves security is the use of zero-knowledge proofs. They ensure that the network can only function in a trusted state and that operators cannot steal user funds or harm the system in any way.

Another advantage of ZK rollups is that users do not need to monitor the network. ZK rollups store all data on the chain and use proof of authenticity for verification. The rollup operator cannot deceive anyone, which means that the likelihood of online fraud is completely excluded. In addition, ZK rollups allow you to withdraw funds to the main network without the need to cooperate with operators, but only by confirming ownership of tokens through the availability of data.

Similar to optimistic rollups, ZK rollups implement a mechanism for executing transactions off-chain to increase the speed of their processing.

Differences between ZK rollups and optimistic rollups

The table below shows the main differences between optimistic and ZK rollups.

Различия между ZK-роллапами и оптимистическими роллапами

The future of optimistic and ZK rollups

The future of optimistic and ZK rollups is still in doubt. With the spread and mass adoption of cryptocurrencies and blockchain, the demand for roll-ups, which help improve the efficiency of blockchains, will also grow. Blockchains will continue to test various scaling solutions, including sharding, rollups, and level zero. In the future, we will probably see the emergence and implementation of new solutions, either together with rollups or instead of them.

In conclusion

Due to the rapidly growing demand for cryptocurrencies and the identification of various limitations of blockchains, many projects have begun to offer new scaling solutions. In this article, we looked at the key differences between the two types of rollups - optimistic and ZK rollups. As rollups continue to be tested and used to solve different problems, a new, more advanced type of rollup will likely emerge that will help us achieve scalability and contribute to the mass adoption of cryptocurrencies.

  • Solutions for scaling the first and second levels of the blockchain

  • What are zk-SNARK and zk-STARK?

  • What is Zero Knowledge Proof (ZKP) and how does it affect blockchain?

Risk Warning and Disclaimer: The following materials are provided “as is” without warranty of any kind for general reference and educational purposes only. This information should not be considered financial advice or a recommendation to purchase any specific product or service. The value of digital assets can be volatile. The value of the funds invested may go up and down. You may not get your invested funds back. You are solely responsible for your investment decisions. Binance is not responsible for your possible losses. Does not constitute financial advice.