Lesson 6 — Layer 2: rollups, bridges and Lightning without illusions
Lesson 6 of 10 · 3 min
How Layer 2 makes transactions cheaper: optimistic and ZK rollups, the 2024 Dencun upgrade, bridges, sequencers, Lightning and the risks of each.
A Layer 2 is a network built on top of a main blockchain that executes transactions off it and records on the main network only a summary or a proof. The result is much lower fees, at the cost of new risks: bridges, centralised sequencers and withdrawal deadlines. In this lesson you see the main types — optimistic rollups, ZK rollups and the Lightning Network — and what to check before using one.
Why they are needed
Ethereum processes a limited number of transactions per block; when demand rises, gas shoots up (read Network fees (gas)). Increasing block size too much would make running a node harder and therefore the network less decentralised. Layer 2 keeps the main network as «court» and moves execution off-chain.
Rollups: bundling hundreds of transactions into one
A rollup groups many transactions and publishes the compressed data on Ethereum.
How it is calculated, simplified: cost per transaction on L2 ≈ (cost of publishing the batch on L1 ÷ number of transactions in the batch) + execution cost on L2. Hypothetical example: a batch that costs 5 USD to publish and contains 1,000 transactions splits 0.005 USD per transaction, plus a small execution share. Try the Gas fee calculator to see the cost of an operation on the main network and compare with what you pay on an L2.
There are two types:
- Optimistic rollups: assume transactions are valid and give a deadline for someone to prove fraud. Therefore, withdrawal via the official bridge usually takes about 7 days.
- ZK rollups: publish a cryptographic validity proof with each batch. Faster withdrawals, more complex technology.
The Dencun upgrade (EIP-4844)
In March 2024, Ethereum introduced «blobs»: a cheaper data space designed for rollups, which is deleted after a few weeks. Fees on many L2 dropped significantly right after. It shows how a technical decision on the main network changes costs across the entire ecosystem. The Ethereum article provides context.
Risks to weigh
- Centralised sequencer: on many L2s, a single entity orders the transactions. It can censor or pause temporarily; good projects have forced-exit mechanisms to L1.
- Contract upgrades: if a team can change the contracts without notice period, you are trusting them.
- Bridges: they are among the most attacked targets in crypto. The Ronin bridge attack in 2022 stole over 600 million dollars. Prefer the official bridge, test with small amounts and always confirm the destination network (review How to send crypto safely).
- Fragmented liquidity: the same token can exist on several networks in different versions; sending to the wrong network can mean losing the funds.
Check DeFi TVL by network and protocol to see how much value is on each network. A lot of locked value does not prove security, but shows where the users and liquidity are.
Lightning: Bitcoin’s Layer 2
The Lightning Network works with payment channels: two parties lock bitcoins in a main-network transaction and then exchange payments between themselves, almost instant and very cheap, closing the channel when they want. Payments can route through several channels. It is great for small and frequent payments; for storing large amounts for years, the main network remains the standard. The Ethereum vs. Bitcoin article compares the philosophies of the two networks.
How much you actually save
If you make many small transactions, the difference between L1 and L2 can be huge after a year. Try the Total cost with fees with your number of operations per month: it is the kind of calculation that changes decisions. It includes the cost of entering and exiting the L2, which is paid on the main network. The DeFi article shows where L2s are used most.
Summary
- Layer 2 executes off the main network and publishes summaries or proofs on it.
- Optimistic rollups have a challenge period (about 7 days on the official bridge); ZK rollups use validity proofs.
- Dencun (March 2024) greatly reduced rollup costs.
- The risks lie in bridges, sequencers and contract upgrades.
In the next lesson you will see how to analyse a project’s tokenomics.
Frequently asked questions
What is a Layer 2?
It is a network that executes transactions off the main blockchain and records summaries or proofs on it, inheriting part of its security with lower fees.
Why does it take 7 days to withdraw from an optimistic rollup?
Because there is a deadline for someone to challenge a fraudulent batch. Third-party services can advance the withdrawal, with a fee and additional risk.
Are bridges between networks safe?
They have been among the most attacked targets in crypto. Use official bridges, test with small amounts and always confirm the destination network.
Practise with the tools
- Fee (gas) calculator — Estimate a transaction's cost from current network fees, in US$ and in €.
- All-in cost with fees — Combine CoinGecko’s spot price with fees you enter yourself and compute the break-even price to recover them. We do not invent exchange commissions.
- DeFi TVL by chain and protocol — Total value locked (TVL) on the main DeFi chains and protocols, in US$, with the 1- and 7-day change when DefiLlama sends it. The source is always visible.
Read next
- What are gas and network fees in crypto? A simple explanation with examples
- What is Ethereum (ETH)? Smart contracts explained
- Ethereum vs Bitcoin: what are the differences? A simple comparison for beginners
- What is DeFi? Decentralised finance for beginners
- How to send crypto safely: a checklist before you press "Send"