Glossary / Lightning & layer 2
Lightning Network
Also known as Lightning, LN.
- Definition
- The Lightning Network is a payment layer built on top of bitcoin where two parties lock coins in a shared on-chain address and then pay each other instantly off-chain.
Lightning moves bitcoin between wallets by updating a shared balance sheet instead of publishing a transaction. The design was published by Joseph Poon and Thaddeus Dryja on January 14, 2016, and the first mainnet-ready software, lnd 0.4-beta, shipped on March 15, 2018. For a buyer it means small payments that clear in about a second for a fee measured in fractions of a cent.
How it works
The Lightning Network is a graph of two-party channels, and a payment is a route across that graph.
Opening a channel means publishing one ordinary bitcoin transaction that pays into an address both peers control together. From that moment the two of them can reassign the balance inside that address as often as they like by swapping signed transactions they never broadcast. Each new balance invalidates the previous one, so the only thing the blockchain ever sees is the opening and, eventually, the closing.
Paying someone you have no channel with works by chaining those updates. If you have a channel with a merchant's payment provider and the provider has one with the merchant, your payment hops across both. Every hop is locked to the same secret using a hash time locked contract, so either the whole route settles or every hop expires and unwinds. Nobody in the middle can pocket the money, and thanks to onion routing each hop learns only the peer before it and the peer after it.
Two design details explain most of Lightning's behavior. Balances are tracked in millisatoshis, thousandths of a satoshi, which is why a wallet can charge you a fraction of a satoshi for a hop. And a channel can hold at most 483 pending payments per side at once, a limit that comes from how large the enforcing on-chain transaction is allowed to get.
Lightning only became safe to build after SegWit activated at block 481,824 in August 2017. Before that fix, a third party could alter a funding transaction's identifier in transit, which would silently break the refund transaction each peer had already signed against it. The protocol itself is specified in a set of documents called the BOLTs; BOLT12, which defines reusable offers rather than single-use invoices, was merged into the specification in September 2024, the first new BOLT added since 2017.
Why this matters when you buy bitcoin
Lightning changes the economics of getting small amounts of bitcoin off an exchange and into your own hands.
An on-chain withdrawal costs whatever the network is charging that day plus whatever the exchange marks it up to. A Lightning withdrawal costs a routing fee that is usually a rounding error. Strike, which we review, supports withdrawals to your own wallet over both Lightning and on-chain, which is the pattern to look for if you are stacking 20 or 50 dollars at a time rather than 5,000. If an exchange only offers on-chain withdrawals, small frequent buys quietly lose several percent to fees, and the honest fix is to accumulate and withdraw less often.
Lightning is also the layer that makes bitcoin behave like spending money rather than an investment, which is why El Salvador built its state wallet on it after the Bitcoin Law took effect on September 7, 2021. Our country guides cover where that kind of everyday use is normal and where it is legally awkward. Lightning does not change any of that: the network has no idea which country you are in, but your exchange does.
The custody trade is the part people get wrong. A Lightning wallet has to keep its keys online to sign channel updates, so it is a hot wallet by definition. That is fine for spending money and wrong for savings. Keep a spending balance on Lightning and hold the rest in cold storage. And read the fine print on "Lightning support" from an app: if the app holds the channel and the keys, your balance is a claim on that company, not bitcoin you control.
Paying a 3,000 satoshi tip, two ways
A small payment shows the gap better than any throughput claim.
On chain, a one input, one output native SegWit spend is roughly 110 virtual bytes. At a fee rate of 20 sat/vB that is a 2,200 satoshi fee to move 3,000 satoshis, so the fee eats close to three quarters of the payment, and it still waits for a block that averages ten minutes away.
Over Lightning the same 3,000 satoshis takes a route of, say, three hops. A hop charging a 1 satoshi base fee plus 200 parts per million costs 1 satoshi plus 0.6 of a satoshi on this amount, so the whole route lands under 5 satoshis and settles before you put the phone down. The catch is that the payment only works if a route with enough balance exists in the right direction, which is what people mean when they complain about liquidity.
Lightning Network vs payment channel
The Lightning Network is the whole graph; a payment channel is a single edge in it. One channel connects exactly two peers and can only move value between them. Lightning is the routing layer, the gossip protocol, and the shared specification that turn thousands of separate two-party channels into something you can pay a stranger through. You can run a payment channel with a friend and never touch the network; you cannot use the network without at least one channel.
Lightning Network vs sidechain
A Lightning channel keeps your coins under a contract you can enforce alone; a sidechain hands them to someone else's consensus. On Lightning, if your peer disappears you broadcast your latest balance yourself and the chain pays you after a delay. On a sidechain such as Liquid, coins are locked into a federation's multisig and coming back requires that federation to sign. Both are called layer two, both reduce mainchain load, and only one of them lets you exit without anyone's cooperation.