Lightning Network
Lightning is a payment network built on top of Bitcoin. Two parties lock bitcoin in a shared channel and then pay each other instantly and cheaply off-chain; payments can hop across channels to reach anyone.
Short definition
A second layer for fast, cheap payments that settles to the bitcoin blockchain.
How it works
Opening a channel is one on-chain transaction to a 2-of-2 Multisig output. After that the two parties exchange signed updates that re-split the balance; only the latest one counts, and publishing an old one can be punished. Closing the channel settles the final balance on-chain.
Payments across several channels use hash time-locked contracts (HTLCs): each hop can only claim its money by revealing the same secret, so the payment either completes end to end or fails. Invoices (BOLT11), offers (BOLT12), LNURL and Lightning Addresses are ways to request money.
Implementations and wallets
All follow the BOLT specifications: LND (Lightning Labs), Core Lightning (Blockstream), Eclair (ACINQ) and LDK (Spiral). Wallets range from self-custodial (for example Phoenix, Breez, Zeus) to custodial apps where a company holds the funds.
Trade-offs
You need inbound liquidity to receive, your node must be online (or watched by a watchtower) to stay safe, and large payments can fail to find a route. Public capacity counts only announced channels; private channels are invisible, so the real network is bigger.
See also
- SegWit (Segregated Witness)SegWit was a 2017 upgrade that moved signatures into a separate part of the transaction. It fixed a long-standing bug, made room for more transactions and opened the door to the Lightning Network.
- MultisigMultisig means a payment needs several keys out of a set, for example any 2 of 3. Losing one key, or having one stolen, does not lose the coins.
- Satoshi (unit)A satoshi, or sat, is the smallest amount of bitcoin: one hundred-millionth of a coin. 1 BTC = 100,000,000 sats.
- TimelockA rule that coins (or a key) can only be used after a certain time or block height.
- Full nodeA full node is a computer running Bitcoin software that checks every block and transaction against the rules by itself. With your own node you don't have to trust anyone about your balance.
References
- Poon & Dryja, The Bitcoin Lightning Network (2016) lightning.network
- BOLT specifications github.com
- mempool.space Lightning statistics mempool.space