Layer 2 Scaling & Rollups

Why base layers are slow, and how optimistic and zero-knowledge rollups inherit L1 security while batching execution off-chain.

11 min read·5 quiz questions

The scaling trilemma in practice

Base-layer blocks are deliberately small so ordinary machines can validate them, which caps throughput and keeps fees volatile under load. Layer 2s move execution off the base chain while still deriving their security from it, trading some of the base layer's guarantees for far more capacity.

  • L1 stays the settlement and data-availability anchor.
  • L2 executes transactions and posts compressed results back to L1.
  • Users get lower fees and faster confirmations without a new trust root.

Optimistic rollups

An optimistic rollup assumes batches are valid by default and posts them to L1 with a challenge window, typically about seven days. Anyone can submit a fraud proof during that window to revert an invalid batch, so the rollup only needs one honest watcher, not a majority.

  • Fast to build: near-EVM-equivalent execution (Arbitrum, Optimism).
  • Withdrawals to L1 are slow because they wait out the challenge window.
  • Fraud proofs are rarely used but must remain crediblely enforceable.

Zero-knowledge rollups

A ZK rollup generates a validity proof — a succinct cryptographic proof that the batch's state transition was computed correctly — and posts it alongside the new state root. L1 verifies the proof in one call, so there is no challenge window and withdrawals can finalize as soon as the proof lands.

  • SNARK/STARK proofs are cheap to verify even though they are expensive to generate.
  • Correctness is proven mathematically, not assumed and disputed.
  • zkEVMs aim for Solidity compatibility while proving EVM execution.

Data availability and bridging

A rollup is only as trustless as the data behind it: if transaction data isn't published somewhere retrievable, users cannot reconstruct their balances if the operator disappears. Rollups post calldata or use dedicated data-availability layers for this reason. Moving assets between L1 and L2 uses bridge contracts, which are a common target for exploits — canonical bridges audited alongside the rollup are safer than third-party ones.

Key terms

Rollup
L2 that executes transactions off-chain and posts compressed results plus data to L1.
Optimistic rollup
Rollup that assumes validity and allows fraud proofs during a challenge window.
ZK rollup
Rollup that posts a validity proof so L1 can verify correctness immediately.
Fraud proof
On-chain proof that an optimistic rollup batch was invalid.
Data availability
Guarantee that transaction data behind a rollup batch is published and retrievable.

Chapter quiz

5 questions · pass mark 75%
  1. 1. What does a rollup keep on the base layer?

  2. 2. Why are optimistic rollup withdrawals slow?

  3. 3. What does a ZK rollup post to L1 that removes the need for a challenge window?

  4. 4. Why does data availability matter for rollup users?

  5. 5. Which is a common exploit target in the L2 ecosystem?

Answer every question to submit. Progress for layer-2-scaling-rollups is saved in this browser.