Layer 2 blockchain

On this page 7

A Layer 2 blockchain is a network that executes transactions outside a base blockchain and then posts compressed data or proofs back to it, so that users pay lower fees and get faster confirmation while relying on the base chain for security. The underlying chain, such as Ethereum or Bitcoin, is called Layer 1.

In blockchain scaling, Layer 2 designs address a structural limit: a base chain that every node must verify can process only a limited number of transactions per second. Rather than making Layer 1 blocks larger, Layer 2 systems move execution elsewhere and keep Layer 1 as the court of final settlement.

How a Layer 2 blockchain inherits security

A Layer 2 blockchain collects many user transactions, executes them on its own nodes and periodically commits the result to Layer 1. The node that orders transactions is usually called a sequencer. The commitment includes a state root, a cryptographic summary of all balances, plus the data needed to reconstruct that state.

What makes a system a true Layer 2, rather than an independent chain, is that users can verify and exit through Layer 1 without trusting the operator. Two conditions make this possible: the transaction data must be available so anyone can rebuild the state, and Layer 1 must have a way to reject invalid state roots, either through fraud proofs or validity proofs.

The table below lists the main components of a typical rollup-based Layer 2.

ComponentFunctionTrust consideration
SequencerOrders and executes transactionsCan delay or censor if centralized
Batch posterPublishes transaction data to Layer 1Ensures data availability
Proof systemFraud or validity proofs for state rootsDetermines how invalid states are rejected
Bridge contractHolds deposited assets on Layer 1Largest target for attacks
Upgrade mechanismChanges the system contractsAdmin keys can override other guarantees
Core components of a rollup-based Layer 2

Types of Layer 2 solutions

Layer 2 solutions differ mainly in how they prove correctness and where they keep transaction data. Rollups dominate on Ethereum, while payment channels dominate on Bitcoin.

DesignHow correctness is ensuredWithdrawal to Layer 1Typical example
Optimistic rollupAssumed valid unless a fraud proof winsAbout 7 days challenge periodArbitrum, Optimism, Base
ZK-rollupValidity proof checked on Layer 1After proof verification, often hourszkSync, Starknet, Scroll
State channelSigned off-chain updates between partiesClose the channel on-chainLightning Network
ValidiumValidity proofs, data kept off-chainDepends on data committeeApplication-specific chains
PlasmaFraud proofs with limited on-chain dataExit games with delaysEarly Ethereum designs
Main Layer 2 designs compared

The optimistic rollup challenge period exists so that any honest party can detect an invalid state root and submit a fraud proof. ZK-rollups avoid this wait by posting a succinct cryptographic proof, but generating such proofs requires significant computation and more complex engineering.

Layer 2 compared with sidechains and Layer 1 scaling

A sidechain is often marketed alongside Layer 2 networks but has a different security model: it runs its own consensus and validators and connects to the main chain through a bridge. If its validators collude, Layer 1 cannot protect user funds.

ApproachSecurity sourceMain trade-off
Layer 2 rollupLayer 1 data and proofsOperator centralization during early stages
SidechainOwn validator setIndependent and usually weaker security
Larger Layer 1 blocksLayer 1 consensusHigher hardware needs reduce decentralization
ShardingLayer 1 consensus across shardsHigh protocol complexity
Separate Layer 1Own consensusFragmented liquidity and users
Scaling approaches compared

Ethereum has explicitly adopted a rollup-centric roadmap. The Dencun upgrade of March 2024 introduced blob transactions under EIP-4844, a cheaper data space for rollups that substantially reduced Layer 2 fees. Further steps toward full danksharding aim to expand that data capacity.

Key parameters when evaluating a Layer 2

Layer 2 networks that look similar to users can carry very different trust assumptions. Evaluating them requires looking past fees and speed to how the system behaves when something goes wrong.

ParameterQuestion to askWhy it matters
Proof statusAre fraud or validity proofs live and permissionlessWithout proofs, users trust the operator
Data availabilityIs all data posted to Layer 1Off-chain data adds a trust layer
Sequencer modelCentralized, shared or decentralizedAffects censorship and liveness
Forced exitCan users withdraw if the sequencer stopsCore guarantee of a Layer 2
Upgrade delayIs there a time lock before upgradesGives users time to exit
Questions for assessing a Layer 2

Many rollups began with training wheels: centralized sequencers, security councils able to override proofs and instant upgrades. These measures protect against bugs but mean that actual guarantees can be weaker than the design promises until they are removed.

Limitations and common misconceptions

Layer 2 scaling solves throughput and cost but introduces fragmentation and bridging complexity. Assets on one rollup are not automatically usable on another, and moving between them involves a blockchain bridge or a liquidity provider.

  • Not every network called Layer 2 inherits Layer 1 security; sidechains and some validiums do not.
  • Fast withdrawals usually rely on third parties who front liquidity and take a fee.
  • Sequencer outages can halt transaction processing even while funds remain safe.
  • Token standards and addresses may look identical across chains, so sending to the wrong network is a frequent mistake.

A non-technical view

Picture a busy court that can hear only a few cases per day. A Layer 2 blockchain is like a mediation office next door that settles thousands of everyday disputes quickly and cheaply, then files a summary with the court.

Anyone who disagrees with a summary can still bring it before the court, which has the final word. That is why a good Layer 2 is cheaper without becoming less trustworthy, as long as the summaries are complete and challengeable.

A concrete example

An online game studio wants to give players blockchain-based items, but at busy times a simple token transfer on Ethereum mainnet can cost several dollars. Players make dozens of small trades per session, so those fees would make the feature unusable.

The studio deploys its item contracts on an optimistic rollup that settles to Ethereum. A trade between players there typically costs a fraction of a cent to a few cents and confirms in seconds, while the rollup posts batched data to Ethereum blobs.

Players who want to move valuable items back to mainnet can use the canonical bridge and wait out the roughly seven-day challenge period, or pay a fast-bridge service to receive them sooner. The result is affordable everyday trading with a clear, if slower, path to Layer 1 settlement.