Coins: 14,011
Exchanges: 1,065
Market Cap: $2.501T 1.1%
24h Vol: $56.459B
Gas: 6 GWEI
Go Ad-free
Guides
TABLE OF CONTENTS

Optimistic vs. Zero Knowledge Rollups: Which Layer 2 is Better?

4.9 | by Joel Agbo

Optimistic vs. Zero Knowledge Rollups

Optimistic rollups take an optimistic approach to transactions, assuming that all transactions are valid until proved otherwise, although there is a challenge period where users can submit fraud-proofs around. However, zero knowledge rollups use validity proofs to confirm that every transaction is valid before submitting data to the Layer 1.

Optimistic rollups tend to be faster and cheaper due to lower computation requirements when compared to zero knowledge rollups, although users have to wait for the challenge period to elapse before withdrawals are processed.


Key Takeaways

  • Optimistic rollups bundle transactions on the execution layer, assuming that these transactions are valid although there is a challenge period of 7 days for users to submit fraud-proofs if they suspect a fraudulent transaction before transactions are confirmed on the Layer 1. 

  • Zero knowledge rollups perform a prior verification on the transaction through zero knowledge proofs before sending them to the consensus layer on the main network for final validation, which offers faster transaction finality.

  • While optimistic and zero knowledge rollups offer different benefits and drawbacks, Ethereum founder Vitalik Buterin believes zero knowledge rollups will win out in the mid to long term as zk technology improves.


Optimistic vs zk rollups

Layer 2 (L2) rollups are quite popular now as they offer cheaper and faster transactions on the Ethereum blockchain, enabling vertical scaling on the most-used blockchain.

What Are Rollups?

Rollups are a resource-management approach to blockchain scalability. As the name suggests, rollups work by bundling data from multiple transactions on the Layer 2 chain into a single transaction for confirmation on the Layer 1. In an article by Ethereum founder Vitalik Buterin, he mentions how rollups improve scalability while reducing gas fees for users:

“Rollups move computation (and state storage) off-chain, but keep some data per transaction on-chain. To improve efficiency, they use a whole host of fancy compression tricks to replace data with computation wherever possible. The result is a system where scalability is still limited by the data bandwidth of the underlying blockchain, but at a very favorable ratio: whereas an Ethereum base-layer ERC20 token transfer costs ~45000 gas, an ERC20 token transfer in a rollup takes up 16 bytes of on-chain space and costs under 300 gas.”

Layer 2 solutions adopt rollups as a means to scale the main network. Transactions on their execution layer are packaged in batches and each batch is sent to the main network for final validation. This way, they save time and cost for users and maintain the security and decentralization level on the main network by contracting the consensus layer of the mainnet to screen the transactions and add them to the network.

However, rollups differ in the steps they take prior to submitting the transaction data to the main network. This leads us to the two types of rollups currently available: Optimistic and Zero knowledge rollups.

What Are Optimistic Rollups?

There are a few parts to an optimistic rollup. First, as their name suggests, they take an optimistic approach to executing off-chain transactions, where they assume all Layer 2 transactions are valid unless challenged and proven fraudulent. They offer lower fees for end-users, as the fixed transaction costs are spread across the multiple transactions in each batch. 

Secondly, optimistic rollups do not publish validity proofs for transaction batches that are posted on-chain, and only rely on fraud proofs to identify cases where transactions are not calculated correctly. In an optimistic rollup, users who suspect foul play can challenge a rollup transaction by computing a fraud proof during the challenge period (usually 7 days). In the case of a successful fraud proof, the rollup will re-execute the transaction and update the rollup's state, while the sequencer who included the incorrect transaction in a block will receive a penalty. 

Finally, if there are no challenges to a rollup batch, once the challenge period ends, the batch is deemed valid and accepted on Ethereum, after which withdrawals requests will be released. 

Here are some known networks that operate using optimistic rollups:

Optimism

