← Back to Tools

Layer 2 Guide: Understanding Ethereum Scaling Solutions

Master L2 technology - rollup types, ecosystems, frameworks, and building on Layer 2

Understanding Layer 2

Layer 2 (L2) solutions are scaling technologies built on top of Ethereum (Layer 1) that inherit its security while processing transactions more efficiently. They're the primary answer to Ethereum's scalability challenges.

Instead of processing every transaction on Ethereum mainnet, L2s batch transactions together and submit compressed proofs back to L1. This dramatically reduces costs while maintaining the security guarantees of Ethereum.

Today, L2s process more transactions than Ethereum mainnet, with billions of dollars in TVL and vibrant ecosystems. This guide covers everything from the technology behind L2s to practical usage and even launching your own L2.

Scaling Fundamentals

Before diving into specific solutions, understand why Layer 2 exists and how it works.

Why Layer 2?

The scalability problem: Ethereum can process about 15 transactions per second. During high demand, this leads to:

  • High gas fees ($50-200+ for simple transfers during peaks)
  • Slow confirmation times
  • Poor user experience for dApps

The trilemma: Blockchains must balance decentralization, security, and scalability. Ethereum prioritizes the first two, then uses L2s for scalability.

L2 solution:

  • Process transactions off-chain
  • Inherit Ethereum's security
  • 10-100x cheaper fees
  • Faster confirmations

How Rollups Work

Rollups are the dominant L2 technology. They "roll up" many transactions into batches and post them to Ethereum.

Basic flow:

  1. Users submit transactions to the L2
  2. The sequencer orders and executes transactions
  3. Transactions are batched together
  4. Batches are compressed and posted to Ethereum
  5. A proof mechanism ensures validity

What gets posted to Ethereum:

  • Compressed transaction data (or hash)
  • New state root after execution
  • Proof of correctness (varies by rollup type)

This allows thousands of L2 transactions to be secured by a single L1 transaction.

L2 Security Model

L2s inherit Ethereum's security, but the degree varies by implementation.

Key security properties:

  • Data availability: Can users reconstruct the L2 state from L1 data?
  • Escape hatch: Can users withdraw if the L2 goes offline?
  • Upgrade mechanism: Who can upgrade contracts and how?
  • Sequencer: Is it centralized? What happens if it censors?

L2BEAT provides detailed risk analysis for each L2, grading them across these dimensions. Always check before depositing significant funds.

Important: Most L2s today have some centralization risks. The technology is maturing, but be aware of the tradeoffs.

Related Tools: L2BEAT

Types of Rollups

Rollups differ primarily in how they prove transaction validity to Ethereum.

Optimistic Rollups

Optimistic rollups assume transactions are valid unless proven otherwise. Anyone can challenge a fraudulent state during a dispute period.

How it works:

  1. Transactions are executed and state is published
  2. A challenge period begins (typically 7 days)
  3. Anyone can submit a fraud proof if they detect invalid state
  4. If challenged, the disputed transaction is re-executed on L1
  5. After the period, state is considered final

Key players:

  • Arbitrum One: Largest L2 by TVL, uses Nitro technology with WASM execution
  • Optimism: OP Stack pioneer, Superchain vision for connected L2s
  • Base: Coinbase's L2, fastest growing, built on OP Stack

Tradeoffs:

  • Pro: Simpler technology, EVM-equivalent
  • Con: 7-day withdrawal delay for canonical bridge

ZK Rollups

ZK (Zero-Knowledge) rollups generate cryptographic proofs that verify all transactions are valid. No dispute period needed.

How it works:

  1. Transactions are executed off-chain
  2. A validity proof (ZK-SNARK or ZK-STARK) is generated
  3. Proof is verified by an L1 smart contract
  4. State is immediately final once proof is accepted

Key players:

  • zkSync Era: Native account abstraction, ZK Stack for hyperchains
  • Starknet: STARK proofs, Cairo language, unique architecture
  • Scroll: EVM-equivalent zkEVM, bytecode compatibility
  • Polygon zkEVM: Part of Polygon 2.0 vision
  • Linea: ConsenSys zkEVM

