A layer 2 network is a separate system that handles transactions off the main blockchain and then reports a summary back to it. The goal is lower cost and more speed. The trade-off is that you now depend on extra pieces, and how much protection you inherit depends on the design.
The Short Answer
A blockchain's base network, called layer 1, records transactions and keeps the shared history. When many people want to use it at once, it can get slow and fees can climb. Ethereum's scaling documentation notes that when demand is high, layer 1 transactions slow down and gas prices can become unworkable. A layer 2 is a network built on top that runs activity away from layer 1, then posts data or proofs back so that layer 1 can act as the anchor.
The Restaurant Tab Analogy

Think of a restaurant where a group sits down for the evening. The server does not run your card for every glass of water. They keep a tab, and at the end of the night one payment settles everything. Because the many small orders are bundled into one final settlement, the cost and effort per order drops.
A layer 2 works the same way in spirit: many small transactions happen on the tab, and a single settlement is recorded on layer 1. Here is where the analogy breaks. A restaurant knows you personally and can chase you if you walk out. A layer 2 has no such relationship. It relies on rules, cryptography and incentives to make sure the final settlement is honest, and the strength of those protections varies from one design to another. A tab is also kept by one server, while a layer 2 may be run by a single operator or by a group.
How It Actually Works
On a rollup, transactions are carried out outside layer 1, but the transaction data is posted to layer 1, where consensus is reached, according to Ethereum's scaling documentation. Operators, often called sequencers, order the transactions and group them into batches. Posting one batch instead of thousands of separate transactions spreads the layer 1 cost across everyone in the batch. Ethereum's page on optimistic rollups describes this as sharing fixed costs, which lowers fees.
Two Main Kinds of Rollup
Optimistic rollups assume a batch is valid unless someone proves otherwise. According to the documentation, there is a challenge window of roughly seven days in which anyone can dispute a batch with a fraud proof. A consequence is that withdrawing funds back to layer 1 takes about a week unless a third party offers to front the money for a fee.
Zero-knowledge rollups attach a cryptographic proof, called a validity proof, showing the batch was computed correctly. Ethereum's page on zero-knowledge rollups explains that once layer 1 accepts the proof, the update is final and withdrawals do not need a challenge delay. The trade-off is that creating proofs is computationally heavy and may need specialized hardware, and some proof systems rely on a one-time trusted setup.
Plain version: one approach says "valid unless challenged", the other says "here is proof it is valid". Both aim to settle on layer 1, and each has costs.
Cost and Speed Trade-Offs
Lower cost and faster confirmation inside the layer 2 are the main appeal. But there are things to weigh:
- Speed on the layer 2 is not the same as final settlement on layer 1. The optimistic design's challenge window is one example.
- Fees still exist, since the batch must be posted to layer 1.
- Moving between layers has its own steps and waiting times.
- Some layer 2 services depend on a single operator staying online.
Security Is Inherited, but Not Equally
Ethereum's documentation says rollups derive security from layer 1 consensus, but the same page warns that not every off-chain approach does. Sidechains, for example, run under their own consensus rules and connect through bridges, and validiums keep their data off layer 1. Different designs carry different assumptions, so the label "layer 2" alone does not tell you how protected a given network is. Ask what the specific network says about who can change its rules, who can pause it, and what you can do if its operator disappears.
Sequencers and Centralization
Many rollups use a single sequencer, according to Ethereum's rollup pages. A centralized sequencer has more control over transaction order than an ordinary operator, can go offline, and may be able to delay or censor transactions. The same documentation says users can usually bypass a censoring sequencer by submitting directly to layer 1, within set limits. The Bank for International Settlements, an international institution that serves central banks, notes in BIS Bulletin 126 that trade-offs between decentralisation, security and scalability help explain the growth of layer 2 solutions, which fragment infrastructure, liquidity and assets across and within chains. That is a trade-off to understand, not a verdict on any particular network.
Bridges and Their Risks

To move assets between layers or chains, people use bridges. Ethereum's bridges documentation says bridges that rely on external verifiers add trust assumptions, that a flaw in a bridge's smart contract can expose assets to theft, and that bridges account for several of the largest hacks. The BIS bulletin adds that bridges reduce frictions but introduce new dependencies on trust, governance and operational resilience. Bridging is therefore a step with its own risks, separate from the risks of either network.
A Hypothetical Prosperity Builders Learning Exercise
This exercise is hypothetical and uses fictional game credits. It does not describe a real network, product or offering.
Imagine a practice neighborhood in the game where 100 pretend players make small purchases at the Community Market. Setting it up two ways:
- Direct settlement. Each of the 100 purchases is recorded on the main game ledger separately, with a settlement cost of 1 credit each. The total is 100 credits.
- Tab and settle later. The 100 purchases go on a practice tab, and one summary is recorded on the main ledger for a settlement cost of 20 credits, plus a service cost of 0.3 credits per purchase. The total is 20 + 30 = 50 credits.
The numbers are made up purely for arithmetic. Now ask: what if the tab keeper makes a mistake? What if the keeper goes offline before settling? What if you want your credits back on the main ledger tomorrow? Write down who would help you in each case and what the rules say. The arithmetic shows why batching can lower cost. The questions show what you now depend on.
A Practical Checklist
- Is this a rollup, or a different kind of off-chain system with different assumptions?
- Is it optimistic or zero-knowledge, and what does that mean for withdrawal times?
- Who runs the sequencer, and can it be bypassed?
- Who can change the rules, and how quickly?
- What bridge am I using, and who verifies it?
- Where is the transaction data posted, and for how long is it available?
- What are all the fees, including settlement back to layer 1?
Prosperity Builders' educational examples use fictional game credits. This guide does not recommend using any network. To see how a base network is described, read What Is Trusted Smart Chain (TSC)?, which explains the Layer 1 idea in the context of that project's own materials.
Questions to Take Into the Next Guide
- How do the computers on a base network agree on which transactions count?
- What does it mean for a transaction to be final?
- What happens when participants disagree about the record?
- What cannot agreement guarantee?