Optimism launched its mainnet in December 2021. It is a general-purpose EVM-compatible Layer 2 network built to scale Ethereum. It uses the optimistic roll-up technology to improve transaction speed and reduce costs. To verify the validity of batched transactions, Optimism uses a single-round fraud-proof screening to sieve through transaction details and flag inappropriate transactions.

However, at time of writing, Optimism's fraud-proof system is still in the testnet phase on the Goerli testnet, including three components: a Fault Proof Program (FPP), a Fault Proof Virtual Machine (FPVM), and a dispute game protocol. OP Labs claims that FPP and FPFM, paving the way for the development of multiple proof systems, where building with Optimism's OP Stack will eventually enable developers to built their own fault proof systems with these components. 

Arbitrum

Arbitrum was launched on August 31, 2021. Arbitrum hopes to scale the Ethereum network using the optimistic rollup technology. Arbitrum is also a general-purpose optimistic rollup network. Arbitrum expands on the security and rollup system on regular optimistic rollup networks. It uses a multiple-round fraud-proof system to thoroughly screen transaction batches. The major technical difference between Arbitrum and Optimism is that Arbitrum uses a multiple-round fraud-proof system while Optimism uses only a single-round fraud-proof system. As of September 2023, the Arbitrum team claims that not a single fraud-proof has been submitted on Arbitrum. That said, fraud-proof submissions on Arbitrum are currently limited only to white-listed actors, although the team claims that Arbitrum's fraud-proof feature will soon be permissionless, allowing anyone to push for the correctness of the chain when challenges are issued.

Arbitrum also runs the Arbitrum Nova, a sidechain network that future reduces transaction costs by 90%. Arbitrum Nova is notably a cheaper to use network compared to the main Arbitrum network, a chain that is also home to Reddit's r/cryptocurrency  MOON tokens.

opBNB

opBNB is an optimistic L2 network for the BNB Smart Chain, developed using the OP Stack. opBNB was launched on August 16, 2023, and hopes to support high-performance applications that demand high transaction volumes while boasting intensive daily active users on BSC. To futher bring down the cost of transactions, opBNB leverages BNB greenfield, a blockchain and storage platform, to act as a data availability layer. According to the development team, transactions on opBNB could cost as little as $0.0005.

Zero Knowledge Rollups

Zero knowledge rollups are very much like optimistic rollups in the way they handle transactions in groups and communicate with the consensus layer for final validation. However, unlike optimistic rollups that assume all transactions are valid, zero knowledge rollups subject each transaction to a screening process before they are added to the batch.

Zero knowledge validity proofs are able to conceal the details of a transaction while executing and validating the transaction, offering improved privacy. As the name implies, the parties have no knowledge of the core details of the transaction including the amount transacted and the transacting parties. However, this protocol is able to prove the validity of the transaction to the recipients and the network validators.

The two parties in a zero knowledge proof transaction are the Prover and the Verifier. The Prover is the sender of the transaction while the Verifier is the recipient. The ZK protocol mediates the transaction. The hidden information (details of the transaction) is the Witness.

To prove to the Verifier that a transaction is true, a Prover is meant to answer a question regarding the transaction. The Verifier generates the question (known as the Challenge) and sends it to the Prover. The Prover provides an answer (known as a Response) question and proves their knowledge of the Witness. The ZK protocol validates the answer provided by the Prover and relays the truthfulness of the transaction to the Verifier. Therefore, the only information the recipient of the transaction has is whether it is true or false.

Once a transaction’s integrity is proven this way they are added to the batch and sent to the main network for validation. Unlike optimistic rollups, these transactions are not subjected to further investigation, and funds can be withdrawn within 3 hours without needing to wait for a challenge period to elapse. 

Here are some examples of zk-rollups:

zkSync

zkSync is a Layer 2 network on the Ethereum blockchain that utilizes zero knowledge technology to improve the efficiency and cost-effectiveness of transactions on its network. zkSync Era, the project’s mainnet, is one of the first zero knowledge rollups and was launched on March 24, 2023. At the moment, all transactions in zkSync Era are transparent, with details available for public view, although the team has confirmed that there are plans to implement privacy to encouage improved adoption. 