Tradeoffs:

  • Pro: Fast finality, no dispute period
  • Con: Complex proving, some EVM differences

Optimistic vs ZK Comparison

Finality:

  • Optimistic: ~7 days for canonical withdrawals
  • ZK: Minutes (once proof is submitted)

EVM Compatibility:

  • Optimistic: Fully EVM-equivalent, easy to deploy existing contracts
  • ZK: Varies - some are equivalent, some require modifications

Costs:

  • Optimistic: Lower L2 costs, higher L1 data costs
  • ZK: Higher proving costs, but improving rapidly

Technology maturity:

  • Optimistic: More mature, battle-tested
  • ZK: Rapidly advancing, some still in development

In practice: Both types are production-ready. Choose based on your specific needs and the ecosystem you want to build in.

Major L2 Ecosystems

Each major L2 has developed its own ecosystem with unique characteristics.

Arbitrum Ecosystem

Arbitrum is the largest L2 by TVL, home to major DeFi protocols.

Key stats:

  • Highest TVL among L2s
  • Strong DeFi presence (GMX, Camelot, Radiant)
  • ARB governance token

Technology:

  • Nitro: WASM-based execution for speed
  • Stylus: Rust/C++ smart contract support
  • Orbit: Framework for building L3s

Ecosystem highlights:

  • Native DEXs and perps platforms
  • Gaming projects (Treasure, Pirate Nation)
  • Growing NFT scene

OP Stack & Superchain

Optimism's vision is a "Superchain" - a network of interoperable L2s sharing security and infrastructure.

OP Stack chains:

  • OP Mainnet: The original Optimism chain
  • Base: Coinbase's L2, massive growth
  • Zora: NFT-focused L2
  • Mode: Sequencer fee sharing
  • And 20+ more...

Superchain benefits:

  • Shared security and upgrades
  • Cross-chain messaging (coming)
  • Sequencer revenue sharing
  • Collective governance

Why it matters: Building on one OP Stack chain means easy portability to others. The network effect is powerful.

ZK Ecosystem

ZK rollups are maturing rapidly with their own distinct ecosystems.

zkSync Era:

  • Native account abstraction from day one
  • ZK Stack for launching hyperchains
  • Active DeFi ecosystem

Starknet:

  • Cairo programming language (not EVM)
  • STARK proofs for quantum resistance
  • Unique approach to scalability

Scroll:

  • Type 2 zkEVM (EVM-equivalent)
  • Easy migration from Ethereum
  • Growing DeFi presence

Polygon zkEVM:

  • Part of broader Polygon ecosystem
  • CDK for launching custom chains
  • Enterprise focus

Using Layer 2

Getting started with L2s is straightforward but requires understanding a few key concepts.

Getting Started

Adding L2 networks:

  1. Visit Chainlist.org
  2. Search for the L2 you want
  3. Click "Add to MetaMask" (or your wallet)
  4. Confirm the network addition

Key networks to add:

  • Arbitrum One (Chain ID: 42161)
  • Optimism (Chain ID: 10)
  • Base (Chain ID: 8453)
  • zkSync Era (Chain ID: 324)

Wallet compatibility:

  • Most EVM wallets work with Optimistic L2s
  • Some ZK L2s (Starknet) need specific wallets
  • Hardware wallets fully supported
Related Tools: Chainlist

Bridging to L2

Options for getting funds to L2:

  • Canonical bridge: Official, most secure, but slow (7 days for Optimistic)
  • Third-party bridges: Fast (minutes), slightly higher risk
  • CEX withdrawal: Many exchanges now support direct L2 withdrawals

Recommended approach:

  1. Check if your exchange supports direct L2 withdrawal (cheapest)
  2. If not, use a bridge aggregator like LI.FI or Jumper
  3. For large amounts, consider canonical bridge despite the wait

Withdrawing back to L1:

  • Optimistic: 7-day wait via canonical bridge, or use fast bridges
  • ZK: Fast via canonical bridge (minutes to hours)

Gas & Cost Optimization

