← back to the blog

Bitcoin Explained · December 16, 2024

By Adam Whistler

What Is the Lightning Network, and How Does It Work?

What is the lightning network

Bitcoin's base layer confirms a new block roughly every 10 minutes and can handle only a limited number of transactions per block. That's fine for settling large or infrequent payments, but it's not built for buying a coffee. The Lightning Network is the system built to solve that specific problem.

The core idea: take most transactions off-chain

Instead of recording every single payment on Bitcoin's blockchain, Lightning lets two parties open a private payment channel, backed by real Bitcoin locked into a special on-chain transaction, and then send funds back and forth between themselves off-chain, instantly and as many times as they want, without touching the blockchain again until they decide to close the channel.

How a payment channel actually works

Opening a channel requires one on-chain transaction that locks up funds under both parties' shared control. From there, each payment between them is simply an updated, mutually signed record of how that locked balance should be split, held privately between the two parties rather than broadcast to the network. Only two on-chain transactions ever have to happen: one to open the channel, one to close it (settling the final balance), no matter how many payments passed between them in the meantime.

Sending payments beyond just one channel

You don't need a direct channel with everyone you want to pay. Lightning routes payments across a network of interconnected channels, finding a path from sender to receiver through other participants' existing channels, similar in spirit to how the internet routes data packets through intermediate hops rather than requiring a direct cable between every two computers.

What this actually buys you

The tradeoffs

Funds in a channel need enough liquidity on both sides to route a given payment, which isn't always guaranteed for larger amounts. Channels need to stay reasonably online to be used reliably. And Lightning is explicitly a layer built on top of Bitcoin's base security, not a replacement for it: the underlying on-chain funds locked into a channel are still secured by exactly the same private key cryptography as any other Bitcoin holding. It's a different approach to speed than networks like Solana take, which chase throughput directly on the base layer instead of routing around it.

Every Bitcoin private key that will ever exist is generated right here on this site, Satoshi's included. Try for a million years. You still won't find a funded one.

Try the key collider now

Bottom line

Lightning moves the vast majority of everyday transactions off Bitcoin's base chain into fast, cheap, private payment channels, settling back to the blockchain only when a channel opens or closes. For how a standard on-chain transaction works underneath all of this, see what happens when you send Bitcoin.