Sezga
English
Sign in

Blockchain technology · · 6 min read

Optimistic vs ZK rollups: how they differ and the trade-offs

Optimistic rollups assume transaction batches are valid by default and allow anyone to challenge a faulty batch within a set period; ZK rollups submit every batch to the main chain together with a proof that mathematically shows it is correct. Both execute transactions off the main chain and write the results back to it; where they differ is in how they answer the question of why the main chain should trust those results.

A rollup is the most common type of layer 2 solution: it aims to process more transactions at lower fees while relying on the security of a main chain, or layer 1, such as Ethereum. This article briefly recaps what rollups have in common and then compares the two main types.

The shared skeleton of a rollup

Both types rest on the same basic parts:

  • Sequencer: Collects user transactions, orders them and executes them quickly on the rollup. Users usually see the result within seconds.
  • Batch: The sequencer compresses hundreds or thousands of transactions and sends them to the main chain as a single package.
  • State root: A short fingerprint that summarizes all balances and contract data after a batch has been processed.
  • Contracts on the main chain: Record batches and state roots, and manage the movement of funds between the rollup and the main chain.

Publishing transaction data on the main chain is a critical detail: even if the sequencer disappears, anyone can rebuild the rollup's state from that data. On Ethereum, the "blob" space introduced with the Dencun upgrade in 2024 was designed to make publishing this data cheaper.

The cost advantage comes from sharing a fixed cost. Suppose, hypothetically, that writing a batch to the main chain costs $40 in total and the batch contains 2,000 transactions. The share per transaction is $0.02. Had each of those transactions been made directly on the main chain, each would have paid the full fee.

Optimistic rollups: valid unless challenged

In an optimistic rollup, a proposer posts a new state root to the main chain. If nobody objects, the root becomes final at the end of a set period. This is called the challenge period, and on the large optimistic rollups built on Ethereum it is usually about 7 days.

During that window, any verifier can check the root by processing the published data independently. If the root is wrong, the verifier submits a fraud proof (also called a fault proof). The main chain then computes the disputed step itself. If the proposer turns out to be wrong, the faulty root is rolled back and part of the bond the proposer posted is slashed.

The security assumption of this model is that there must be at least one honest verifier watching the data who can act within the challenge period. Arbitrum and OP Mainnet are well-known examples of this approach.

The upside is strong compatibility with the Ethereum Virtual Machine (EVM): existing contracts can run with few changes, and there is no proof-generation cost during normal operation. The downside is that withdrawals made directly to the main chain must wait out the challenge period.

ZK rollups: every batch comes with a proof

In a ZK rollup, a prover generates a validity proof showing that every transaction in the batch was executed according to the rules. A verifier contract on the main chain checks this proof quickly, and if it is valid, the new state root is accepted. Because producing a fake proof that passes verification is considered practically impossible, no challenge period is needed.

"ZK" stands for zero-knowledge. However, the property most ZK rollups actually rely on is not privacy but the fact that the proof is short and quick to verify; in most cases the transaction data is still public. Proof systems generally fall into two families, SNARKs and STARKs. zkSync and Starknet are well-known examples of this approach.

The upsides: once the main chain verifies the proof, the state is final, and security rests on mathematics rather than on the presence of an honest watcher. Withdrawals can often complete in hours rather than days, depending on how often proofs are generated and verified. The downsides: generating proofs is computationally heavy. Because proving the EVM exactly is hard, some ZK rollups are not fully Ethereum-compatible or use different programming languages. And since the technology is more complex, the risk of bugs is spread across a larger surface.

Side by side

FeatureOptimistic rollupZK rollup
How correctness is ensuredChallenges with fraud proofsA validity proof for every batch
Security assumptionAt least one honest verifierSoundness of the cryptography and the proof circuit
Native withdrawal to main chainLength of the challenge period, usually about 7 daysOnce the proof is verified, usually shorter
Extra computational loadLow in normal operationProof generation is expensive
EVM compatibilityUsually highVaries by network

Practical differences for users

  1. Withdrawal time: Someone withdrawing from an optimistic rollup to the main chain through the native bridge has to wait for the challenge period to end. Third-party liquidity providers offer instant withdrawals for a fee. With a hypothetical 0.1% fee, a $10,000 withdrawal costs $10. That convenience also brings the risks of that provider and its bridge.
  2. Sequencer centralization: In both types, the sequencer is often run by a single company. If the sequencer goes down or leaves a transaction out, many rollups give users a way to force a transaction in through the main chain (force inclusion). This route is slower and requires technical knowledge.
  3. Upgrade powers: The contracts of many rollups can be changed quickly with the approval of a multisig group. That power allows an emergency response to a flaw in the proof system, but it also means users must trust that group.
  4. Maturity of the proof system: Some optimistic rollups ran for a long time without permissionless fraud proofs, while some ZK rollups kept extra safeguards and restrictions in place. What matters is not the rollup's type but whether its proof system is actually live and open to everyone. Independent tracking projects classify rollups into maturity stages based on these criteria.

Key takeaways

  • Both types execute transactions off the main chain and write transaction data and state roots to it.
  • Optimistic rollups assume batches are valid and stay open to fraud proofs during a challenge period that is usually about a week.
  • ZK rollups submit every batch with a validity proof; withdrawals can finalize faster, but proof generation is expensive and complex.
  • For users, withdrawal time, sequencer centralization, upgrade powers and the maturity of the proof system are worth checking regardless of rollup type.

The Sezga terminal

Live prices, liquidation feed, multilingual news, the Fed calendar, event memory and a paper-trading account on one screen. Access is by invitation.

Sign in

Related articles