Overview
Layer 2 refers to any protocol or system built on top of Bitcoin's Layer 1 that enables transactions to occur off the main blockchain while still deriving security guarantees from it. These solutions address Bitcoin's scalability constraints without compromising the base layer's decentralization or security properties.
How It Works
Layer 2 protocols generally follow a pattern: anchor state on-chain, conduct transactions off-chain, and settle the final state back on-chain when needed.
User A ←──── Off-chain txs ────→ User B
│ │
▼ ▼
┌─────────────────────────────────────────────┐
│ On-chain: Open Channel (funding tx) │
│ ...many off-chain payments happen... │
│ On-chain: Close Channel (settlement tx) │
└─────────────────────────────────────────────┘
The Lightning Network
The Lightning Network is Bitcoin's most widely adopted Layer 2. It uses bidirectional payment channels and HTLCs to route payments across a network of nodes, enabling near-instant transactions with minimal fees.
Other Layer 2 Approaches
Beyond Lightning, other Layer 2 concepts include sidechains (like Liquid), state chains, and various proposed covenant-based constructions. Each makes different trade-offs between trust assumptions, functionality, and complexity.
Edge Cases
Not every "Layer 2" offers the same security guarantees. True Layer 2 solutions allow users to unilaterally exit back to Layer 1 with their funds, without needing permission from any counterparty. Systems that require trusted third parties for withdrawals are better described as sidechains or federated models.