A ZK (Zero-Knowledge) rollup executes transactions off-chain and generates a cryptographic validity proof mathematically demonstrating that all state transitions are correct. This proof is verified on Ethereum L1 in a single operation. Because correctness is proven mathematically (not assumed), there is no challenge period: withdrawals can finalize as soon as the proof is verified on L1, typically within minutes to hours.
What Is a ZK Rollup (Mechanics)?
3 min read
The short version
A ZK rollup says "I did all this work off-chain, and here is mathematical proof that I did it correctly." Ethereum checks the proof in one step (fast and cheap to verify, even though it was expensive to generate). Because correctness is mathematically guaranteed, you do not need to wait 7 days for anyone to object. Valid means valid, provably.
How It Works
Architecture: (1) Sequencer/prover: executes L2 transactions and generates a validity proof (ZK-SNARK or ZK-STARK) for each batch. (2) Proof submission: the proof is posted to L1 along with minimal state data. An L1 verifier contract checks the proof. (3) State update: if the proof is valid, the L1 state root updates immediately. No challenge period needed. (4) Withdrawal: once the proof containing your withdrawal is verified on L1, you can claim your funds immediately. Types of proofs: ZK-SNARKs (smaller proofs, trusted setup required, used by zkSync, Polygon zkEVM). ZK-STARKs (larger proofs, no trusted setup, quantum-resistant, used by StarkNet). Trade-offs vs. optimistic: faster finality (minutes vs. 7 days), more complex technology (proof generation is computationally intensive), EVM compatibility challenges (the EVM was not designed for ZK circuits, requiring specialized compilers or modified VMs).
Batch finalization on zkSync Era
You swap tokens on zkSync Era. The sequencer processes your transaction in ~1 second (soft confirmation). Your transaction is grouped with ~500 others into a batch. The prover generates a ZK-SNARK proof for the entire batch (takes 5-20 minutes of heavy computation on specialized hardware). The proof plus compressed state diff is submitted to Ethereum L1 as one transaction. The L1 verifier contract checks the proof (costs ~500K gas, shared across all 500 transactions). Verification passes. Your transaction is now finalized on L1 with Ethereum-level security. Total time from transaction to L1 finality: 15-60 minutes (vs. 7 days for optimistic). You can withdraw to L1 immediately after proof verification.
What People Get Wrong
ZK rollups are always faster than optimistic rollups
L2 transaction confirmation is equally fast on both (sub-second). The difference is L1 finality: ZK finalizes in minutes/hours (once proof is generated and verified), optimistic finalizes in 7 days. But proof generation itself takes time (minutes to hours per batch), so it is not truly instant either.
All ZK rollups are fully EVM-compatible
Varies significantly. zkSync Era and Polygon zkEVM support Solidity but with some differences (certain opcodes behave differently, some precompiles unavailable). StarkNet uses Cairo (a different language entirely). "ZK-EVM" compatibility is a spectrum from type-1 (exact EVM equivalence, slowest proofs) to type-4 (high-level language compatible only).
ZK proofs mean privacy
Despite the "zero-knowledge" name, most ZK rollups are transparent (all transaction data is publicly visible, just like Ethereum). The "zero-knowledge" property is used for proving computation correctness without re-executing it, not for hiding transaction details. Privacy ZK rollups exist (Aztec) but are separate products.
Keep Reading
Sources & Further Reading
- zkSync Era Docs
Documentation for the zkSync Era ZK rollup
- StarkNet Docs
Documentation for the STARK-based ZK rollup ecosystem
- L2Beat ZK Rollups
Risk assessments for all ZK rollup implementations
Questions People Also Ask
- Which ZK rollups are live today?
- As of 2024: zkSync Era (Matter Labs), StarkNet (StarkWare), Polygon zkEVM, Scroll, Linea (Consensys), and Taiko. Each has different maturity levels, EVM compatibility degrees, and decentralization status. Most are still in early stages with centralized components being decentralized over time.
- Are ZK rollups more expensive for users?
- Generally similar to or cheaper than optimistic rollups for users. The proof generation cost is borne by the rollup operator (amortized across all users in a batch). Per-user costs are primarily driven by L1 data posting (calldata/blob costs), which is similar for both rollup types.
- Will ZK rollups replace optimistic rollups?
- Long-term, many researchers believe ZK will dominate because of faster finality and mathematical guarantees. But optimistic rollups have a multi-year head start in ecosystem maturity, developer tooling, and TVL. The transition will be gradual. Both types will likely coexist for years.