Layer 2 (L2)
Layer 2 (L2) is a network built on top of a base blockchain (Layer 1), such as Ethereum, that processes transactions off the main chain and relies on that chain for security and settlement, making transactions cheaper and faster.
A Layer 2 handles transactions away from the main chain, usually bundling many of them into batches. It then posts compressed transaction data, or a cryptographic proof, back to the Layer 1. Because the Layer 1 stores this data and can settle disputes, the L2 can draw on its security while doing most of the work elsewhere. On Ethereum the most common type is the rollup. Optimistic rollups treat batches as valid unless someone submits a fraud proof during a challenge period. ZK rollups attach a validity proof to every batch. Bitcoin's Lightning Network takes a different approach and uses payment channels.
For users, the main benefit is lower fees and quicker confirmations. On EVM-compatible L2s, the same wallet and addresses usually work as on Ethereum. For example, someone might bridge ETH from Ethereum to Arbitrum or Optimism and then swap tokens on a decentralized exchange there, paying a small fraction of what the same swap would cost on Ethereum mainnet.
A common misconception is that every L2 is as secure as Ethereum itself. There are several types of L2, each with its own trade-offs and security model. Their safety depends on the underlying technology, how secure their smart contracts are and how mature the network is. Many still use a single operator as the sequencer or have upgradeable contracts controlled by a small group. Bridges are frequent targets for attacks. Withdrawing from an optimistic rollup through its official bridge can take around a week. Sidechains are sometimes marketed as L2s, but they rely on their own validators rather than the Layer 1's security.