Layer 2 networks explained
Layer 2s move activity off a base chain while borrowing its security. Here is how rollups and channels work, and which trust assumptions remain.
Why layer 2 exists
A base blockchain such as Bitcoin or Ethereum, often called layer 1, asks every full node to check every transaction. That is what makes it hard to cheat, and it is also what limits throughput. When demand for block space exceeds supply, fees rise until enough users give up.
One answer is to build a bigger, faster base chain, which generally means fewer people can afford to run a node. The other is to keep the base chain small and move most activity somewhere else, using the base chain only as a court of final appeal. That second approach is what layer 2 means: a separate system that processes transactions itself but anchors its results to a layer 1 in a way that lets users fall back on the layer 1 if something goes wrong.
Rollups
On Ethereum, the dominant form of layer 2 is the rollup. A rollup has an operator, called a sequencer, that accepts transactions, orders them and executes them. Periodically it bundles, or rolls up, a large batch and posts two things to Ethereum: the compressed transaction data and a commitment to the resulting state.
Posting the data matters. Because the inputs are published on layer 1, anyone can reconstruct the rollup's state independently and check the operator's work. The two main types of rollup differ in how that check is enforced.
Optimistic rollups
An optimistic rollup assumes each batch is valid unless someone objects. After a batch is posted there is a challenge window, typically around seven days, during which any observer can submit a fraud proof showing that the claimed result does not follow from the data. If the proof succeeds, the bad batch is thrown out and the party that posted it is penalised.
The security assumption is that at least one honest party is watching and able to challenge. The practical cost is that withdrawals through the official bridge back to layer 1 must wait out the window. Third-party liquidity providers offer faster exits for a fee, by fronting funds and taking on the waiting themselves.
Zero-knowledge rollups
A zero-knowledge, or validity, rollup posts a cryptographic proof with each batch. A contract on layer 1 verifies the proof, and a batch with an invalid state transition simply cannot be accepted. There is no dispute period, so withdrawals can finalise as soon as the proof is verified.
The trade-off is complexity. Generating proofs is computationally heavy, and proving general-purpose smart-contract execution took years of engineering. The proving systems themselves are intricate software that has to be correct.
Why it is cheaper
A layer 1 transaction pays for its own place in a block. On a rollup, hundreds or thousands of transactions share the cost of one batch posting. Since Ethereum's Dencun upgrade in March 2024, rollups can post their data in blobs, a separate and cheaper class of temporary data storage designed for this purpose, which cut typical rollup fees substantially.
Some systems go further and keep transaction data off Ethereum entirely, relying on a separate committee or network to keep it available. These are cheaper again and carry a weaker guarantee, because users depend on that outside party to be able to reconstruct their balances.
Payment channels
Bitcoin's main layer 2, the Lightning Network, takes a different approach. Two parties lock funds in a shared on-chain transaction, then exchange signed balance updates off-chain as often as they like. Only opening and closing the channel touches the blockchain. Payments can be routed across a web of channels, which makes small, fast payments practical. Channels suit payments rather than general-purpose applications, and they require participants to manage liquidity and stay online or delegate monitoring.
What to keep in mind
Layer 2 does not mean trustless by default. Points worth checking for any given network:
- Sequencer. Most rollups run a single sequencer operated by the project. It cannot steal funds in a well-designed rollup, but it can go offline or delay transactions. Look for a mechanism that lets users force transactions through layer 1.
- Proof system. Some optimistic rollups launched without working fraud proofs and added them later. Check whether proofs are live and who is allowed to submit them.
- Upgrade keys. If a small group can upgrade the contracts instantly, the security of the rollup rests on that group.
- Bridges. Moving assets between layer 2s through third-party bridges adds another contract, and bridges have been among the most frequently exploited pieces of crypto infrastructure.
Layer 2s have made everyday use of Ethereum far cheaper. The useful habit is to ask, for each one, what exactly happens if the operator disappears tomorrow.