ACE Journal

Comparing Layer-2 Rollup Architectures - Optimistic vs. ZK Rollups

Abstract
This article examines the architectural differences between optimistic rollups and zk-rollups, analyzing their respective security assumptions, latency, and gas cost implications. It provides benchmark data on transaction throughput and finality times for leading implementations, offering guidance for choosing the appropriate layer-2 solution based on application requirements.

Introduction

As Ethereum and other smart-contract platforms face scalability challenges, layer-2 rollup solutions have emerged to increase throughput while maintaining security guarantees rooted in layer-1. Two dominant paradigms have crystallized: Optimistic Rollups, which assume transactions are valid by default and rely on fraud proofs to challenge invalid ones; and zk-Rollups, which generate succinct zero-knowledge proofs (ZKPs) attesting to transaction correctness. Both approaches batch multiple transactions off-chain, post data or proofs on-chain, and settle state changes periodically. However, they differ in security models, latency-to-finality, gas costs, and implementation complexity. This article compares optimistic and zk-rollup architectures across key dimensions and presents benchmark data for leading implementations as of late 2021.

1. Optimistic Rollups

Optimistic rollups (ORUs) function under the assumption that most batch submissions are honest. Instead of verifying every transaction on-chain, they post only the rollup’s state root and transaction calldata, trusting its correctness unless a participant submits a fraud proof during a designated challenge window (typically 1–7 days).

1.1 Security Assumptions

  1. Honest Majority of Sequencers/Operators: ORUs rely on at least one honest observer (watcher) to monitor batched state transitions. If the sequencer submits an invalid state root, watchers can publish a fraud proof before the challenge window expires.
  2. Fraud-Proof Mechanism: Fraud proofs are generated by executing disputed transactions on-chain or in a verifier contract to demonstrate a disagreement with the posted state root.
  3. Economic Incentives: Watchers are economically motivated to post fraud proofs (bounties/slashable bonds), and sequencers risk losing bonds or deposits if proven dishonest.

1.1.1 Example: Optimism

1.2 Latency and Finality

1.3 Gas Cost Implications

1.4 Throughput

2. zk-Rollups

zk-Rollups utilize zero-knowledge proofs to cryptographically prove the correctness of batched state transitions. Each batch submission includes a succinct ZKP (e.g., SNARK) that attests to the validity of all transactions in the batch. The layer-1 contract verifies the proof and accepts the state root update unconditionally—no challenge window is required.

2.1 Security Assumptions

  1. Soundness of ZKP Schemes: The integrity of zk-rollups hinges on the cryptographic assumptions underpinning the proof system (e.g., knowledge-of-exponent, discrete-log hardness, etc.).
  2. Trusted Setup (Optional): Some ZKP frameworks (e.g., Groth16) require a trusted setup; others (e.g., PLONK, Sonic) use universal setups. The security model depends on whether the setup remains uncontested.
  3. Verifier Contract: On-chain verifier executes constant-time pairing checks (or equivalent) to validate proofs, eliminating reliance on watchers or challenge windows.

2.1.1 Example: zkSync

2.2 Latency and Finality

2.3 Gas Cost Implications

2.4 Throughput

3. Comparative Benchmark Data

Below is a summary of benchmark data for representative optimistic and zk-rollup implementations as of November 2021. Note that actual performance depends on hardware, network conditions, and implementation optimizations.

Metric Optimistic (Optimism Mainnet) zk-Rollup (zkSync v1)
Batch Size 1,000–2,000 txns 1,000–1,500 txns
Batch Posting Gas (on-chain calldata) 500,000–1,000,000 gas 150,000–300,000 gas (compressed)
Proof Verification Gas N/A (only fraud proofs rare) ~2,000,000 gas per batch
Gas per Transaction (amortized) ~500–1,000 gas ~1,000–2,000 gas
Verifier Latency to Finality 7-day challenge window ~1–2 minutes (block confirmation + proof)
Prover Throughput (batch proving time) N/A ~30–60 seconds per batch
Transactions Per Second (achievable TPS) 500–1,500 TPS 500–1,000 TPS
Withdrawal Settlement Time ~7 days ~5–10 minutes

Note: Fraud-proof-related gas costs on optimistic rollups are incurred only when invalid batches are challenged—rare under normal operation.

4. Trade-Off Analysis

4.1 Security vs. Liveness

4.2 Latency vs. Cost

4.3 Prover Complexity vs. User Experience

5. Use Case Guidance

Choosing between optimistic and zk-rollups depends on application requirements:

  1. High-Frequency Trading / DeFi Protocols:
    • Priority: Fast finality, minimal withdrawal delay.
    • Recommendation: zk-Rollups (e.g., zkSync, StarkNet) provide immediate settlement, critical for instant arbitrage or liquidations.
  2. NFT Marketplaces / Game Items:
    • Priority: Low transaction cost, moderate finality tolerance (hours to days acceptable).
    • Recommendation: Optimistic Rollups (e.g., Optimism, Arbitrum) reduce gas expenses and leverage simpler infrastructure.
  3. Privacy-Preserving Payments:
    • Priority: Confidentiality, fast withdrawals.
    • Recommendation: zk-Rollups readily integrate privacy layers (e.g., zk-SNARK circuits) and finalize instantly.
  4. Cross-Chain Bridges:
    • Priority: Security against fraud, no long periods of locked funds.
    • Recommendation: zk-rollup-based bridges ensure validity proofs; optimistic bridges may introduce multi-day delays for dispute resolution.

6. Future Directions

Both optimistic and zk-rollup technologies continue evolving:

7. Conclusion

Optimistic rollups and zk-rollups offer complementary trade-offs in scaling Ethereum and similar blockchains. Optimistic rollups excel in low on-chain costs and simpler prover infrastructure but incur multi-day finality delays. zk-Rollups provide immediate security via cryptographic proofs at the expense of higher gas costs and complex proving. Application requirements—such as latency tolerance, security guarantees, and user experience—should guide developers in selecting the appropriate layer-2 architecture. As both paradigms advance, hybrid approaches and improved proof systems will further close gaps, driving widespread adoption of scalable, secure layer-2 solutions.

References

  1. Buterin, V. (2021). “On Layer 2 Scalability.” Ethereum Research.
  2. Carroll, M., et al. (2019). “Optimistic Rollup: Scaling Ethereum with Fraud Proofs.” Offchain Labs Whitepaper.
  3. Ben-Sasson, E., Bentov, I., Horesh, Y., & Riabzev, M. (2019). “Scalable, Transparent, and Post-Quantum Secure Computational Integrity.” Cryptology ePrint Archive, Report 2018/046.
  4. “zkSync: Scalable Lightning-Fast Ethereum Payments.” (2021). Matter Labs Whitepaper.
  5. “StarkWare: Validity Rollups (Vol. 1).” (2021). StarkWare Industries Whitepaper.
  6. “Arbitrum Rollup.” (2021). Offchain Labs Documentation.
  7. “Optimism: Optimistic Ethereum.” (2021). Optimism PBC Technical Documentation.
  8. Goldfeder, S., Kalodner, H., Reisman, D., & Narayanan, A. (2018). “When the Levee Breaks: Quantifying the Practical Decentralization of Bitcoin Core.” IEEE Symposium on Security and Privacy.