Layer 2

A protocol that moves work off the base chain while still relying on it for security.

Basically

A Layer 2 handles transactions away from the main blockchain. It still relies on that blockchain for security.

Key Takeaways

  • Layer 2 protocols process transactions off the base blockchain (Layer 1) to increase throughput and reduce fees. They rely on the underlying chain for final settlement and security guarantees.
  • Different L2 architectures make different trade-offs. State channels and payment channels like Lightning offer instant finality between participants, while rollups batch many transactions into a single on-chain proof.
  • Bitcoin L2s like Spark and Lightning focus on preserving self-custody and trustlessness. Ethereum L2s prioritise smart contract execution at scale.

What Is Layer 2?

A Layer 2 (L2) is a protocol that sits on top of a base blockchain (Layer 1, or L1). It handles transactions off-chain while inheriting the security of the underlying network. It moves most transaction processing away from the congested main chain, then anchors the results back to L1 so you retain the same trust guarantees.

Layer 1 works like a courthouse: it provides the final, authoritative resolution of disputes, but it would be impractical for every daily interaction to go through a courtroom. Layer 2 protocols work like day-to-day contracts and agreements, with either party able to escalate to the courthouse if something goes wrong. Most transactions never need the court, but its existence enforces honest behaviour.

Layer 2 solutions address a fundamental limitation of blockchains: Bitcoin processes roughly 7 transactions per second, while Ethereum handles about 15. Both figures are orders of magnitude below what global payment networks require, and increasing L1 throughput directly through bigger blocks or faster block times compromises decentralisation or security. L2 protocols offer a way to scale without sacrificing the properties that make blockchains valuable in the first place.

How It Works

Layer 2 protocols all move transaction execution off-chain while using the base layer as an anchor for security. Their specific mechanisms vary by architecture, but they follow this general flow:

Security inheritance is the critical property: you should always be able to recover your funds on L1, even if L2 operators become uncooperative or go offline. The strength of this guarantee varies across L2 designs.

Payment Channels

Payment channels are the oldest and most battle-tested L2 approach on Bitcoin. Two parties lock funds in a multisig UTXO on-chain, then exchange signed transactions off-chain to update their balances. Only the opening and closing transactions touch the blockchain.

The Lightning Network extends this concept into a network of payment channels. It routes payments through intermediary nodes using HTLCs, so any two participants can transact without a direct channel between them. Lightning can process millions of transactions per second in theory, with settlement finality in milliseconds.

Payment channels require you to be online and monitor the chain for fraud. If Bob tries to publish an old state where he had more funds, watchtowers or Alice herself can submit a justice transaction to penalise him. For a deeper look at channel mechanics, see the research on payment channels from concept to implementation.

State Channels

State channels generalise payment channels beyond simple value transfer. They can track any application state, including game moves, contract executions, or complex multi-party interactions, rather than just balances. Participants agree on state transitions off-chain and can settle to L1 at any time.

State channels require all participants to be identified upfront, and the channel must be opened before transactions can occur. They work well for repeated interactions between known parties, but suit open-ended applications with arbitrary participants less well.

Rollups

Rollups execute transactions off-chain but post transaction data or validity proofs back to L1, so L1 can always verify the correctness of the L2 state. Rollups come in two flavours:

Rollups are the dominant L2 scaling approach on Ethereum, powering networks like Arbitrum, Optimism, and zkSync. Bitcoin rollup designs are more constrained because Bitcoin Script has limited programmability, though proposals like BitVM are exploring ways to enable fraud proofs on Bitcoin.

Sidechains

Sidechains are independent blockchains with their own consensus mechanisms, connected to the main chain via a two-way peg. You lock funds on L1 and receive equivalent tokens on the sidechain, where you can transact with different rules, such as faster blocks, lower fees, and smart contracts.

Sidechains have weaker security inheritance than other L2 types because their security depends on their own validator set, not on L1. Colluding sidechain validators could put your funds at risk. Bitcoin's Liquid Network is a notable sidechain example, using a federation of functionaries rather than Bitcoin's proof-of-work for consensus.

Statechain and Spark

Spark represents a newer category of Bitcoin L2 that uses statechains and threshold signatures to enable off-chain transfers of UTXOs without payment channels. Instead of routing payments through a network of channels, Spark transfers ownership of UTXOs by rotating signing keys between the sender, receiver, and a set of operators using Schnorr-based threshold schemes.

Spark's approach avoids the liquidity constraints of payment channels: there is no channel capacity limit, no inbound liquidity requirement, and no need for complex routing. You retain the ability to unilaterally exit to L1 at any time. For a comprehensive overview, see What Is Spark: Bitcoin Layer 2.

Bitcoin L2 vs. Ethereum L2

Bitcoin L2s look very different from Ethereum L2s, largely because the base layers have different capabilities. Their main differences are:

Bitcoin's limited scripting means L2 designs must work within tighter constraints. These constraints have led to creative solutions like HTLCs, Schnorr signatures, and threshold cryptography. Proposed covenants like OP_CTV could expand what Bitcoin L2s can do and enable more trust-minimised designs; for a detailed comparison, see the research on Bitcoin Layer 2 comparison.

The Scalability Trilemma

Layer 2 protocols exist because of the blockchain scalability trilemma: a single system cannot easily maximise decentralisation, security, and scalability at the same time. L1 blockchains like Bitcoin prioritise decentralisation and security at the cost of throughput. L2s reclaim scalability by processing transactions off-chain.

L2s introduce their own trilemma of sorts. Each design makes trade-offs:

Security Inheritance Varies

L2s vary in how much security they inherit from L1. A channel-based L2 like Lightning gives you a direct on-chain enforcement path: if your counterparty cheats, you can submit a justice transaction to L1 and claim their funds, while a federated sidechain like Liquid requires trusting a consortium of validators. When you evaluate an L2, the key question is whether you can always recover your funds on L1 without anyone else's cooperation.

Liveness Requirements

Many L2 designs require participants or their delegates to be online and monitoring the chain. In Lightning, if you go offline and your counterparty publishes an old channel state, you need to respond with a penalty transaction before the timelock expires. Watchtowers mitigate this risk, but they add another dependency.

Liquidity Fragmentation

Funds locked in L2 protocols are not immediately available on L1, and moving between different L2s often requires going through L1 as an intermediary. Liquidity fragments across systems as more L2 protocols launch. Such fragmentation is especially pronounced in the Ethereum ecosystem, where dozens of rollups each hold separate pools of liquidity.

Complexity and User Experience

L2 protocols add layers of complexity for both developers and users. Channel management, liquidity provisioning, withdrawal periods, and bridge security are all concerns that do not exist on L1, and the best L2 solutions hide this complexity so you do not need to understand the underlying protocol to use it safely. Spark's SDK approach aims to make L2 interaction as simple as a standard wallet API.

Regulatory Uncertainty

L2 protocols are handling increasing transaction volume, and regulators are examining whether L2 operators, including node operators, sequencers, and federations, have compliance obligations. Regulatory treatment of L2 infrastructure is still evolving across jurisdictions, creating uncertainty for builders and operators.

The glossary entry is for informational purposes only and does not constitute financial or investment advice. Always do your own research before using any protocol or technology.

0

← All 1876 glossary terms