Answers>Learn about Layer 2s & rollups>Optimistic vs ZK rollups
Optimistic vs ZK rollups
// Tags
optimistic rollupZK rollup
TL;DR: Optimistic and ZK rollups take fundamentally different approaches to Layer 2 scaling. Optimistic rollups post state updates to Layer 1 and assume they are valid unless challenged during a seven-day fraud proof window. ZK rollups generate a cryptographic validity proof alongside each state update, which Layer 1 verifies immediately with no challenge period needed. Optimistic rollups offer simpler architecture, stronger EVM compatibility, and a more mature ecosystem today. ZK rollups offer faster finality, near-instant withdrawals, and greater long-term efficiency, but involve more complex proof generation and historically harder EVM compatibility (though this gap is closing rapidly). The choice depends on your application's priorities: maximum compatibility and ecosystem maturity today versus faster finality and future-proof architecture.
The Simple Explanation
Imagine two different airport security systems. The optimistic approach is like TSA PreCheck: passengers are assumed trustworthy and pass through quickly, but random audits catch any problems after the fact. If someone is caught with something prohibited, the process is reversed. The ZK approach is like a full body scanner: every passenger is verified before they pass through, providing immediate mathematical certainty that nothing is wrong. Both approaches achieve the same goal (security), but through different mechanisms with different tradeoffs. PreCheck (optimistic) is faster and simpler but has a delay before full clearance. The body scanner (ZK) provides instant verification but requires more sophisticated technology.
How Optimistic Rollups Work
In an optimistic rollup, the sequencer executes transactions on L2 and posts the resulting state update to L1. The key word is "optimistic": the system assumes the state update is correct and moves forward without immediate verification. This optimistic assumption is what makes the system fast and cheap, because the L1 does not need to re-execute or verify every transaction.
The security comes from the dispute mechanism. After a state update is posted, there is a challenge window (typically 7 days on Arbitrum and Optimism) during which anyone can submit a fraud proof if they believe the state update is incorrect. A fraud proof demonstrates that executing the transactions produces a different result than what the sequencer claimed. If a valid fraud proof is submitted, the incorrect state update is reverted and the dishonest sequencer is penalized.
The practical consequence of this design is a 7-day withdrawal delay. When you want to move assets from an optimistic rollup back to L1, you must wait for the challenge window to pass before the withdrawal is finalized. Third-party bridge services offer faster withdrawals by fronting the liquidity, but the underlying protocol settlement still takes 7 days.
Major optimistic rollups include Arbitrum (the largest L2 by TVL), Optimism (which powers the OP Stack used by Base, Mode, Zora, and other chains), and Base (operated by Coinbase).
How ZK Rollups Work
In a ZK rollup, the sequencer executes transactions on L2 and generates a cryptographic validity proof (a zero-knowledge proof or ZK-SNARK/ZK-STARK) that mathematically proves the state transition was computed correctly. This proof is posted to L1 alongside the state update. The L1 smart contract verifies the proof on-chain, which is computationally cheap and fast (a few hundred thousand gas).
Because the proof provides mathematical certainty that the state update is correct, there is no need for a challenge window. The state is finalized as soon as the proof is verified on L1. This means withdrawals from ZK rollups to L1 can be processed in minutes to hours (the time it takes to generate and post the proof) rather than 7 days.
The tradeoff is complexity. Generating ZK proofs is computationally intensive and requires specialized hardware. The proving process adds latency to batch finalization. And achieving full EVM compatibility in a ZK context is technically challenging because the EVM was not designed with zero-knowledge proofs in mind. Early ZK rollups required developers to rewrite contracts in custom languages, but modern zkEVM implementations (zkSync Era, Polygon zkEVM, Scroll) now support Solidity with varying degrees of compatibility.
Major ZK rollups include zkSync Era, StarkNet (which uses Cairo instead of Solidity), Scroll, and Polygon zkEVM.
Choosing Between Them
Choose optimistic rollups when you need maximum EVM compatibility today, access to the largest L2 ecosystem and liquidity, the simplest developer experience (deploy existing Solidity contracts with minimal changes), and you can tolerate 7-day withdrawal delays (or use bridge services for faster exits).
Choose ZK rollups when you need fast L1 finality and near-instant withdrawals, stronger cryptographic security guarantees (math rather than economic incentives), better long-term efficiency as ZK proving technology matures, and your team can work with the current state of zkEVM compatibility.
In practice, the choice is increasingly moot for many applications. Both types continue to improve, and the L2 ecosystem is converging on shared standards and interoperability. Many teams deploy on multiple L2s simultaneously.
What is the main difference between optimistic and ZK rollups?
Both rollups execute transactions off-chain and post data back to Ethereum, but they prove correctness in opposite ways. Optimistic rollups assume transactions are valid and rely on a fraud proof window to catch cheating. ZK rollups prove validity up front with a cryptographic proof, so Layer 1 can trust each batch immediately. That single design choice ripples into finality, withdrawal speed, cost, and compatibility, as the table shows.
Dimension
Optimistic rollups
ZK rollups
Verification method
Fraud proofs (assume valid)
Validity proofs (prove valid)
Withdrawal to L1
About 7 days
Minutes to hours
Security model
Economic, challenge-based
Cryptographic, math-based
EVM compatibility
Very high today
Improving, varies by zkEVM
Proving cost
Low, no proofs to generate
Higher, proof generation is intensive
Examples
Arbitrum, Optimism, Base
zkSync Era, StarkNet, Scroll
If you are new to the category, start with what a rollup is and how it fits into a broader Layer 2 blockchain before comparing the two designs in detail.
Which has faster finality, optimistic or ZK rollups?
ZK rollups reach Layer 1 finality faster. Because a validity proof mathematically guarantees the batch is correct, the state is settled as soon as that proof is verified on Ethereum, often within minutes to hours. Optimistic rollups must wait out the roughly 7-day challenge window before a withdrawal is fully settled on L1, even though the transaction feels instant on L2. This is a direct consequence of how each system handles blockchain finality.
Are ZK rollups more secure than optimistic rollups?
They offer different kinds of security rather than strictly more. ZK rollups derive security from cryptography: a valid proof means the state transition is correct, full stop. Optimistic rollups derive security from economic incentives and the assumption that at least one honest party will submit a fraud proof during the challenge window. Both are considered secure when implemented correctly, and both currently depend on a sequencer that the ecosystem is working to decentralize.
Do rollups improve blockchain throughput?
Yes. Rollups are the primary way Ethereum scales today, batching many L2 transactions into a single L1 submission to raise throughput and lower per-transaction cost. Both optimistic and ZK rollups push far more transactions per second than Layer 1 alone, which is why the trade-off between them is rarely about raw capacity and more about finality, cost, and compatibility. See throughput vs latency for how those two performance dimensions differ.
How Quicknode Supports Both Types
Quicknode provides full RPC support for both optimistic and ZK rollup networks. Arbitrum, Optimism, Base, zkSync, StarkNet, Scroll, and Polygon zkEVM are all accessible through the same Quicknode platform with identical developer experience, SLAs, and tooling. Quicknode Streams supports data streaming from both rollup types, and enhanced API methods work across both architectures.
Frequently Asked Questions
Are optimistic rollups cheaper than ZK rollups?
Optimistic rollups avoid the cost of generating cryptographic proofs, so their proving overhead is lower. ZK rollups spend more compute to produce validity proofs but can post data to Layer 1 more compactly. Real-world fees depend on the specific network and data costs, and both types have become dramatically cheaper as Ethereum data availability has improved.
Why do optimistic rollups have a 7-day withdrawal period?
The 7-day window is the challenge period during which anyone can submit a fraud proof against an incorrect state update. Withdrawals to Layer 1 finalize only after this window closes, ensuring there is enough time to catch and reverse fraud. Third-party bridges can front liquidity for faster exits, but the underlying protocol settlement still waits out the window.
What is a zkEVM?
A zkEVM is a ZK rollup virtual machine that is compatible with the Ethereum Virtual Machine, letting developers deploy standard Solidity contracts while still benefiting from validity proofs. Implementations like zkSync Era, Polygon zkEVM, and Scroll offer varying degrees of EVM equivalence, and the compatibility gap with optimistic rollups continues to narrow.
Can you use the same dApp code on both rollup types?
Often yes. Optimistic rollups are highly EVM compatible, so existing Solidity contracts usually deploy with minimal changes. Modern zkEVMs also support Solidity, though some ZK rollups such as StarkNet use a custom language like Cairo. Many teams deploy the same application across multiple L2s of both types.
Which rollup type should I build on?
Choose optimistic rollups for maximum EVM compatibility, the largest current ecosystem, and the simplest path to deploy existing contracts. Choose ZK rollups when fast finality, near-instant withdrawals, and cryptographic security matter most. Many applications deploy on both, since the ecosystems are converging on shared standards.