layer 2
A layer 2 is a separate system built on top of a main blockchain (the layer 1, such as Bitcoin or Ethereum) that handles transactions away from the crowded base chain, then settles the results back to it. The goal is to keep the strong security guarantees of the main chain while doing the bulk of the work somewhere cheaper and faster. Layer 2 has become the leading answer to the scalability trilemma: rather than make the base layer do more, you let it do less but verify carefully.
The pattern works because the base chain does not need to watch every individual transaction; it only needs enough information to guarantee the final outcome is honest. A layer 2 batches up thousands of transactions off-chain, then posts a compact summary, plus a proof or a challenge window, to layer 1. The main chain acts as a supreme court and final ledger: it does not referee every dispute in real time, but it holds the authoritative record and can be appealed to if anyone cheats.
Imagine a busy cafe where, instead of running your card for every coffee, the staff keep a tab and charge you once at the end of the day. The bank (the slow, secure base chain) processes a single settlement instead of a hundred tiny ones, while you still get the bank's full protection. Rollups are the dominant kind of layer 2 today; other designs include state channels and sidechains, each making its own trade-off about how it borrows the base chain's security.
A trader makes 50 swaps on an Ethereum rollup in an hour. Each swap is cheap and near-instant on the layer 2, and only one batched summary of all 50 lands on Ethereum, sharing that single posting's cost among everyone in the batch.