Optimistic vs. Zero-Knowledge Rollups: What’s the Difference?
Home
Articles
Optimistic vs. Zero-Knowledge Rollups: What’s the Difference?

Optimistic vs. Zero-Knowledge Rollups: What’s the Difference?

Advanced
Published Mar 3, 2023Updated Jul 12, 2023
6m

TL;DR

The increasing popularity of crypto and blockchain has led to developers seeking a way to scale by improving a system’s ability to accommodate the growing demand. Sharding, sidechains, state channels, and rollups are some approaches to scaling. Blockchain rollups offload certain transaction processes to a secondary chain while storing transaction data on the main Layer 1 blockchain. In this article, we explore the two types of rollups in the crypto space – optimistic and zero-knowledge.

Introduction

Due to rising crypto demand, some blockchains’ abilities are tested to their limits. This could lead to network congestion and expensive transaction costs. To address this, scaling solutions are being developed and tested to increase transaction throughput and speed. Such solutions can be categorized into two groups: Layer 1 and Layer 2.

Layer 1 scaling solutions like sharding make changes directly to the main blockchain (also known as a base or Layer 1 blockchain). Layer 2 scaling solutions run on top of a Layer 1 blockchain. Examples of Layer 2 scaling solutions include state channels, sidechains, and blockchain rollups.

Blockchain rollups are protocols designed to enable high throughput and lower costs. They aim to fix the problem many popular blockchains face by bundling transactions and reducing data size for more efficient transaction processing and storage.

What Are Blockchain Rollups?

Rollups are a Layer 2 solution that bundles up transaction data and transfers it off the main chain (or Layer 1 blockchain). Transaction execution is then performed off-chain, while assets are held in an on-chain smart contract. The transaction data will be sent back to the main blockchain upon completion.

Theoretically, any Layer 1 solution can implement rollups to increase transaction efficiency in terms of throughput. With rollups, a blockchain can increase the number of transactions processed and recorded within a certain timeframe.

Presently, there are two types of rollups – optimistic rollups and zero-knowledge rollups, or zk-rollups.

What Is an Optimistic Rollup?

Optimistic rollups are protocols that increase transaction output by bundling multiple transactions into batches, which are processed off-chain. After that, the transaction data is recorded on the main chain with data compression techniques that help lower cost and increase speed. According to Ethereum, optimistic rollups can improve scalability by 10 to 100 times.

How do optimistic rollups validate transactions?

Transactions are valid by default to increase efficiency. You may wonder if this would compromise security in favor of transaction processing speeds. However, optimistic rollups use a fraud-proving scheme, with a dispute-resolution period known as a ‘challenge period.’ Within this period, anyone monitoring the rollup can submit a challenge to verify if the transaction has been processed accurately through a fraud proof.

If that batch is found to have errors, the rollup protocol will rectify them by re-executing the wrong transaction(s) and updating the block. Parties who approve incorrect transactions for execution will be penalized.

Limitations of optimistic rollups

While there isn’t a transaction validation process, there is a challenge period that zk-rollups do not have, which increases the time taken for transactions to be finalized.

The finality of chains with optimistic rollups is also lower than that of zk-rollups. Finality is the measure of how long a user has to wait for a reasonable guarantee that the transactions will not be reversed or altered. Withdrawals on optimistic rollups are delayed as the challenge period needs to lapse before funds can be released. In contrast, withdrawals from zk-rollups take effect as soon as the zk-rollups smart contract verifies the validity proof.

Some people also view optimistic rollups as less efficient than zk-rollups. With optimistic rollups, all transaction data must be posted on-chain to finalize transactions. With the zk counterparts, only validity proofs are required on-chain.

What Is a zk-Rollup?

Zero-knowledge rollups are protocols that bundle transactions into batches to be executed off the main chain. For every batch, a zk-rollup operator will submit a summary of the required changes once the transactions in the batch have been executed. Operators have an additional role in producing validity proofs to prove that the changes are accurate. These proofs are significantly smaller than transaction data; therefore verifying them is quicker and cheaper.

On Ethereum, zk-rollups reduce transaction data via compression techniques when writing transactions to Ethereum as calldata, effectively reducing user fees.

How do zk-rollups validate transactions?

Zk-rollups use zero-knowledge proofs (ZKP) to validate transactions. ZKPs are used by someone called a prover who wants to convince another party, known as a verifier, that they possess knowledge, thereby verifying a transaction.

This is how it works:

  1. The prover provides a mathematical proof that only they can generate.

  2. The verifier uses this mathematical proof to verify the validity of the transaction.

  3. The information can receive validity proof without revealing the contents to the verifier.

Benefits of zk-rollups

Zk-rollups can offer a high level of security for users if implemented properly. One key feature contributing to this security is the use of zero-knowledge validity proofs. They ensure that the network can only function in a valid state and that operators cannot steal user funds or corrupt the system in any way.

Another benefit of zk-rollups is that users don't need to monitor the network. Zk-rollups store all data on-chain and require validity proofs. Therefore an operator can't cheat, and users don't have to worry about network misbehavior. Additionally, zk-rollups let users withdraw their funds onto the mainnet without having to cooperate with operators by proving token ownership via data availability.

Similar to optimistic rollups, zk-rollups also implement an off-chain execution mechanism to increase transaction execution speeds.

Differences Between zk-Rollups and Optimistic Rollups

Below is a summary of the differences between optimistic and zk-rollups.

Differences Between zk Rollups and Optimistic Rollups

What’s the Future of Zero-knowledge & Optimistic Rollups?

The future of zero-knowledge and optimistic rollups is still a question mark. As more people adopt crypto and blockchain, rollups may play a vital role in improving blockchain efficiency. Blockchains will likely continue to test various scaling solutions, including sharding, rollups, and layer 0. We could also see new solutions being created and implemented, either along with or instead of rollups.

Closing Thoughts

Since the demand for crypto has increased and stretched the limits of current blockchains, many have proposed different scaling solutions. In this article, we examined the inherent differences between two varieties of rollups, optimistic and zk-rollups. As rollups continue being battle-tested, we may eventually see a superior variety that could help us reach scalability for mass adoption.

Further Reading

Disclaimer and Risk Warning: This content is presented to you on an “as is” basis for general information and educational purposes only, without representation or warranty of any kind. It should not be construed as financial advice, nor is it intended to recommend the purchase of any specific product or service. Digital asset prices can be volatile. The value of your investment may go down or up and you may not get back the amount invested. You are solely responsible for your investment decisions and Binance Academy is not liable for any losses you may incur. Not financial advice.