All Guides
InfrastructureL2Rollup

How Ethereum L2s Work: Optimistic vs ZK Rollups

The technical mechanics of Ethereum's Layer 2 scaling solutions — optimistic rollups, ZK rollups, how they inherit security, and their tradeoffs.

Updated March 19, 2026 8 min read

Layer 2 scaling solutions allow Ethereum to handle far more transactions at much lower cost, without sacrificing Ethereum mainnet's security guarantees. Understanding the mechanics helps you make better chain selection and development decisions.

The Scaling Problem

Ethereum mainnet processes roughly 15–30 transactions per second. At peak demand, this causes congestion and high gas fees. L2s solve this by processing transactions off-chain in bulk and posting compressed results to Ethereum, inheriting its security while achieving 10–100x more throughput at 10–100x lower cost.

Optimistic Rollups

Optimistic rollups (Arbitrum, Optimism, Base) batch transactions off-chain and post transaction data to Ethereum. The 'optimistic' part: they assume all transactions are valid by default. A 7-day challenge window allows anyone to submit a 'fraud proof' if they detect an invalid state transition. If no fraud proof is submitted, the batch is finalized.

The 7-day withdrawal delay is a real UX issue — withdrawing from L2 to L1 takes a week unless you use a liquidity bridge (which takes minutes but charges a fee). For deposits, transfers, and DEX trades within the L2, there's no delay.

ZK Rollups

ZK rollups (zkSync, StarkNet, Polygon zkEVM, Scroll) generate a cryptographic proof (ZK-SNARK or ZK-STARK) that proves the validity of each batch of transactions. The proof is verified on Ethereum — no challenge window needed. Withdrawals can be fast (minutes to hours) once the proof is verified.

The tradeoffs: ZK proof generation is computationally expensive (sequencer hardware requirements are higher). ZK-SNARKs require a trusted setup ceremony. Not all EVM opcodes are equally easy to prove — some ZK-EVMs have limitations or performance degradation for certain operations.

Equivalence Spectrum

ZK-EVMs vary in EVM equivalence — how closely they match Ethereum's execution environment. Full equivalence (Scroll, Polygon zkEVM Type 1/2) is most compatible but harder to prove. Partial equivalence (zkSync, StarkNet) makes proving easier but requires contract recompilation or adaptation. For developers: always test your contracts on the specific ZK-EVM you're targeting.

Data Availability

Rollups post transaction data to Ethereum for data availability (so anyone can reconstruct L2 state). EIP-4844 (proto-danksharding) introduced blob space — a dedicated, cheaper data layer for rollups. Blobs reduced rollup posting costs by 10x, making L2 transactions cheaper. Full danksharding (future) will reduce costs further.

Choosing Between Them

Optimistic rollup advantages: mature EVM equivalence, simpler sequencer, established ecosystem. ZK rollup advantages: instant finality for withdrawals, long-term lower costs at scale, provably correct execution. For most dApps today, optimistic rollups (Arbitrum, Base) have more liquidity, tooling, and user adoption. ZK rollups are growing fast and will likely dominate long-term.

Ready to build your Web3 project?

Tell us about your project and get a precise quote.

Get a Project Quote