Lightning Network

A second-layer payment network on top of Bitcoin that enables fast, low-fee payments through payment channels.

What is the Lightning Network?

The Lightning Network is a payment network built on top of Bitcoin. It lets users send bitcoin almost instantly and with very low fees by moving most transactions off the blockchain and settling only the final results on it. It is known as a second-layer, or layer 2, solution.

How it works

Two users open a payment channel by locking bitcoin in a shared address with an on-chain transaction. Both must sign to move those funds. Inside the channel they can then pay each other any number of times by exchanging signed updates of how the locked balance is split. These updates are not broadcast. When they are finished, the latest state is published to the blockchain and each party receives their share.

Users do not need a direct channel with everyone. Payments can be routed across several connected channels. A mechanism called a hashed timelock contract ensures that intermediate nodes either pass the payment along or cannot take it at all. The design was proposed in a paper by Joseph Poon and Thaddeus Dryja.

Example

A customer pays for a coffee by scanning a Lightning invoice, shown as a QR code. The wallet finds a route through the network, and the café sees the payment within seconds. No on-chain transaction is created for this purchase.

Why it matters

Bitcoin's base layer handles a limited number of transactions per block, and each one waits for confirmation. Lightning makes small, frequent payments practical while relying on the blockchain as the final arbiter. SegWit, activated in 2017, fixed a transaction issue that made such channels safer to build.

Limits and risks

Related terms