07 l2 scaling

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, appchains. Cada uma com tradeoff security vs throughput vs custo.


1. Por que L2?

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

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

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


2. Taxonomia

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

3. Optimistic Rollups

*ssumption* txs valid by default; anyone can challenge via fraud proof during window.

Mecânica

  1. *equencer*colleta txs off-chain.
  2. Posts batches to L1 (calldata em preDencun, blobs após EIP4844).
  3. *hallenge 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)

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

*rbitrum 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)

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

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

Base (Coinbase L2)

Launched 2023-08. Uses OP Stack. *o 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

  • *oba Network* OP-based, fork.
  • *etis* OP-based, decentralized sequencer attempt.
  • *antle* hybrid (OP + EigenDA).
  • *raxtal*(Frax L2).
  • *last* native ETH yield via staking integration. Controversial farming.
  • *ode*
  • *orld Chain*(Worldcoin's OP Stack chain, 2024).

4. ZK Rollups

*alidity 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 EVMalmostequivalent (some opcodes/precompiles differ) Faster
Type 4 High-level compatible (compile Solidity) Fastest, lowest compat

zkSync Era (Matter Labs)

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

*kSync Stack*(ZK Stack): hyperchains, OPStackequivalent 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

*airo* provable language. Type 4 EVM via "Kakarot" project.

*olition* pertx choice ZK vs offchain DA.

Polygon zkEVM

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

Polygon *ggLayer*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

Opensource ZK circuits. Academiaheavy team.

Linea (ConsenSys L2)

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

MetaMask integration native. ConsenSys ecosystem leverage.

Outros ZK

  • *olygon Miden* STARK + WASM. Accountbased ou UTXO. Privacy via peraccount state.
  • *ISC Zero* zkVM general (RISC-V). Bonsai prover service.
  • *uccinct (SP1)* zkVM RISC-V Rust. Modular use.
  • *leo* ZK-native L1 (não L2 strictly).
  • *ztec* privacy ZK rollup (ETH-paired). Mainnet planned 2025.
  • *olygon Hermez*(legacy, predecessor of zkEVM).
  • *oopring* ZK rollup specialized for orderbook DEX (early 2020).
  • *YdX 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

*reDencun (mar/2024)* L2s posted calldata em mainnet. Custaram US$ 15 per tx em peak.

*ostDencun* blob txs (separate fee market). L2 fees dropped 550×. Typical tx em Base/Arbitrum ~$0.01-0.10 em 2026.

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


6. State channels

*ffchain*state mantido por participants; onchain 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. *argely 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

*ros* instant, cheapest possible, privacy. *ons* 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 *wn consensus* periodically anchored or bridged to L1. *ã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)

Stablepegged native gas (xDai = USDpegged). PoSDAO consensus. Used for low-fee small payments.

Rootstock (RSK)

Bitcoin sidechain, EVMcompatible. Mergemined com Bitcoin (PoW shared).

Liquid (Bitcoin federated sidechain)

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

Ronin (Axie Infinity)

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


8. Validium e Volition

Validium

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

  • *ros* cheaper than rollup (no calldata cost).
  • *ons* DA dependency = trust in committee/DA layer.

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

Volition

User decides pertx: *K rollup*(full L1 DA, expensive) or *alidium*(offchain 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).

*odular thesis* separate layers, each optimized.

Celestia (TIA)

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

Spec Valor
Launch 20231031
Consensus Tendermint (CometBFT)
Token TIA
Marketcap (mai/2026) ~$1B

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

*overeign 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:

  • *antle* EigenDA + own DA.
  • *rax L2* EigenDA.
  • *anta Pacific* Celestia.
  • *olygon CDK chains* Polygon's DAC option.

Tradeoff: L1native DA = strongest security; alt-DA = cheaper, weaker trust model.


10. Restaking thesis (EigenLayer)

*reeram Kannan + team 2021–2024*

Mecânica

  1. Stake ETH em Ethereum normally.
  2. Optin: restake same ETH em *igenLayer*to validate *VS (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

  • *ooled security* AVSs herdam Ethereum's economic security sem precisar own validator set.
  • *apital efficiency* ETH validators earn dual rewards (Ethereum staking + AVS).
  • *isk* cascading slash if AVS misbehaves; complexity.

LRTs (Liquid Restaking Tokens)

  • *ther.fi (eETH)*
  • *enzo (ezETH)*
  • *uffer*
  • *elp*
  • *tader*

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. *overeignty*+ custom optimization.

Cosmos chains

Each Cosmos SDK chain é appchain. Examples cobertos em `06l1-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

*ros* customization (gas token, governance, throughput), sovereignty. *ons* bootstrap problem (validator set, liquidity), security less than rollups (depends on impl).


12. Rollupasa-Service (RaaS)

Companies que provision L2s/L3s para clientes:

  • *onduit*(OP Stack + Arbitrum Orbit).
  • *aldera*
  • *lt Layer*
  • *elato*
  • *eeve*

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


13. Cross-rollup messaging / interop

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

  • *CIP (Chainlink Cross-Chain Interop)*— generic.
  • *ayerZero*— ultra-light nodes.
  • *ormhole*— multi-chain.
  • *yperlane*— modular interop.
  • *cross*— fast L2 ↔ L2 bridging.
  • *onnext*— atomic cross-chain.
  • *P Superchain*(intraOPStack messaging).
  • *ggLayer*(intraPolygonCDK).
  • *thereumnative EIP3074*+ intent-based.

Detalhes em 11-bridges-interop.md.


14. Sequencer decentralization

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

Risks:

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

Decentralization paths:

  • *hared sequencer*(Espresso, Astria, Radius): multiple L2s share decentralized sequencing layer.
  • *ased rollup* Ethereum L1 validators sequence (Taiko approach).
  • *oS 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ósOrdinals/Inscriptions boom 2023, Bitcoin L2 narrative explosive 20242026:

  • *ightning Network*(mature, payments).
  • *tacks*(smart contracts, sBTC peg).
  • *abylon*(BTC restaking for L2 security).
  • *oreDAO*(EVM sidechain anchored to BTC).
  • *ouncebit*(BTC LRT).
  • *ootstock*(long-running EVM sidechain).
  • *rch Network*(Bitcoin L2 EVM).
  • *itVM-based*(theoretical fraud proofs).
  • *itrea*(ZK rollup on Bitcoin).
  • *OB (Build on Bitcoin)*(hybrid).

Tese: Bitcoin = base; L2s = utility.


18. L2Beat

Reference para L2 metrics: *2beat.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 *tage classification*(l2beat 2023):

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

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


  • *ative rollups*(vitalik proposal): rollups built into Ethereum protocol.
  • *equencer decentralization*(shared, based, PoS).
  • *QC L2s* ZK proofs com PQC sigs.
  • *3s explosion* app-specific atop L2 (Arbitrum Orbit, OP Stack chains).
  • *ntent-based architectures* user states intent, solvers execute.
  • *ub-second confirmations* MegaETH (10ms), Monad (1s), Hyperliquid (200ms).
  • *I-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.

Source: ../home/koder/dev/koder/meta/docs/blockchain/compendium/07-l2-scaling.md