Understanding L2 fees:

L2 fees have two components:

  • L2 execution fee: Cost of computing on the L2 (very cheap)
  • L1 data fee: Cost of posting data to Ethereum (varies with L1 gas)

Cost comparison (typical):

  • Simple transfer: $0.01-0.10 on L2 vs $2-10 on L1
  • DEX swap: $0.05-0.50 on L2 vs $10-50 on L1

EIP-4844 impact:

After EIP-4844 (blobs), L2 fees dropped 10-100x. L1 data is now stored in cheaper "blob space."

Tips:

  • L2 fees still fluctuate with L1 gas
  • Batch operations when possible
  • Some L2s are cheaper than others for specific operations

L2 Frameworks

Want to launch your own L2? Several frameworks make this accessible.

OP Stack

The OP Stack is the modular, open-source framework powering Optimism and the Superchain.

Key features:

  • Battle-tested codebase (powers Base, Zora, Mode)
  • Modular design - swap components as needed
  • Active development and upgrades
  • Strong community and documentation

Launching a chain:

  1. Fork the OP Stack repository
  2. Configure chain parameters
  3. Deploy L1 contracts
  4. Launch sequencer and nodes
  5. Join the Superchain (optional but recommended)

Considerations:

  • Sequencer operation costs
  • Relationship with Optimism Collective
  • Upgrade coordination
Related Tools: OP StackBaseZora

Arbitrum Orbit

Orbit allows anyone to launch L3 chains that settle to Arbitrum.

L3 concept:

  • L3s settle to L2s, which settle to L1
  • Even cheaper fees (another 10x reduction possible)
  • Custom configurations for specific use cases

Key features:

  • Customizable gas tokens
  • Choice of data availability layers
  • Stylus support for multiple programming languages

Example: Degen Chain

Degen Chain launched as an Orbit L3 for the Farcaster community. It demonstrates how L3s can serve specific communities with ultra-low fees.

ZK Frameworks

ZK Stack (zkSync):

  • Launch ZK hyperchains connected to zkSync
  • Native interoperability between chains
  • Shared liquidity potential

Polygon CDK:

  • Modular framework for ZK chains
  • Connect to Polygon's AggLayer
  • Enterprise-friendly with compliance options

Key difference from Optimistic:

ZK frameworks require more computational overhead for proving but offer faster finality. They're best for use cases where instant finality matters.

Trade-off: ZK stack development is more complex, but the technology advantages may be worth it for specific applications.

Related Tools: ZK StackPolygon CDK

L2 Analytics & Research

Understanding L2 metrics helps you make informed decisions about where to build and use.

Key Metrics

Total Value Locked (TVL):

  • Measures assets deposited in the L2
  • Indicates user trust and ecosystem size
  • Compare via L2BEAT

Daily transactions:

  • Activity metric
  • Compare to Ethereum mainnet
  • Some L2s now exceed L1 transaction count

Average fee:

  • Cost per transaction
  • Varies by operation type
  • Compare across L2s for your use case

Active addresses:

  • Unique wallets transacting
  • Indicates real user adoption
  • Be wary of airdrop farming inflation
Related Tools: L2BEATL2 Marathon

Risk Assessment

L2BEAT risk framework:

L2BEAT grades L2s across multiple risk categories:

  • State validation: How is state proven correct?
  • Data availability: Where is transaction data stored?
  • Upgradeability: Who can upgrade and how fast?
  • Sequencer failure: What happens if sequencer stops?
  • Proposer failure: What happens if no one proposes state?

Current state:

  • Most L2s still have training wheels (upgradeable, centralized sequencer)
  • This is intentional for quick fixes during early stages
  • Watch for progressive decentralization

What to look for:

  • Security council multisig (not single key)
  • Timelock on upgrades
  • Escape hatch functionality
  • Decentralization roadmap
Related Tools: L2BEAT

Advanced Topics

For builders and researchers pushing the boundaries of L2 technology.

Data Availability

Data availability (DA) is where transaction data is stored so anyone can verify the L2 state.

