Nathaniel's blog
Back to posts

Layer 2 Scaling Solutions Explained

Nathaniel LinFebruary 15, 20268 min read1 views
Layer 2 Scaling Solutions Explained

Ethereum processes about 15 transactions per second. Visa handles 65,000. That gap is why Layer 2 solutions exist — they execute transactions off the main chain while inheriting its security guarantees. Here's how they work.

The Scalability Trilemma

Every blockchain balances three properties:

  • Security: How hard is it to attack the network?

  • Decentralization: How many independent validators exist?

  • Scalability: How many transactions per second?

Ethereum prioritizes security and decentralization. Layer 2s add scalability on top without compromising the base layer.

Optimistic Rollups

Optimistic rollups (Optimism, Arbitrum, Base) batch hundreds of transactions off-chain, compress them, and post the batch to Ethereum as calldata.

The "optimistic" part: transactions are assumed valid unless challenged.


1. Users submit transactions to the L2 sequencer

2. Sequencer batches transactions and posts to L1

3. Anyone can submit a "fraud proof" within 7 days

4. If fraud is proven, the batch is reverted

5. After 7 days with no challenge, the batch is final

Pros: EVM-compatible (deploy existing Solidity contracts unchanged), battle-tested Cons: 7-day withdrawal period (bridging back to L1), centralized sequencers (for now)

ZK Rollups

Zero-knowledge rollups (zkSync, StarkNet, Polygon zkEVM) take a different approach: every batch includes a cryptographic proof that the transactions were executed correctly.


1. Users submit transactions to the L2 operator

2. Operator executes transactions and generates a ZK proof

3. Proof + compressed state diff posted to L1

4. L1 contract verifies the proof (math, not re-execution)

5. Batch is immediately final

Pros: Instant finality (no challenge period), smaller on-chain footprint Cons: ZK proof generation is computationally expensive, EVM compatibility is harder

Comparing the Approaches

FeatureOptimistic RollupsZK Rollups
Finality7 daysMinutes
EVM compatibilityNativeVaries
Proof costLow (only on dispute)High (every batch)
Withdrawal time7 days (without fast bridges)Minutes
MaturityMore battle-testedRapidly improving

Building on L2

For application developers, the experience is nearly identical to L1:

import { createPublicClient, http } from "viem";
import { base } from "viem/chains";

const client = createPublicClient({
  chain: base,
  transport: http(),
});

const balance = await client.getBalance({
  address: "0x...",
});

Same tooling (Hardhat, Foundry, viem, ethers.js), same Solidity contracts, different RPC URL. The main differences are lower gas costs (10-100x cheaper) and faster block times.

The Endgame

The Ethereum roadmap envisions thousands of rollups, each specialized for different use cases:

  • General purpose: Arbitrum, Optimism, Base for DeFi and dApps

  • Payments: Low-latency rollups optimized for transfers

  • Gaming: High-throughput rollups for on-chain game state

  • Enterprise: Private rollups with controlled validator sets

Layer 2 isn't a temporary fix — it's the permanent scaling architecture. Ethereum L1 becomes the settlement and data availability layer, while execution moves to rollups. The user doesn't need to care which layer they're on, as long as their transactions are fast and cheap.

Share this post

Reactions