07 — L2 e Soluções de Escala

L1s são limitadas (Bitcoin 7 TPS, Ethereum 15 TPS). Soluções L2: rollups, state channels, sidechains, validium, app-chains. Cada uma com trade-off security vs throughput vs custo.


1. Por que L2?

Trilemma de escalabilidade (Vitalik): chain monolítica não pode otimizar simultaneamente decentralization + security + scalability.

Solução: separar layers. L1 fica responsável por security + decentralization; L2 herda esses do L1 mas otimiza para throughput.

L2 é blockchain (ou estrutura) que settle em L1 — txs eventualmente são posted/proven em L1.


2. Taxonomia

Tipo Security model Latência to L1 finality Exemplos
Optimistic Rollup Fraud proofs, 7-day window 7 dias (challenge period) Arbitrum, Optimism, Base
ZK Rollup Validity proofs (cryptographic) minutes-hours (proof verify) zkSync, StarkNet, Linea, Scroll, Polygon zkEVM
State channels On-chain settle on dispute instant off-chain Lightning (BTC), Raiden (ETH legacy)
Sidechains Próprio consensus none (independent) Polygon PoS, Gnosis Chain, Rootstock
Validium Validity proof + off-chain DA minutes StarkEx, Polygon Miden
Volition User chooses ZK or off-chain DA per tx varies StarkNet (planned)
Sovereign rollup Independent settlement, uses L1 only DA depende Celestia rollups
Plasma Fraud proofs, exit games days Largely deprecated
App-chains Próprio consensus, IBC ou bridge none Cosmos chains, Polkadot parachains

3. Optimistic Rollups

Assumption: txs valid by default; anyone can challenge via fraud proof during window.

Mecânica

  1. Sequencer colleta txs off-chain.
  2. Posts batches to L1 (calldata em pre-Dencun, blobs após EIP-4844).
  3. Challenge window (typically 7 dias).
  4. Se ninguém disputa, state finaliza no L1.
  5. Se disputa: fraud proof onchain, slashes sequencer, reverts.

Arbitrum (ARB)

Spec Valor
Launch 2021-08 (Mainnet One)
Org Offchain Labs (Steven Goldfeder, Ed Felten)
TVL (mai/2026) ~$15B
EVM compatibility EVM-equivalent + custom precompiles + Stylus (RustCC++ via WASM)
Sequencer Centralized (decentralization roadmap)

Stylus (2024): RustCC++ contracts compiled to WASM, run alongside EVM. Multi-VM L2.

Arbitrum Orbit: deploy custom L3 chains usando Arbitrum stack.

Optimism (OP)

Spec Valor
Launch 2021-12 (Mainnet)
Org OP Labs / Optimism Foundation
TVL (mai/2026) ~$5B
Stack OP Stack (open source)

OP Stack: framework para construir Optimistic L2. Superchain vision: shared sequencer, interop entre OP-stack chains.

OP Stack adopters: Base (Coinbase), Worldcoin, Mode, Zora, Mantle (~hybrid), Frax L2, Public Goods Network.

Base (Coinbase L2)

Launched 2023-08. Uses OP Stack. No native token (uses ETH for gas). Coinbase backstops.

TVL > Optimism mainnet em 2024–2026. Massive consumer adoption (Coinbase users → Base seamlessly). Friend.tech, Farcaster surge originated here.

