Layer 2
In simple terms
A Layer 2 is like an express lane on top of a highway. Instead of every car going through the main road (which gets slow and expensive), some traffic uses a faster shortcut that feeds back to the main road later. This makes things quicker and cheaper.
Definition
A secondary network built on top of a Layer 1 to improve speed and reduce costs.
In depth
Layer 2 solutions are protocols that bundle multiple transactions together before settling them on the base Layer 1 blockchain, significantly reducing on-chain congestion and gas fees. Common implementations include rollups (optimistic and zero-knowledge), which compress transaction data and validity proofs, and sidechains, which maintain their own consensus but periodically checkpoint to Layer 1. By moving computation off-chain and only using Layer 1 for periodic settlement and dispute resolution, Layer 2s can achieve 10-100x throughput improvements while inheriting Layer 1's security guarantees.
How does Layer 2 work?
A Layer 2 runs transactions on a separate, cheaper system while inheriting security from an underlying Layer 1. Users deposit funds into a contract on the base chain, which credits an equivalent balance on the Layer 2. Activity then executes off the base chain at high speed. Periodically a sequencer compresses many transactions into a single batch and posts it to Layer 1, along with either a validity proof (zero-knowledge rollups) or a challenge window during which anyone can dispute a bad batch (optimistic rollups). Withdrawing sends the funds back through the base-chain contract once the batch is settled or the challenge period ends.
An example
Say posting one batch to the base chain costs an illustrative five dollars, and that batch contains 500 transactions. The Layer 1 data cost per transaction works out to one cent, plus a small Layer 2 execution charge on top. The same 500 transactions sent individually on the base layer would each pay full base-layer fees. This batching is the entire source of the cost reduction; nothing about the underlying chain got cheaper.
Figures are illustrative only.
What beginners get wrong
- Optimistic rollups typically impose a challenge period of about a week on withdrawals to Layer 1; third-party bridges that skip it charge a fee and add risk.
- Most rollups today rely on a single operator-run sequencer, which can censor or reorder transactions and go down, halting the network temporarily.
- Assets on one Layer 2 are not automatically usable on another, so moving between them requires a bridge and its associated risks.
- Not every network labeled Layer 2 posts data to a base chain; some are separate chains with their own, weaker security assumptions.
Related terms
Part of
What is cryptocurrency, and how does it work? — the subject page for cryptocurrency basics, with all 23 of its definitions in one place.
Educational only — not financial advice.