While zkSync Era is currently the largest zero knowledge rollup in the space, it is EVM-compatible instead of EVM-equivalent, which results in faster prover times by making it easier to be a prover. However, it comes with the downside of more incompatibility with EVM, which means projects may need to change the code before deploying on zkSync. 

Consensys’ Linea Network

Linea is a zero knowledge L2 network developed with lattice-base cryptography. Unlike zkSync which is EVM-compatible, Linea is a type 2 ZKEVM and is designed to be fully EVM-equivalent. This means that applications previously deployed on the mainnet can be moved to the Linea network without the need to recompile the code into a new programming language bytecode before they can operate on the Linea network.

However, to stay competitive, Linea has to overcome the challenge around improving the prover time, as proofs for Ethereum blocks can take hours. 

Taiko

Taiko is an upcoming type 1 ZKEVM rollup that aims to be fully Ethereum-equivalent, where developers and users can leverage the power of Ethereum Layer 1 without needing to make any changes. Driven by the principle of "develop once, deploy everywhere", the CEO of Taiko believes that Ethereum needed a scaling solution that was similar to the original platform. His sentiments are echoed by Vitalik Buterin, who writes "type 1 ZK-EVMs are what we ultimately need make the Ethereum layer 1 itself more scalable... (they) are also ideal for rollups, because they allow rollups to re-use a lot of infrastructure." 

Taiko is also focusing on security and decentralization, and the protocol is planing to launch with a fully decentralized proposer and prover set, to allow anyone to perform those duties without whitelisting. 

Comparing Traits of Optimistic and Zero Knowledge Rollups

Optimistic and zero knowledge rollups have seen quite a level of adoption as cryptocurrency investors explore more cost and time-effective ways of performing routine cryptocurrency transactions, with rollups boasting over $2 billion in TVL. We have discussed how both functions and here are some differences they share;

Security and Validity Proofs (Fraud-Proofs and Zero Knowledge Validity Proofs)

Zero knowledge rollups employ smart contracts to handle the verification of transactions’ integrity through ZK validity proofs. In contrast, optimistic rollups consider transactions valid and depend on the fraud-proof system which adopts a tradition similar to the consensus systems. Validators make up the fraud-proof system and take up the role of screening out malicious transactions and alerting the system to remove the transaction from the queue.

In spite of there having been only a few challenges to date, considering every transaction as valid is already a security risk in an optimistic rollup; the fraud-proof system might be effective but doesn’t totally assure zero risk from optimistic batched transactions. While the challenge period in the fraud-proof system acts as an additional layer of security, it is still dependent on validators to flag potentially fraudulent transactions. On the other hand, the automation system in validity proofs removes the chances of operational errors in the validation of transactions before they are batched, and instant validations, as seen in ZK rollups, is a more secure approach to handling transactions, although this comes with longer proving time needed.

Transaction Finality

The challenge period in optimistic rollups is up to seven days. Therefore, these transactions are not hashed into the main network until this time. On the other hand, transactions on ZK rollups reach finality on the main network faster than optimistic rollups, as finality on the mainnet for each ZK rollup batch is instant. Due to this, the withdrawal period for both networks is different, as to bridge assets from optimistic rollup networks to the mainnet could take up to 7 days. Meanwhile, withdrawals on ZK rollups are completed as soon as the transaction batch is submitted to the mainnet and validated, usually taking a maximum of three hours.

Scalability and Cost

ZK-rollup transactions are relatively heavier due to validity-proof computations. A ZK rollup batch consumes up 500,000 gwei; this is high when compared to 40,000 gwei recorded in a normal scenario for an optimistic rollup. The lighter weight is due to the absence of complex mathematical computations in the batched transaction data. The light weight and low gas cost make optimistic rollup networks a cheaper and relatively more scalable option for users.

Privacy