Options:

  • Ethereum calldata: Original approach, expensive but secure
  • Ethereum blobs (EIP-4844): Cheaper, temporary storage (2 weeks)
  • Alt-DA (Celestia, EigenDA): Cheapest, but adds trust assumptions

Validiums vs Rollups:

  • Rollups: DA on Ethereum (full security inheritance)
  • Validiums: DA off-chain (cheaper but trust required)

The tradeoff: Cheaper DA = lower costs but additional trust assumptions. For now, blob data offers the best balance.

Sequencer Decentralization

Most L2s today run centralized sequencers. This is a known limitation being actively addressed.

Sequencer responsibilities:

  • Order transactions
  • Execute and produce blocks
  • Submit batches to L1

Risks of centralization:

  • Censorship (sequencer refuses transactions)
  • MEV extraction
  • Single point of failure

Mitigation strategies:

  • Escape hatch (force include via L1)
  • Shared sequencing networks
  • Based sequencing (L1 proposes)
  • Decentralized sequencer sets

Future: Multiple teams are working on decentralized sequencing. Expect significant progress in 2024-2025.

L2 Interoperability

As the number of L2s grows, interoperability becomes critical.

Current state:

  • Each L2 is relatively isolated
  • Bridging required to move between L2s
  • Liquidity fragmented

Solutions emerging:

  • Superchain interop: Native messaging between OP Stack chains
  • Shared sequencing: Atomic transactions across L2s
  • Intent-based bridges: Fast cross-L2 transfers
  • Aggregation layers: Shared settlement (AggLayer, Avail)

Vision: Eventually, users shouldn't need to think about which L2 they're on. Assets and apps should work seamlessly across the rollup ecosystem.

Related Tools: Superchain

Future Developments

Emerging L2 technologies:

  • MegaETH: Real-time blockchain with sub-millisecond latency
  • Eclipse: Solana VM as Ethereum L2
  • Fuel: Parallel transaction execution with Sway language

Technology trends:

  • Faster ZK proving (hardware acceleration)
  • Alternative VMs (SVM, FuelVM, MoveVM)
  • Based rollups (L1-sequenced)
  • Sovereign rollups (own settlement)

Market evolution:

  • Consolidation around major ecosystems
  • App-specific L3s for custom needs
  • Cross-L2 abstraction layers

The L2 landscape is evolving rapidly. The chains and frameworks that exist today may look very different in 2-3 years.

Related Tools: MegaETHEclipse

Glossary

Rollup
A Layer 2 scaling solution that executes transactions off-chain, batches them together, and posts compressed data to Ethereum for security inheritance.
Optimistic Rollup
A rollup that assumes transactions are valid unless challenged. Uses fraud proofs during a dispute period (typically 7 days) to catch invalid state.
ZK Rollup
A rollup that generates cryptographic validity proofs for every batch. No dispute period needed - state is final once proof is verified on L1.
Sequencer
The entity that orders transactions, executes them, and produces L2 blocks. Most L2s currently have centralized sequencers with plans to decentralize.
Fraud Proof
A mechanism in optimistic rollups where anyone can prove invalid state by re-executing disputed transactions on L1 during the challenge period.
Validity Proof
A cryptographic proof (ZK-SNARK or ZK-STARK) that mathematically verifies all transactions in a batch were executed correctly.
Data Availability
The guarantee that transaction data is available for anyone to download and verify the L2 state. Critical for security and escape hatches.
Challenge Period
The time window (typically 7 days) in optimistic rollups during which anyone can submit a fraud proof to dispute invalid state.
Escape Hatch
A mechanism allowing users to withdraw funds directly to L1 even if the L2 sequencer goes offline or censors transactions.
L3 (Layer 3)
A chain that settles to an L2 instead of directly to Ethereum. Provides even lower costs for specialized use cases.
Superchain
Optimism's vision for a network of interoperable OP Stack L2s sharing security, upgrades, and cross-chain messaging.
zkEVM
A ZK rollup that's compatible with Ethereum's virtual machine, allowing existing smart contracts to run with minimal or no modifications.