Outros optimistic

  • Boba Network: OP-based, fork.
  • Metis: OP-based, decentralized sequencer attempt.
  • Mantle: hybrid (OP + EigenDA).
  • Fraxtal (Frax L2).
  • Blast: native ETH yield via staking integration. Controversial farming.
  • Mode.
  • World Chain (Worldcoin's OP Stack chain, 2024).

4. ZK Rollups

Validity proofs: cryptographic proof of state transition correctness. No challenge window — proof verified, state final.

ZK-EVM types (Vitalik 2022)

Type EVM compat Performance
Type 1 Bit-perfect Ethereum Slowest
Type 2 EVM-equivalent (small differences) Better
Type 2.5 EVM-equivalent + gas mods Better
Type 3 EVM-almost-equivalent (some opcodes/precompiles differ) Faster
Type 4 High-level compatible (compile Solidity) Fastest, lowest compat

zkSync Era (Matter Labs)

Spec Valor
Launch 2023-03-24
Type 4 (LLVM-based)
Token ZK (TGE 2024)
TVL ~$0.7B

zkSync Stack (ZK Stack): hyperchains, OP-Stack-equivalent for ZK.

StarkNet (STRK)

Spec Valor
Launch 2021-11 (alpha)
Org StarkWare
Type non-EVM (Cairo language)
Proof system STARKs (Reed-Solomon, FRI)
Token STRK (TGE 2024)
TVL ~$0.4B

Cairo: provable language. Type 4 EVM via "Kakarot" project.

Volition: per-tx choice ZK vs off-chain DA.

Polygon zkEVM

Spec Valor
Launch 2023-03
Type 3 (some EVM differences)
Proof system Plonky2
Token POL (shared)
TVL ~$0.1B (declining)

Polygon AggLayer strategy: cross-chain liquidity entre Polygon CDK chains.

Scroll

Spec Valor
Launch 2023-10
Type 2 (closest to EVM equivalence among prod L2s)
Token SCR (TGE 2024)
TVL ~$0.5B

Open-source ZK circuits. Academia-heavy team.

Linea (ConsenSys L2)

Spec Valor
Launch 2023-07
Org ConsenSys
Type 3
TVL ~$0.3B

MetaMask integration native. ConsenSys ecosystem leverage.

Outros ZK

  • Polygon Miden: STARK + WASM. Account-based ou UTXO. Privacy via per-account state.
  • RISC Zero: zkVM general (RISC-V). Bonsai prover service.
  • Succinct (SP1): zkVM RISC-V Rust. Modular use.
  • Aleo: ZK-native L1 (não L2 strictly).
  • Aztec: privacy ZK rollup (ETH-paired). Mainnet planned 2025.
  • Polygon Hermez (legacy, predecessor of zkEVM).
  • Loopring: ZK rollup specialized for orderbook DEX (early 2020).
  • dYdX v3 (legacy on StarkEx, migrated to Cosmos for v4).

Trade-offs ZK vs Optimistic

Aspecto Optimistic ZK
Withdraw to L1 7 dias minutos-horas
EVM compat Trivial Difícil
Computational cost off-chain Baixo Muito alto (prover)
Proof size on-chain Apenas storage Pequeno (~200 bytes SNARK, ~50 KB STARK)
Verification on L1 Cheap (calldata) More expensive (cryptographic verify)
Maturity 2026 Maduro Maduro mas evolving fast

5. EIP-4844 e blob impact

Pre-Dencun (mar/2024): L2s posted calldata em mainnet. Custaram US$ 1-5 per tx em peak.

Post-Dencun: blob txs (separate fee market). L2 fees dropped 5-50×. Typical tx em Base/Arbitrum ~$0.01-0.10 em 2026.

Future: full danksharding (~64 blobs/block). Será 10× over EIP-4844.


6. State channels

Off-chain state mantido por participants; on-chain settle só em close ou dispute.

Lightning Network (Bitcoin)

Cobertura completa em 04-l1-bitcoin.md §Lightning.

Raiden (Ethereum)

Equivalente Lightning para ERC-20. Lançado 2017. Largely abandoned — adoption marginal vs rollups.

Connext (now bridge protocol)

Originalmente state channel, pivoted para cross-chain.

Perun, Counterfactual

Generic state channel research, mostly academic.

Trade-offs

Pros: instant, cheapest possible, privacy. Cons: requires online both parties, channel rebalancing, watchtowers para offline safety, capital lockup.

Adoption: Lightning massive in BTC; ETH state channels mostly replaced by rollups.


7. Sidechains

Independent blockchain com own consensus, periodically anchored or bridged to L1. Não herdam security de L1 (different from rollups).

Polygon PoS

Cobertura em 06-l1-alt.md §Polygon. Largest sidechain. Migrating to "L2" branding mas tecnicamente sidechain.

Gnosis Chain (xDai)

Stable-pegged native gas (xDai = USD-pegged). PoSDAO consensus. Used for low-fee small payments.

Rootstock (RSK)

Bitcoin sidechain, EVM-compatible. Merge-mined com Bitcoin (PoW shared).

Liquid (Bitcoin federated sidechain)

Cobertura em 04-l1-bitcoin.md §Liquid.

Ronin (Axie Infinity)

Sidechain customizada para Axie. Hacked mar/2022 — US$ 625M (Lazarus N. Korea).


8. Validium e Volition

Validium

ZK rollup mas DA off-chain (e.g., committee, EigenDA, Celestia).

  • Pros: cheaper than rollup (no calldata cost).
  • Cons: DA dependency = trust in committee/DA layer.

Examples: StarkEx (Immutable X, dYdX v3), Polygon Miden Validium mode.

Volition

User decides per-tx: ZK rollup (full L1 DA, expensive) or Validium (off-chain DA, cheaper).

StarkNet planned. dApps com sensitive data → rollup; high-volume gaming → validium.


9. Modular thesis e DA layers

Tradition: monolithic L1 does (consensus + execution + DA + settlement).

Modular thesis: separate layers, each optimized.

Celestia (TIA)

Pure DA + consensus. No execution. Rollups post data; Celestia provides cheap available data via DAS (Data Availability Sampling).

Spec Valor
Launch 2023-10-31
Consensus Tendermint (CometBFT)
Token TIA
Marketcap (mai/2026) ~$1B

DAS lets light nodes verify data is available without downloading whole. Erasure coding + KZG.

Sovereign rollups: rollup posts data to Celestia, runs own settlement (no Ethereum L1 dependency). Independent fork choice.

EigenDA (EigenLayer)

DA service built on Ethereum restaking. Operators run by ETH-restaked validators. Cheaper than Ethereum L1 calldata, leverages Ethereum security.

Avail

Spun off from Polygon. Similar pitch to Celestia. Specialized DA.

Near DA

Use Near sharded DA for Ethereum L2s. Cheap.

Adoption

L2s migrating from L1 calldata to alt-DA:

  • Mantle: EigenDA + own DA.
  • Frax L2: EigenDA.
  • Manta Pacific: Celestia.
  • Polygon CDK chains: Polygon's DAC option.

Trade-off: L1-native DA = strongest security; alt-DA = cheaper, weaker trust model.


10. Restaking thesis (EigenLayer)

Sreeram Kannan + team 2021–2024.

Mecânica

  1. Stake ETH em Ethereum normally.
  2. Opt-in: re-stake same ETH em EigenLayer to validate AVS (Actively Validated Service).
  3. AVS é qualquer protocol que precisa decentralized validation: bridges, oracles, DA layers, sequencers, ZK provers.
  4. Slashing extends para misbehaving em AVS.

Implications

  • Pooled security: AVSs herdam Ethereum's economic security sem precisar own validator set.
  • Capital efficiency: ETH validators earn dual rewards (Ethereum staking + AVS).
  • Risk: cascading slash if AVS misbehaves; complexity.

LRTs (Liquid Restaking Tokens)

  • Ether.fi (eETH).
  • Renzo (ezETH).
  • Puffer.
  • Kelp.
  • Stader.

Liquid wrappers around restaked ETH.

EigenLayer mainnet

Operator phase mai/2024. AVS launches throughout 2024-2025. Marketcap em billions.

Critique

  • Recursive leverage risk (rehypothecation).
  • "Ethereum security" stretched too thin if AVSs explode.
  • Vitalik cautious blog post 2023 ("Don't overload Ethereum's consensus").

11. App-chains

Application-specific blockchains. Sovereignty + custom optimization.

Cosmos chains

Each Cosmos SDK chain é app-chain. Examples cobertos em 06-l1-alt.md:

  • Osmosis (DEX), Injective (perps), Akash (compute), dYdX v4 (perps).

Polkadot parachains

  • Moonbeam (EVM), Acala (DeFi), Astar.

Avalanche subnets / L1s

Custom EVM ou non-EVM chains.

Polygon CDK chains

Polygon Chain Development Kit; ZK-based L2s with shared liquidity (AggLayer).

Arbitrum Orbit

L3s atop Arbitrum One. Examples: Xai Games, ApeChain, Cyber.

OP Stack

Base, Worldcoin, etc. Superchain interop (planned).

zkSync ZK Stack / Hyperchains

Same idea, ZK flavor.

Pros / Cons

Pros: customization (gas token, governance, throughput), sovereignty. Cons: bootstrap problem (validator set, liquidity), security less than rollups (depends on impl).


12. Rollup-as-a-Service (RaaS)

Companies que provision L2s/L3s para clientes:

  • Conduit (OP Stack + Arbitrum Orbit).
  • Caldera.
  • Alt Layer.
  • Gelato.
  • Zeeve.

Customers: brands launching own L2 (Sony Soneium, Kraken Ink).


13. Cross-rollup messaging / interop

Native messaging entre L2s ainda imatura. Soluções:

  • CCIP (Chainlink Cross-Chain Interop) — generic.
  • LayerZero — ultra-light nodes.
  • Wormhole — multi-chain.
  • Hyperlane — modular interop.
  • Across — fast L2 ↔ L2 bridging.
  • Connext — atomic cross-chain.
  • OP Superchain (intra-OP-Stack messaging).
  • AggLayer (intra-Polygon-CDK).
  • Ethereum-native EIP-3074 + intent-based.

Detalhes em 11-bridges-interop.md.


14. Sequencer decentralization

Hoje: maioria das L2s tem centralized sequencer (single entity orders txs).

Risks:

  • Censorship.
  • MEV extraction.
  • Single point of failure.

Decentralization paths:

  • Shared sequencer (Espresso, Astria, Radius): multiple L2s share decentralized sequencing layer.
  • Based rollup: Ethereum L1 validators sequence (Taiko approach).
  • PoS sequencer committee.

Optimism Foundation 2024 announcement: roadmap to decentralize sequencer 2025-2026.


15. Stats L2s (~mai/2026)

L2 TVL Daily TPS Token Notes
Base (OP Stack) $20B ~50 none Coinbase L2; consumer adoption
Arbitrum One $15B ~30 ARB Largest by volume historically
Optimism $5B ~10 OP OP Stack pioneer
zkSync Era $0.7B ~5 ZK Type 4 ZK
StarkNet $0.4B ~5 STRK Cairo
Polygon zkEVM $0.1B ~2 POL Type 3
Linea $0.3B ~5 none yet ConsenSys
Scroll $0.5B ~5 SCR Type 2
Blast $1B ~10 BLAST Native yield
Mantle $0.8B ~5 MNT EigenDA hybrid
Mode $0.1B ~3 MODE OP Stack
Manta Pacific $0.2B ~3 MANTA Celestia DA

(Rolling shifts; numbers approximations.)

L2 TPS combined ~150 (>10× L1 mainnet). Continues growing.


16. The Endgame (Vitalik 2021)

Vitalik's vision para Ethereum scaling:

Ethereum L1 (settlement + DA via danksharding)
    ↓
ZK rollups (commodity execution)
    ↓
Application code via account abstraction

Eventual: 100M+ TPS combined L1 + danksharding + L2s.


17. Bitcoin L2 emergence

Pós-Ordinals/Inscriptions boom 2023, Bitcoin L2 narrative explosive 2024-2026:

  • Lightning Network (mature, payments).
  • Stacks (smart contracts, sBTC peg).
  • Babylon (BTC restaking for L2 security).
  • CoreDAO (EVM sidechain anchored to BTC).
  • Bouncebit (BTC LRT).
  • Rootstock (long-running EVM sidechain).
  • Arch Network (Bitcoin L2 EVM).
  • BitVM-based (theoretical fraud proofs).
  • Citrea (ZK rollup on Bitcoin).
  • BOB (Build on Bitcoin) (hybrid).

Tese: Bitcoin = base; L2s = utility.


18. L2Beat

Reference para L2 metrics: l2beat.com (independent, by Bartek Kiepuszewski).

Tracks:

  • TVL.
  • Stage classifications (Stage 012 based on decentralization).
  • Risk parameters.
  • DA layer choice.
  • Fraud/validity proofs status.

Convention de stage classification (l2beat 2023):

  • Stage 0: training wheels heavy (centralized council can override).
  • Stage 1: limited training wheels, security council.
  • Stage 2: trustless, security council only emergency.

Em 2026: ~15 chains em Stage 1, ~3 em Stage 2 (Arbitrum One, dYdX v4, Optimism).


  • Native rollups (vitalik proposal): rollups built into Ethereum protocol.
  • Sequencer decentralization (shared, based, PoS).
  • PQC L2s: ZK proofs com PQC sigs.
  • L3s explosion: app-specific atop L2 (Arbitrum Orbit, OP Stack chains).
  • Intent-based architectures: user states intent, solvers execute.
  • Sub-second confirmations: MegaETH (10ms), Monad (1s), Hyperliquid (200ms).
  • AI-native L2s: tied to inference/training markets.

20. Referência cruzada

  • L1s: 04-l1-bitcoin.md, 05-l1-ethereum.md, 06-l1-alt.md.
  • ZK proofs detalhados: ../cryptography/08-pos-quantica.md, ../cryptography/10-criptomoeda.md.
  • Bridges entre rollups: 11-bridges-interop.md.
  • DeFi em L2s: 09-defi.md.
  • MEV em rollups: 12-tokenomics.md §MEV.
  • Hacks de bridges/L2: 14-incidentes.md.