The ZK validity proof is by original design, a privacy-focused verification system. It is able to prove that a transaction is valid without knowing the specific details of the transaction. This is quite different in optimistic rollups where the validators are aware of the transactions’ details and screen the data to detect inconsistencies. As a result, zero knowledge rollups are more privacy-oriented and could be a more viable option for privacy-focused applications.

Popularity

Optimistic rollups are relatively simpler technology, compared to zero knowledge rollups. Optimistic rollup networks were also some of the first general-purpose L2 scaling solutions to roll out and have enjoyed some fame due to this. The relative ease of developing general-purpose optimistic rollup networks also makes such networks more rampant, especially with the rise of the OP Stack, which makes it even easier for projects to roll out their own Layer 2. 

To date, the top three rollups by TVL are all optimistic rollups (Arbitrum, Optimism, and Base). While zkSync is in 4th place, DefiLlama reports that it only has an average of around 4% of the total rollup TVL.

TVL rollups all chains

The discrepancy in popularity is also thanks to significant differences in transaction costs. Currently, optimistic rollup networks offer cheaper transaction fees compared to ZK networks, which also contributes to the overall higher prevalence of optimistic rollup networks.  

EVM-compatibility

Optimism, Mantle, Arbitrum, and other similar optimistic rollup L2s are EVM-compatible, making it easy for developers to use Ethereum-native tools to develop dApps on optimistic rollups. However, not every zero knowledge rollup is EVM-compatible, requiring more work on the developer's end to ensure that dApps work on zk rollups. 

 
  Optimistic Rollups Zero Knowledge Rollups

Security

Validators in the fraud-proof system screen transactions over a period of time to detect and trim off malicious transactions.

The validity proof system uses a set of smart contracts to ascertain transaction validity instantly.

Scalability and Cost

Lower recorded fees, transactions are light.

Each batch consumes more gas and is heavier.

Transaction Finality

Transaction takes up to 7 days to reach finality on mainnet due to challenge period.

Each batch is validated instantly (no challenge period).

Complexity

Technology is simpler.

Technology is more complex.

Privacy

Fraud-proof validators can eavesdrop on transactions.

Validity proofs aim to provide a higher level of privacy.

Popularity

Relatively more popular based on TVL.

Less popular with users based on TVL. 

EVM-Compatibility

Generally EVM-compatible.

Differing stages of EVM-compatibility, which may require more work from developers.

 

Final Thoughts

The optimism of optimistic rollups might be regarded as a security and privacy weakness, at least relative to zero knowledge rollups. But this also gives it a strong performance score over ZK rollups, based on transaction costs and computation requirements. Both systems share unique strengths and weaknesses. But they are more of a complementary set rather than differing systems.

Thanks to interoperability protocols, crypto investors can resort to optimistic and zero knowledge rollup networks for their differing transaction needs. ZK-rollup networks for private, more secure transactions and instant withdrawals from L2 networks, and optimistic rollup networks when speed is paramount. But this is totally up to the user.

However, ZK rollups, despite being under the hood currently, compared to optimistic rollups, propagates the core values of blockchain technology. The complex technology accounts for the slower development and adoption, and as the technology continues to develop, these issues could get a viable fix. In 2023 alone, we've seen the number of ZK rollups catching up to the optimistic rollups, and as Vitalik opined, ZK rollups could be the endgame in the roll-up technology, where " in the medium to long term ZK rollups will win out in all use cases as ZK-SNARK technology improves."

This article only discusses the strengths and weaknesses of both systems based on the technology used. Note it is only for educational purposes and not financial advice. 

CoinGecko's Content Editorial Guidelines
CoinGecko’s content aims to demystify the crypto industry. While certain posts you see may be sponsored, we strive to uphold the highest standards of editorial quality and integrity, and do not publish any content that has not been vetted by our editors.
Learn more
Tell us how much you like this article!
Vote count: 14
Joel Agbo
Joel Agbo

Joel is deeply interested in the technologies behind cryptocurrencies and blockchain networks. In his over 7 years of involvement in the space, he helps startups build a stronger internet presence through written content. Follow the author on Twitter @agboifesinachi

