The Lightning Network Explained
Bitcoin is excellent money. It is scarce and capped at 21 million coins, hard to censor, and secured by the most powerful computer network on the planet. What it is not, by design, is fast and cheap enough to buy a coffee a hundred times a day. The Lightning Network is the answer to that problem. It is a second layer that sits on top of Bitcoin and turns it into something you can actually spend in everyday life, while keeping the security of the base layer underneath.
This article explains why Lightning had to be invented, how it works under the hood, what it is genuinely good at today, and the real trade-offs it still carries.
Why one layer cannot do everything
Bitcoin's base layer is a worldwide ledger. Every transaction has to be checked by every full participant and then stored forever. That is exactly what makes it so trustworthy, and it is also why it can never be fast. The network is built so that a new block appears only about every 10 minutes, and each block can only hold a limited amount of data. When more people want to transact than there is room in the next block, a queue forms in the mempool, and the miners who secure the network prioritise the transactions that pay the highest fees.
The result is a fee market. When demand is high, the cost of getting a transaction confirmed in a reasonable time rises sharply, and a transaction that pays little can wait hours or even longer. You can see the full mechanics of this in our articles on how the mempool works and how Bitcoin transactions are verified.
So why not simply make blocks bigger or speed them up? Because that breaks something more important. The bigger each block becomes, the more bandwidth, processing power, and storage every full node needs. Push block sizes high enough to rival a card network that handles tens of thousands of payments per second, and a single node would need to store something like a terabyte of new data every day. Only large companies could afford to run one. The network would quietly centralise, and a centralised Bitcoin is no longer censorship resistant. Scaling the base layer this way would trade away the very property that makes Bitcoin worth using.
The blockchain trilemma
This tension has a name. A distributed ledger can be highly decentralised, highly secure, and highly scalable, but in practice it can only maximise two of the three at once. Pick decentralisation and security, as Bitcoin does, and raw on-chain throughput stays low on purpose. Many other networks chase scalability instead, and pay for it with weaker decentralisation, which over time tends to weaken security too. A network that a single organisation can effectively control is exposed to censorship and pressure, which is the opposite of what Bitcoin set out to achieve.
Lightning does not solve the trilemma. It sidesteps it. Bitcoin's base layer stays decentralised and secure, and a second network on top is tuned for scalability and speed. Because that second network always settles back onto Bitcoin, it inherits Bitcoin's security without forcing the base layer to compromise.
The Blockchain Trilemma
A base-layer blockchain can fully achieve at most two of these three properties at once. Pick any two and the third must give way.
Rewriting history or creating coins out of thin air is computationally impossible.
No single party controls the network; anyone can verify every rule independently.
Handling high transaction volume quickly and cheaply, regardless of network demand.
Bitcoin keeps decentralization and security, so raw on-chain throughput stays low on purpose.
Building money in layers, like the internet
This layered idea is not new, and it is not unique to Bitcoin. The internet was built the same way. First came a basic way to move packets of data between machines. On top of that came reliable connections. On top of that came the web, and only then, much later, came video calls and high definition streaming. Nobody tried to bolt streaming directly onto the raw packet layer. Each layer assumes the one below it and adds new capability.
This was not an afterthought for Bitcoin either. As early as 2010, Hal Finney, one of Bitcoin's earliest contributors, argued that Bitcoin itself could not realistically record every financial transaction in the world, and that a lighter and more efficient second layer of payment systems would be needed. Lightning is one realisation of that idea. And just as the internet kept stacking layers, more layers and applications can be built on top of Lightning in turn.
Money in Layers
The internet was built one layer at a time over decades. Bitcoin follows the same idea: each layer adds capability without changing what lies beneath.
Broadband made real-time continuous media possible, finally giving the underlying layers a high-demand use case.
Tim Berners-Lee needed a way to link documents across different computers at CERN — the internet existed, but had no shared document layer.
Early networks dropped and reordered packets. TCP was created to guarantee ordered, error-free delivery on top of IP.
The original need: route data between entirely separate networks with no central coordinator. Everything else came later.
Hover the Internet layers to see why each one had to be built. The base layers are the most foundational and have not changed since.
What a payment channel is
The core building block of Lightning is the payment channel. Two people open a channel by jointly creating one Bitcoin transaction that locks some bitcoin into a shared 2-of-2 multisignature address. Locking that bitcoin on the base layer opens a channel on Lightning with a capacity equal to the amount locked. From then on, the two parties can pay each other inside that channel as many times as they want, and only the opening and the closing ever touch the blockchain.
A useful picture is a tab at your favourite cafe. Instead of paying for every single coffee and counting out change each time, you open a tab when you arrive. The staff note each order on it. Only when you leave do you settle the whole tab with one payment. The tab itself is the channel. The base layer is just the final settlement at the end. Everything in between happens instantly and for free.
How a Payment Channel Works
One on-chain transaction opens a channel. Everything inside settles instantly at no cost. Only the close writes to the blockchain again.
Mara
2.50BTC
Theo
2.50BTC
On-chain
1
transaction
Off-chain
0
payments
No payment here touches the blockchain.
How a Lightning payment works
Inside the channel, no individual payment is written down on the blockchain. What changes is only the split of the locked funds between the two sides.
Say Mara and Theo each lock 2.5 BTC into a channel, so the channel holds 5 BTC, balanced 2.5 to 2.5. If Mara pays Theo 0.5 BTC, they simply sign a new statement that says the balance is now 2.0 for Mara and 3.0 for Theo. If Theo later pays 2 BTC back, they sign another statement saying 4.0 for Mara and 1.0 for Theo. Each payment is just a fresh, signed snapshot of who owns what. These updates happen in milliseconds, cost nothing, and never leave the channel. Only when the two decide to close the channel does the final split get recorded on Bitcoin.
Why nobody can cheat
If every payment is just a signed snapshot, what stops someone from closing the channel using an old, more favourable snapshot? This is the clever part.
Every time the balance updates, both parties sign the new state, and the old state becomes revocable. If Theo tried to close the channel using a stale snapshot where he held more bitcoin than he is actually owed, Mara can respond with a penalty transaction, sometimes called a justice transaction. It sweeps the entire channel balance to her. Cheating does not just fail, it costs the cheater everything. Because honest behaviour is always the safe choice, the system stays secure without anyone needing to trust the other side.
There is a catch worth naming honestly. To catch a cheating attempt, you need to notice it within a time window, which means being online. If you cannot stay online, you can delegate this watching to a watchtower, a service that monitors your channels for fraudulent closes on your behalf and triggers the penalty if needed.
Routing payments across many hops
You clearly cannot open a direct channel with every person and shop you will ever pay. Opening a channel costs an on-chain transaction, so paying a few Euro or Dollar for a channel just to buy one coffee would make no sense. Lightning solves this with routing.
If Mara has a channel with Theo, and Theo has a channel with Priya, and Priya has a channel with Sam, then Mara can pay Sam even though they share no channel. The payment is forwarded hop by hop along the path. Each forwarding node usually takes a tiny fee, typically a fraction of a cent in Euro or Dollar terms. The more participants and channels exist, the more possible routes there are, and the more powerful the network becomes.
Two properties make routing safe. First, it is private in the middle: the nodes along the route generally cannot tell who originally sent the payment or where it finally lands, because the routing information is layered like an onion. Second, it is trustless. A middle node cannot simply steal a payment passing through it. This is enforced by Hash Time Locked Contracts, or HTLCs. In plain terms, a payment is locked to a secret, and a node can only claim its incoming payment by revealing the matching secret, which in turn lets the previous node claim theirs. A time limit ensures that if the chain of confirmations is not completed, every hop is safely refunded. The whole payment either reaches its destination or it is cancelled. If you want the underlying idea behind that secret, see our article on what a hash is.
Routing a Payment Across the Network
Multiple paths exist between any two nodes. The sender finds a route and the payment travels hop by hop, just as IP packets do on the internet.
Intermediate nodes cannot tell who sent the payment or who receives it. Routing is layered like an onion: each hop only knows its two immediate neighbours.
The payment either completes in full or is cancelled entirely, never left half-sent. This is the same guarantee IP routing gives packets on the internet: find a path or fail cleanly.
Opening and closing a channel
A channel is bookended by two on-chain transactions, with potentially thousands of free off-chain payments in between. There are three ways a channel can be closed:
- Cooperatively: both parties agree to close, and the final balance is settled on-chain almost immediately. This is the cheapest and cleanest outcome.
- Unilaterally: either party can close on their own without the other's consent. To allow time to catch any fraud, the closing party's funds are held behind a short time lock before they become spendable.
- As a last resort against fraud: if one side tries to close with an old state, the other side uses the penalty transaction described earlier to claim the whole balance.
Modern Lightning also supports splicing, which lets you add or remove funds from a channel without fully closing and reopening it. That makes channels far more flexible than they were in Lightning's early years.
Opening and Closing a Channel
A channel is bookended by two on-chain transactions with potentially thousands of free payments in between. Tap each stage to learn more.
One funding transaction locks bitcoin into a 2-of-2 multisignature address. This is the only on-chain activity until close.
Both parties sign the funding transaction. The channel capacity equals the amount locked. Once confirmed, payments can begin.
Both parties exchange signed balance updates as often as they like. Each update invalidates the previous one. Nothing touches the blockchain.
Every payment is a new signed snapshot of the shared balance. Old snapshots are revocable, so cheating is economically punished rather than just detected.
Both parties agree on the final split and settle in a single transaction. Funds are spendable immediately.
The cheapest and fastest way to close. Both parties co-sign a closing transaction that reflects the latest agreed balance.
Either party can close alone, but their funds are held behind a time lock. If one side tries to cheat, the other can claim the full balance.
The time lock gives the honest party a window to publish a penalty transaction if they spot an outdated state being broadcast.
Modern Lightning also supports splicing: adding or removing funds without fully closing and reopening a channel.
When to use Lightning and when to stay on-chain
Lightning and the base layer are not competitors. They are two tools for two jobs. Small, frequent, instant payments belong on Lightning. Large, final, high-value transfers, and the act of moving savings into your own custody, belong on-chain, where settlement is most robust. A healthy mental model is that the base layer is where value ultimately settles, and Lightning is where value moves around quickly day to day.
On-chain vs. Lightning: When to Use Which
| Property | On-chainbase layer | Lightning |
|---|---|---|
Settlement | Recorded on the blockchain forever, visible to anyone running a full node. | Off-chain, settled directly between channel partners. Only opening and closing touch the chain. |
Speed | About 10 minutes per block, longer when waiting for deeper confirmation. | Seconds, effectively instant. |
Typical fee | Varies with block demand, can rise sharply when the mempool is congested. | A fraction of a cent in Euro or Dollar terms, regardless of the amount sent. |
Best for | Large, final transfers and moving bitcoin into self-custody. | Small, frequent, everyday payments. |
Privacy | Pseudonymous, but every transaction is permanently public on the ledger. | More private by default, but not fully anonymous. Channel openings are still on-chain. |
Always online | Not required. | Required to defend channels, or delegated to a watchtower or wallet service. |
On-chain
Lightning
On-chain
Lightning
On-chain
Lightning
On-chain
Lightning
On-chain
Lightning
On-chain
Lightning
What Lightning makes possible
Because Lightning can move tiny amounts instantly and almost for free, it unlocks uses that were never practical on the base layer. It makes Bitcoin a credible everyday payment method for small purchases. It enables genuine micropayments, down to amounts far smaller than would ever make sense on-chain. It makes cross-border payments fast and cheap, which is meaningful in places where moving money is slow or expensive.
It also enables ideas that simply did not exist before. Money can be streamed by the second, so a listener could pay a creator continuously while consuming content, rather than through a single platform that takes a large cut. Machines and software, including automated agents, can pay each other directly for tiny units of work. Logins and paywalls can be built on a Lightning identity instead of yet another email and password. These are categories of possibility, not endorsements of any particular product.
The honest trade-offs
Lightning is powerful, but it is not finished, and pretending otherwise would not serve anyone.
Liquidity. To receive payments, your channels need inbound capacity, and to send them, outbound capacity. Setting this up is still one of the least intuitive parts of using Lightning directly.
The online requirement. As covered above, defending your own channels means being reachable, or trusting a watchtower to do it for you.
Routing reliability for large amounts. A single route may not have enough liquidity for a large payment. Splitting a payment across several routes helps, but routing large sums is still less reliable than routing small ones.
Custodial versus non-custodial. The easiest Lightning wallets are often custodial, meaning a third party holds your keys and your bitcoin. That is convenient, but it is not self-custody, and it reintroduces exactly the kind of trusted intermediary Bitcoin exists to remove. CanoeBit's view is consistent here: convenience is welcome, but holding your own keys is the point. Treat custodial Lightning as a starting ramp, not a destination.
Privacy is better, not perfect. Lightning hides far more than the base layer does, but channel openings and closings are visible on-chain, public channels advertise their capacity, and researchers have shown ways to probe balances. Ongoing upgrades keep improving this, but you should not assume total anonymity.
Energy. A point worth making plainly: Lightning payments happen off-chain and add essentially no extra energy use. They do not require more mining. Lightning simply rides on the security the base layer already produces, which is part of the wider energy debate around Bitcoin.
There are also known theoretical attacks, such as channel jamming, where an attacker ties up a victim's channels without completing payments. These remain active areas of research, with proposed mitigations in progress rather than fully solved.
Where Lightning is heading
Lightning has matured a great deal since its 2018 beta. Bitcoin's Taproot upgrade let channel opens look like ordinary transactions, improving privacy. Reusable payment requests now allow static, shareable payment codes and recurring payments. Splicing makes channels resizable without closing them. Human readable Lightning addresses, in a familiar name-at-domain format, have made sending a payment feel as simple as sending an email.
What still has to happen for true mass adoption is mostly about usability and liquidity. Sending and receiving needs to feel effortless for someone who has never heard the word "channel," liquidity needs to be easier to obtain, and self-custodial setups need to be as simple as the custodial ones. The encouraging part is how quickly this is moving. The honest part is that there is still real work to do.
The bottom line
The Lightning Network is Bitcoin's payment layer. It exists because a base layer that is decentralised and secure cannot also be a high-speed payment rail without sacrificing what makes it valuable. Rather than weaken Bitcoin, Lightning builds a faster layer on top of it, the same way the internet was built one capable layer at a time. It already works for everyday payments today, and it gets better every year. Used with your own keys, it lets you spend bitcoin quickly and cheaply without giving up the sovereignty that made Bitcoin worth holding in the first place.
Key Facts
The Lightning Network was first proposed in 2015, and its first usable mainnet beta arrived in March 2018.
→ See the full tableLightning is a second layer built on top of Bitcoin. Payments happen off-chain, while the base layer is used only to open and close channels.
A payment channel is a 2-of-2 multisignature address funded by one on-chain transaction. After that, the two parties can update their shared balance off-chain as often as they like.
Routing lets you pay someone you have no direct channel with, by forwarding the payment across a path of connected channels.
Typical Lightning fees are a fraction of a cent in Euro or Dollar terms, far below most on-chain fees.
Lightning payments clear in seconds, compared to roughly 10 minutes per block on Bitcoin's base layer.
Frequently Asked Questions
No. Lightning uses real bitcoin. The coins are locked on the Bitcoin base layer when a channel opens and are released back to it when the channel closes. Nothing ever leaves Bitcoin.
They are more private than base layer transactions in some ways, because they are not all written to a public ledger and routing nodes usually cannot tell who the real sender or receiver is. They are not fully anonymous, though. Channel openings and closings are visible on-chain, public channels reveal their capacity, and balances can sometimes be probed.
To send, receive, and defend your own channels, your node needs to be online. Many people rely on watchtowers or on wallet setups that handle connectivity for them, so they do not have to run a node around the clock.
No. The two work together. The base layer handles final settlement and large transfers, while Lightning handles small, fast, frequent payments.
Bitcoin's rules let the honest party publish a penalty transaction that sends the entire channel balance to them. Cheating is punished rather than rewarded, which is what keeps the system honest.
Sources
- 1.Joseph Poon, Thaddeus Dryja: The Bitcoin Lightning Network Paper
- 2.Andreas M. Antonopoulos, Olaoluwa Osuntokun, Rene Pickhardt: Mastering the Lightning Network
- 3.Lightning Network: BOLT Specifications
- 4.Bitcoin Optech: Lightning Network Topics
- 5.Bitcoin Visuals: Lightning Network Statistics
Not financial advice. CanoeBit publishes educational content only. Nothing here is a recommendation to buy, sell, or hold any asset.
Continue the How Bitcoin Works path
Step 11 of 11