Foundations · Blockchain

Layer 1 & Layer 2

A Layer 1 is a base blockchain that secures and settles transactions itself. A Layer 2 processes transactions off that base chain and settles the results to it, to increase capacity.

  • Intermediate
  • 5 min read
  • Updated

Why it matters

Base blockchains can only process a limited number of transactions, and fees climb when demand exceeds that limit. Layer 2 networks are the main response. A large share of everyday crypto activity now happens on them, often without users noticing which network they are on. Knowing the difference explains why fees vary so much, why moving funds between networks takes extra steps, and which security assumptions apply where.

How it works

Layer 1 and Layer 2
ApplicationsExchanges, wallets, games, lending.
Layer 2Processes transactions off the main chain and posts results back to it.
Layer 1The base blockchain: final settlement and security.

A Layer 1 (L1) is a base blockchain. It has its own validators or miners, runs its own consensus, and settles transactions without relying on any other chain. Bitcoin and Ethereum are Layer 1s.

A Layer 2 (L2) is a separate system built on top of a Layer 1. It executes transactions itself, away from the base chain, and then records the results on the base chain. The aim is to borrow the Layer 1’s security while handling far more activity than the Layer 1 could.

In plain words

A court can hear only so many cases a day. So businesses settle most of their dealings privately and file a single summary with the court each week. The court’s authority still stands behind the summary, but it has not had to hear every transaction. The Layer 1 is the court. The Layer 2 is the private ledger that reports to it.

Rollups

The main family of Layer 2s is the rollup. A rollup collects many transactions, executes them, compresses them into a batch, and posts that batch to the Layer 1.

The life of a rollup transaction
  1. SendThe user sends a transaction to the Layer 2.
  2. SequenceAn operator orders and executes it within seconds.
  3. BatchMany transactions are compressed together.
  4. PostThe batch is written to the Layer 1.
  5. SettleA proof, or an unchallenged waiting period, makes it final.
The quick response at step two comes from the operator. The security comes from the last two steps.

Two things are posted: the transaction data, so that anyone can reconstruct the rollup’s state, and some means for the base chain to be confident the results are correct. Rollups divide into two kinds according to that second part.

Two families of rollup
AspectOptimistic rollupZero-knowledge rollup
How results are trustedAssumed valid unless challengedProved valid by cryptography
Proof typeFraud proof, used only in a disputeValidity proof, with every batch
Withdrawal to Layer 1After a challenge period, often about a weekOnce the proof is accepted
Main costWaiting timeHeavy computation to produce proofs
Both post transaction data to the base chain. They differ in how the base chain becomes convinced.

Optimistic rollups post results and assume they are right. For a set period, anyone can submit a fraud proof showing that a batch was wrong, in which case it is reversed. Withdrawals to the Layer 1 wait until that period has passed.

Zero-knowledge (ZK) rollups attach a validity proof to each batch: a piece of cryptography that the base chain can check quickly and that, under the proof system’s assumptions, can only exist if the batch was computed correctly.

Why it is cheaper

Sharing one hypothetical batch cost of 0.5 coin
2,000 transactions in the batch0.00025 each
200 transactions in the batch0.0025 each

Ten times fewer users, ten times the cost each.

A Layer 2 is cheap because many users split the base-chain cost. The saving depends on the batch being full.

A Layer 1 transaction pays for its own space in a block. A rollup transaction pays for a small slice of a batch. The fixed costs of posting to the base chain are divided among everyone in the batch, and the data is compressed. The mechanics of fees are in gas and network fees.

Going deeper

The sequencer. The operator that orders rollup transactions is called a sequencer. On many rollups it is a single entity run by the project. It gives the fast confirmation users see, and it can also delay or reorder transactions, or go offline. Designs usually include a slower route to force a transaction through the Layer 1 if the sequencer refuses it.

Upgrade keys. Many rollups are controlled by contracts that a small group can upgrade. Until those controls are removed or restricted, users rely on that group as well as on the Layer 1.

Getting in and out. Assets move between a Layer 1 and a Layer 2 through a bridge. A rollup’s own bridge is tied to its proof system. Third-party bridges are faster and carry separate risks.

Other approaches. A payment channel network lets two parties exchange many payments off-chain and settle the net result on-chain. Bitcoin’s Lightning Network is the best-known example. A sidechain is an independent blockchain with its own validators, connected to another chain by a bridge. It does not inherit the base chain’s security, so many sources do not count it as a true Layer 2.

Splitting the cost of a batchHypothetical illustration

Hypothetical and simplified numbers. On a busy Layer 1, a simple transfer costs 0.0020 of the native coin.

A rollup posts a batch to that Layer 1 at a total cost of 0.5 coin. The batch contains 2,000 transactions, and the rollup adds its own charge of 0.00005 per transaction.

  • Share of the batch cost: 0.5 / 2,000 = 0.00025.
  • Total per transaction: 0.00025 + 0.00005 = 0.0003.
  • Compared with the Layer 1: 0.0020 / 0.0003 = about 6.7 times cheaper.

On a quiet day the rollup posts a batch with only 200 transactions at the same total cost.

  • Share of the batch cost: 0.5 / 200 = 0.0025.
  • Total per transaction: 0.0025 + 0.00005 = 0.00255, more than the 0.0020 Layer 1 fee.

Real rollups size their batches to avoid this, but the principle holds: the saving comes from sharing.

What it does NOT mean

  • Layer 2 does not mean second-rate. It describes position in the stack, not quality.
  • A Layer 2 is not automatically as secure as its Layer 1. That depends on its proofs, its operator and who can upgrade it.
  • A fast confirmation on a Layer 2 is not final settlement. It is the sequencer’s word until the base chain has the batch.
  • An asset on a Layer 2 is not the same as that asset on the Layer 1. It is a representation that depends on the bridge.
  • Not every chain called a Layer 2 settles to a Layer 1. The label is used loosely in marketing.

Common misunderstandings

  1. Sending to the right address on the wrong network. Addresses often look identical across a Layer 1 and its Layer 2s, but balances are separate.
  2. Expecting instant withdrawals. Optimistic rollups impose a waiting period on the standard route.
  3. Treating all Layer 2s as equal. Their stage of development and their trust assumptions differ.

Risks and limits

  • Rollup contracts and proof systems are complex and can contain bugs.
  • A single sequencer can fail or censor, at least temporarily.
  • Upgrade keys concentrate control in a small group.
  • Bridges between layers have been targets of large exploits.
  • Liquidity is split across many networks, which can mean thinner markets on each.

Key takeaway

A Layer 1 secures and settles its own transactions. A Layer 2 executes transactions elsewhere and posts the results to a Layer 1, cutting costs by sharing them, with security that depends on how completely it is anchored to the base chain.

Sources and further reading