Crypto · How blockchains work
Layer 2 networks: rollups, Lightning and how they scale
How rollups and the Lightning Network move transactions off the main chain, why that cuts fees, and what new risks a layer 2 adds: operators, bridges and exit delays.
On this page
A layer 2 is a network that processes transactions away from a blockchain's main chain and then uses that chain to settle the result. The main chain is "layer 1". The point is capacity. A layer 1 such as bitcoin or Ethereum keeps its blocks small so that anyone can run a node, which limits it to a handful of transactions a second and makes block space expensive when demand is high. A layer 2 does the bulk of the work somewhere cheaper and borrows the main chain's security for the part that matters.
For a user the difference shows up as cost and speed: a transfer on a rollup costs a small fraction of the same transfer on Ethereum's main chain, and a Lightning payment in bitcoin completes within seconds instead of waiting ten minutes for a block.
Those gains are not free. A layer 2 adds an operator, a bridge and software that can be upgraded, each of which is a new way to lose money that the main chain does not have. This lesson explains the two main designs, works through why batching is cheap, and sets out what a user is trusting.
The problem layer 2 solves
How a blockchain works: blocks, hashes and nodes explains why every full node stores and checks every transaction. That is what makes the ledger trustworthy, and it is also a hard ceiling on capacity. A chain cannot be at once open to anyone's node, resistant to attack and able to handle the volume of a card network. This tension is sometimes called the blockchain trilemma.
Raising the ceiling directly, with bigger or faster blocks, prices small participants out of running nodes. The alternative is to leave layer 1 as a small, secure settlement system and build higher-capacity systems on top that inherit as much of its security as they can. That is the layer 2 approach, and it is how Ethereum's own documentation describes the network scaling.
Rollups
A rollup is a separate network with its own blocks and its own fees, usually run by an operator called a sequencer. Users send transactions to the sequencer. It orders and executes them, which gives users a confirmation within a second or two, and periodically does two things on layer 1:
- publishes a compressed copy of the transaction data, so that anyone can reconstruct the rollup's state independently; and
- posts the result, a short summary of all balances after the batch.
Because the data is on layer 1, the rollup's operator cannot rewrite history or hide what happened. The remaining question is how layer 1 knows the posted result is correct, given that its validators do not re-run the transactions. The two families of rollup answer it differently.
Optimistic rollups
An optimistic rollup assumes the posted result is valid unless someone proves otherwise. After each result is posted there is a challenge period during which anyone watching can submit a fraud proof showing that a transaction was processed wrongly. If the proof succeeds, the result is thrown out and the party that posted it is penalized.
The security assumption is that at least one honest party is watching and able to challenge. The cost is time: a withdrawal to layer 1 cannot be finalized until the challenge period has passed. Optimism's documentation gives seven days on mainnet, and Arbitrum's about 6.4 days. Third-party services will advance the funds sooner for a fee, taking on the wait themselves.
Zero-knowledge rollups
A zero-knowledge rollup, or ZK-rollup, posts a validity proof with each batch: a compact piece of cryptography that demonstrates the result follows from the transactions and the rules. A contract on layer 1 checks the proof, which takes little work however many transactions it covers. If the proof does not verify, the batch is rejected.
There is no challenge period, so withdrawals do not carry a built-in week of delay. The costs are elsewhere: generating proofs takes heavy computation, and the technology is newer and more intricate, which leaves more room for undiscovered errors in the code.
| Optimistic rollup | Zero-knowledge rollup | |
|---|---|---|
| How correctness is established | Assumed, unless challenged with a fraud proof | Proven for every batch with a validity proof |
| Standard withdrawal to layer 1 | About 7 days | No challenge delay |
| What it relies on | At least one honest watcher | The proof system and its code being sound |
| Main cost | Waiting; capital tied up in exits | Computing the proofs |
| Examples | Arbitrum, OP Mainnet, Base | zkSync, Starknet, Linea |
The examples are named to help recognition and are not recommendations.
Why batching is cheap: a worked example
The expensive part of a rollup is publishing to layer 1. Everything else is one operator running ordinary computers. So the cost per transaction is mostly the layer 1 cost of the batch divided by the number of transactions in it.
Take invented round numbers: publishing a batch costs $12 of layer 1 fees, and the rollup's own computing costs $0.004 per transaction.
| Transactions in the batch | Cost per transaction |
|---|---|
| 1 | $12.004 |
| 10 | $1.204 |
| 100 | $0.124 |
| 500 | $0.028 |
| 2,000 | $0.010 |
| 5,000 | $0.0064 |
Two things follow. A rollup gets cheaper per transaction as it gets busier, the opposite of a layer 1, up to the point where its own capacity fills. And its fees still move with layer 1: if the cost of publishing triples, so does the largest part of every user's fee.
That second point is why Ethereum changed how rollups publish. Since the Dencun upgrade of March 13, 2024, rollup data goes into blobs, a dedicated kind of block space with its own fee that nodes keep for about 18 days and then discard. Blob capacity has been raised several times since; after the parameter change of January 7, 2026 the target is 14 blobs a block with a maximum of 21. The aim is cheap, plentiful space for rollup data, since that data is the largest part of what a rollup user pays.
The Lightning Network
Bitcoin's main layer 2 works on a different principle. Instead of batching everyone's transactions, Lightning lets two parties transact privately and only tell the blockchain the final outcome.
Two parties open a payment channel by locking bitcoin in a shared address on the main chain that needs both of their signatures to spend. That is the one funding transaction. From then on they pay each other by exchanging signed updates of how the locked balance is split. Each update replaces the last and none is broadcast. When they are done, one final transaction on the main chain pays each side its closing balance.
A worked example. Ana opens a channel with a coffee shop and funds it with 0.002 BTC. Over a month she buys 40 coffees at 0.00004 BTC each. On the main chain that would be 40 transactions and 40 fees. Through the channel it is two: the opening and the closing. The other 40 payments take no block space and complete within seconds.
Channels also connect into a network. If Ana has a channel with the shop and the shop has one with a bookstore, Ana can pay the bookstore through the shop. A mechanism called a hash time-locked contract makes each hop conditional on the next, so the intermediary cannot keep the money: either the whole payment completes or none of it does.
Safety against cheating comes from the main chain. If one side tries to close the channel with an outdated balance that favors them, the other can prove it and take the entire channel balance as a penalty. The catch is that someone has to be watching the chain to notice.
Lightning's practical limits are different from a rollup's:
- Liquidity. A channel can only pay out what is locked on the paying side. Receiving a large payment needs enough capacity pointing your way.
- Being online. Funds are safest when your node, or a service acting for it, monitors the chain for an old state being published.
- Small payments. It suits frequent small payments. It is not designed for moving large sums or for running programs.
Many people use Lightning through an app that runs the node and holds the channel for them. That is convenient, and it means the app's operator is a custodian, with the considerations in Crypto wallets and custody: keys, seed phrases, hot and cold storage.
What you are trusting on a layer 2
A layer 1 asks you to trust its rules and the spread of its miners or validators. A layer 2 adds several things on top.
- The bridge. To use a rollup you deposit coins into a contract on layer 1, which locks them, and an equal amount is created on the rollup. The contract ends up holding everyone's deposits, which makes it a large target. A flaw in a bridge puts all of them at risk at once.
- The sequencer. A rollup's sequencer is commonly a single operator, often the company behind the network. It cannot steal funds if the rollup's proofs work as designed, but it can go offline, delay transactions or order them to its own advantage. Rollups provide a slower route to force a transaction through layer 1 for that case.
- Upgrade keys. Rollup contracts can usually be changed by a small group holding administrative keys, sometimes without notice. Whoever can change the contract can, in principle, change who gets the money. How this power is limited varies greatly from one network to another and changes over time.
- Immature proofs. A rollup may advertise fraud proofs or validity proofs while running with them restricted to approved parties, or with an override. The label "rollup" does not tell you which.
- Exit delays. Leaving an optimistic rollup by the standard route takes about a week. In a crisis, that week can matter.
- Fragmentation. A token on one layer 2 is not the same object as the token on another or on layer 1. Moving between them needs a bridge each time, and sending to an address on the wrong network is a common and often permanent mistake.
Sidechains are not layer 2s
A sidechain is an independent blockchain with its own validators that is connected to a main chain by a bridge. It does not post its data to the main chain or let the main chain rule on disputes. If a sidechain's validators collude, the main chain cannot help. Marketing often blurs the line, so the useful question for any network is: if its operators disappeared or turned dishonest, could users still get their funds out through layer 1 alone?
| System | Where transactions run | What layer 1 guarantees | Main added risk |
|---|---|---|---|
| Layer 1 | On the main chain | Everything | None beyond the chain itself |
| Rollup | Operator's network | Data is available; results can be proven or challenged | Bridge, sequencer, upgrade keys |
| Lightning | Private channels | Final settlement and penalties for cheating | Liquidity; needing to watch |
| Sidechain | A separate chain | Nothing about the sidechain's own blocks | The sidechain's validators |
How Finabase does it
Finabase shows prices, not networks. Many layer 2 projects have their own tokens, which appear on the crypto list with price, market value and supply like any other coin. A layer 2's token is not a claim on the fees the network earns unless its own rules say so, and holding it is not needed to use the network: fees on Ethereum rollups are generally paid in ether, shown as ETH.X.
Finabase does not show layer 2 fees, transaction counts, bridge balances or the state of any network's proof system. The cost table on this page is arithmetic on invented inputs ($12 a batch, $0.004 a transaction), included to show why the cost per transaction falls as a batch grows.
Frequently asked questions
What is the difference between layer 1 and layer 2?
Layer 1 is the main blockchain, where every node checks every transaction. A layer 2 processes transactions elsewhere and uses layer 1 to store data, hold deposits and settle disputes. Layer 2 is cheaper and faster, and adds trust in its own operators and code.
Is a layer 2 as safe as Ethereum?
Not automatically. A rollup's data and final settlement rest on Ethereum, but its bridge contract, sequencer and upgrade keys are its own. A rollup with working proofs and tightly limited upgrade powers is close to layer 1 security; one without them depends heavily on its operators.
Why does withdrawing from a rollup take seven days?
Optimistic rollups accept results without proof and allow about a week for anyone to challenge them. A withdrawal to layer 1 waits out that period. Zero-knowledge rollups prove each batch and have no such delay, and third-party bridges offer faster exits from optimistic rollups for a fee.
Do I need a different wallet for a layer 2?
Usually not for Ethereum rollups: the same address and keys work, and the wallet switches networks. The balances are separate, however. Ether on a rollup is not available on layer 1 until it is bridged back. Lightning needs a wallet that supports it.
Is the Lightning Network a separate coin?
No. Lightning payments are bitcoin. The network is a way of exchanging bitcoin that is locked in channels on the main chain, with only the opening and closing recorded there.
Summary
Layer 2 networks raise a blockchain's capacity by doing the work off the main chain and settling on it. Rollups execute transactions through an operator and publish the data to Ethereum, with correctness either open to challenge for about a week (optimistic) or proven outright (zero-knowledge); because one main-chain cost is shared by a whole batch, the cost per transaction falls as the batch grows. Lightning lets two parties trade any number of bitcoin payments through a channel that touches the main chain twice. In return for low fees a user takes on a bridge that holds everyone's deposits, an operator that orders transactions, administrative keys that can change the rules and, on optimistic rollups, a slow exit.
Check your understanding
5 questions on this lesson. Each answer comes with the reason, and nothing is scored.
Why is a transaction on a rollup cheaper than the same transaction on Ethereum’s main chain?
- Rollups do not charge fees
- Many transactions share the cost of one publication to the main chain
- Rollups use a cheaper coin to pay validators
Show the answer
B. Many transactions share the cost of one publication to the main chain The costly step is posting data to layer 1. A batch spreads that cost across every transaction in it.
Publishing a batch costs $20 on layer 1 and the rollup’s own computing costs $0.002 per transaction. What does each of 4,000 transactions cost?
- $0.007
- $0.05
- $0.002
Show the answer
A. $0.007 $20 ÷ 4,000 = $0.005, plus $0.002 of layer 2 computing, gives $0.007.
What does an optimistic rollup rely on to stop a false result being accepted?
- A validity proof checked for every batch
- The sequencer being a regulated company
- At least one honest party challenging the result during the challenge period
Show the answer
C. At least one honest party challenging the result during the challenge period Results stand unless a fraud proof is submitted in time. That is also why standard withdrawals wait about a week.
Two people make 500 payments to each other through one Lightning channel. How many transactions appear on bitcoin’s main chain?
- 500
- 2: one to open the channel and one to close it
- None
Show the answer
B. 2: one to open the channel and one to close it Only the funding transaction and the closing transaction are recorded. The updates in between are exchanged privately.
Which question best separates a true layer 2 from a sidechain?
- Does it have lower fees than the main chain?
- Does it have its own token?
- If its operators vanished or cheated, could users still recover funds through the main chain alone?
Show the answer
C. If its operators vanished or cheated, could users still recover funds through the main chain alone? A layer 2 posts data to the main chain and lets it settle disputes. A sidechain’s safety rests on its own validators.
Sources and further reading
- Ethereum.org — Scaling (layer 2 as the approach to scaling Ethereum)
- Ethereum.org — Optimistic rollups (challenge period of roughly seven days)
- Ethereum.org — Zero-knowledge rollups (validity proofs; no withdrawal delay)
- EIP-4844 — Shard blob transactions (blob data, its own fee market, pruned after about 18 days)
- Ethereum Foundation — Fusaka mainnet announcement (blob targets after the December 2025 and January 2026 parameter forks)
- Optimism documentation — Withdrawal flow (7-day fault challenge period on mainnet)
- Optimism documentation — Standard bridge (tokens locked on one side, minted on the other)
- Arbitrum documentation — L2 to L1 messaging (challenge period of about 6.4 days)
- Lightning Network specifications (BOLT 0, 2 and 3) — channels, funding transactions, HTLCs
- Batch cost arithmetic on this page — invented round numbers, computed by Finabase; they illustrate the mechanism and are not measurements of any network