Related Articles


Explore Polkadot's Ecosystem
Discover trending dApps, wallets, DeFi & more

What is Zeebu?
Learn more about the Web3 neobank


coingecko
Continue in app
Track prices in real-time
Open App
Select Currency
Suggested Currencies
USD
US Dollar
IDR
Indonesian Rupiah
TWD
New Taiwan Dollar
EUR
Euro
KRW
South Korean Won
JPY
Japanese Yen
RUB
Russian Ruble
CNY
Chinese Yuan
Fiat Currencies
AED
United Arab Emirates Dirham
ARS
Argentine Peso
AUD
Australian Dollar
BDT
Bangladeshi Taka
BHD
Bahraini Dinar
BMD
Bermudian Dollar
BRL
Brazil Real
CAD
Canadian Dollar
CHF
Swiss Franc
CLP
Chilean Peso
CZK
Czech Koruna
DKK
Danish Krone
GBP
British Pound Sterling
GEL
Georgian Lari
HKD
Hong Kong Dollar
HUF
Hungarian Forint
ILS
Israeli New Shekel
INR
Indian Rupee
KWD
Kuwaiti Dinar
LKR
Sri Lankan Rupee
MMK
Burmese Kyat
MXN
Mexican Peso
MYR
Malaysian Ringgit
NGN
Nigerian Naira
NOK
Norwegian Krone
NZD
New Zealand Dollar
PHP
Philippine Peso
PKR
Pakistani Rupee
PLN
Polish Zloty
SAR
Saudi Riyal
SEK
Swedish Krona
SGD
Singapore Dollar
THB
Thai Baht
TRY
Turkish Lira
UAH
Ukrainian hryvnia
VEF
Venezuelan bolívar fuerte
VND
Vietnamese đồng
ZAR
South African Rand
XDR
IMF Special Drawing Rights
Cryptocurrencies
BTC
Bitcoin
ETH
Ether
LTC
Litecoin
BCH
Bitcoin Cash
BNB
Binance Coin
EOS
EOS
XRP
XRP
XLM
Lumens
LINK
Chainlink
DOT
Polkadot
YFI
Yearn.finance
Bitcoin Units
BITS
Bits
SATS
Satoshi
Commodities
XAG
Silver - Troy Ounce
XAU
Gold - Troy Ounce
Select Language
Popular Languages
EN
English
RU
Русский
DE
Deutsch
PL
język polski
ES
Español
VI
Tiếng việt
FR
Français
PT
Português
All Languages
AR
العربية
BG
български
CS
čeština
DA
dansk
EL
Ελληνικά
FI
suomen kieli
HE
עִבְרִית
HI
हिंदी
HR
hrvatski
HU
Magyar nyelv
ID
Bahasa Indonesia
IT
Italiano
JA
日本語
KO
한국어
LT
lietuvių kalba
NL
Nederlands
NO
norsk
RO
Limba română
SK
slovenský jazyk
SL
slovenski jezik
SV
Svenska
TH
ภาษาไทย
TR
Türkçe
UK
украї́нська мо́ва
ZH
简体中文
ZH-TW
繁體中文
Login to track your favorite coin easily 🚀
By continuing, you agree to CoinGecko Terms of Service and acknowledge you’ve read our Privacy Policy
or
Forgot your password?
Didn't receive confirmation instructions?
Resend confirmation instructions
IT'S FREE! Track your favorite coin easily with CoinGecko 🚀
By continuing, you agree to CoinGecko Terms of Service and acknowledge you’ve read our Privacy Policy
or
Password must contain at least 8 characters including 1 uppercase letter, 1 lowercase letter, 1 number, and 1 special character
Didn't receive confirmation instructions?
Resend confirmation instructions
Forgot your password?
You will receive an email with instructions on how to reset your password in a few minutes.
Resend confirmation instructions
You will receive an email with instructions for how to confirm your email address in a few minutes.
Get the CoinGecko app.
Scan this QR code to download the app now App QR Code Or check it out in the app stores