Lightning Network & Bitcoin Nodes

0 of 9 lessons complete (0%)

Lightning Network Explained: How Bitcoin Scales With Fast Payments

The lightning network is a Layer 2 payment protocol built on top of Bitcoin that enables instant, low-fee transactions without waiting for on-chain confirmations. If you have followed Courses 1 through 3, you already understand how Bitcoin transactions work on the base layer. Now it is time to understand how Bitcoin scales beyond its on-chain limitations to handle millions of payments per second.

This protocol does not replace Bitcoin’s blockchain. Instead, it works alongside it — handling fast, small payments off-chain while relying on Bitcoin’s base layer for final settlement and security. Think of it like a bar tab: you open a tab, order drinks all night, and settle once at the end instead of running your credit card for every single drink.

What Is the Lightning Network?

The lightning network is a decentralized system of payment channels that sits on top of Bitcoin’s blockchain. First proposed by Joseph Poon and Thaddeus Dryja in a 2016 white paper, it solves Bitcoin’s throughput bottleneck by moving the majority of transactions off-chain while preserving the trustless, permissionless nature of Bitcoin itself.

At its core, the lightning network uses a clever combination of cryptographic techniques:

  • Multi-signature addresses — Two parties lock funds in a shared Bitcoin address that requires both signatures to spend
  • Commitment transactions — Pre-signed transactions that represent the current balance between two parties, ready to be broadcast if needed
  • Hash Time-Locked Contracts (HTLCs) — Conditional payments that enable routing across multiple hops without trusting intermediaries
  • Revocation keys — A penalty mechanism that prevents cheating by making old channel states unprofitable to broadcast

The result is a network where two parties can transact thousands of times between themselves, and only two on-chain transactions are ever needed: one to open the channel and one to close it.

Why Bitcoin Needs the Lightning Network

Bitcoin’s base layer processes approximately 7 transactions per second. This is not a bug — it is a deliberate design tradeoff. Bitcoin prioritizes decentralization and security over raw throughput. Every full node must validate every transaction, and blocks are limited to roughly 4 MB of data every 10 minutes on average.

To put this in perspective:

Network Transactions Per Second
Bitcoin (on-chain) ~7
Visa ~1,700 (avg), ~65,000 (peak)
Lightning Network Millions (theoretical)

If Bitcoin aims to serve as a global payment system, 7 transactions per second is clearly insufficient for everyday purchases. During periods of high demand, on-chain fees spike and confirmation times stretch from minutes to hours. In December 2017, average transaction fees exceeded $50.

The lightning network explained in simple architectural terms looks like this: Bitcoin’s blockchain becomes a settlement layer — handling large, high-value transfers and final settlement of lightning channels. The lightning network becomes the payment layer — handling everyday transactions like buying coffee, tipping content creators, or paying for a subscription.

This two-layer architecture mirrors traditional finance. Visa and Mastercard handle millions of daily card swipes, but those transactions settle in batches through interbank systems like ACH or SWIFT. The lightning network gives Bitcoin the same structural advantage without introducing centralized intermediaries.

How the Lightning Network Works

Understanding the lightning network requires grasping four key operations: opening a channel, transacting off-chain, updating balances, and closing a channel. Each one builds on the previous.

Payment Channels

A payment channel is a private, off-chain connection between two parties. Both parties lock bitcoin into a 2-of-2 multisignature address on the Bitcoin blockchain. This locked bitcoin is the channel capacity — the maximum amount that can flow through the channel at any time.

Once the channel is open, the two parties can send bitcoin back and forth between themselves an unlimited number of times. None of these off-chain transactions touch the blockchain. They are simply signed agreements between the two parties about how the locked funds should be divided.

For example, Alice and Bob open a channel with 0.1 BTC total capacity. Alice funded it, so the initial state is:

  • Alice’s balance: 0.1 BTC
  • Bob’s balance: 0 BTC

After Alice pays Bob 0.02 BTC:

  • Alice’s balance: 0.08 BTC
  • Bob’s balance: 0.02 BTC

This balance update happened instantly and cost essentially nothing. No miner processed it. No block confirmation was needed.

Opening a Channel

Opening a lightning channel requires a single on-chain Bitcoin transaction. This funding transaction sends bitcoin to a 2-of-2 multisignature address controlled by both parties. The transaction specifies the channel’s total capacity.

Before broadcasting the funding transaction, both parties first exchange keys and create the initial commitment transactions. This ensures that neither party can hold the other’s funds hostage — if the channel partner disappears, you can always recover your funds by broadcasting your latest commitment transaction.

The funding transaction needs to be confirmed on the blockchain (typically 3 confirmations are required) before the channel is considered open and ready for use. This is the one moment where you must wait for on-chain confirmation.

Off-Chain Transactions

Once the channel is open, every payment between the two parties updates the channel state. Both parties sign a new commitment transaction that reflects the updated balances. The old commitment transaction is invalidated through a revocation mechanism.

Here is how the revocation system works:

  1. Alice wants to pay Bob 0.01 BTC
  2. Both parties create and sign new commitment transactions reflecting the updated balance
  3. Alice gives Bob a revocation key for her previous commitment transaction
  4. Bob gives Alice a revocation key for his previous commitment transaction
  5. If Alice later tries to broadcast the old, more favorable commitment transaction, Bob can use the revocation key to claim all the funds as a penalty

This penalty mechanism is what makes the lightning network trustless. Cheating is economically irrational because you risk losing everything in the channel. You do not need to trust your channel partner — game theory and cryptography handle enforcement.

Off-chain transactions are nearly instant (milliseconds) and effectively free. This is what makes the lightning network suitable for micropayments — you can send 1 satoshi (0.00000001 BTC) if you want.

Closing a Channel

There are two ways to close a lightning channel:

Cooperative close: Both parties agree to close the channel. They create a final closing transaction that distributes the funds according to the latest agreed-upon balance. This is the preferred method — it is fast, cheap, and requires only one on-chain transaction.

Force close: One party broadcasts their latest commitment transaction unilaterally. This happens when the other party is unresponsive or uncooperative. Force closes are more expensive (higher on-chain fees) and include a time delay — the party who initiated the force close must wait a specified number of blocks before accessing their funds. This delay gives the other party time to dispute the transaction with a revocation key if an old state was broadcast.

In either case, the final balances are settled on-chain. The channel’s bitcoin returns to regular, single-owner Bitcoin addresses.

Routing Payments Across the Lightning Network

The real power of the lightning network becomes apparent when you realize you do not need a direct channel with everyone you want to pay. Payments can be routed through a series of intermediate nodes, hopping from channel to channel until they reach the destination.

Suppose Alice wants to pay Dave, but Alice only has a channel with Bob, Bob has a channel with Carol, and Carol has a channel with Dave. The payment can route: Alice → Bob → Carol → Dave. Each hop takes milliseconds, and the entire multi-hop payment completes in under a second.

This works securely through Hash Time-Locked Contracts (HTLCs):

  1. Dave generates a random secret (preimage) and sends its hash to Alice in an invoice
  2. Alice creates an HTLC with Bob: “I will pay you X sats if you can provide the preimage for this hash within 60 blocks”
  3. Bob creates a similar HTLC with Carol (with a slightly shorter time lock)
  4. Carol creates a similar HTLC with Dave (with an even shorter time lock)
  5. Dave reveals the preimage to Carol to claim his payment
  6. Carol uses the preimage to claim from Bob
  7. Bob uses the preimage to claim from Alice

The payment is atomic: either all hops succeed, or none do. No intermediate node can steal funds because they cannot claim the incoming payment without forwarding the outgoing one (the same preimage unlocks both).

For privacy, the lightning network uses onion routing (similar in concept to Tor). Each routing node only knows the previous hop and the next hop. Bob knows Alice sent him something and that he needs to forward to Carol, but he does not know that the final recipient is Dave. This layered encryption prevents intermediate nodes from learning the full payment path.

Lightning Network Fees

Routing nodes charge small fees for forwarding payments. These fees incentivize node operators to provide liquidity and keep their nodes online. The fee structure has two components:

  • Base fee: A flat fee per forwarded payment (typically 0–1 satoshi)
  • Fee rate: A proportional fee based on the payment amount (typically 1–100 parts per million)

In practice, routing a typical lightning payment costs less than 1 satoshi in total fees — a fraction of a cent. Even larger payments (hundreds of dollars) rarely exceed a few cents in routing fees. Compare this to on-chain Bitcoin fees that can range from $0.50 to $50+ depending on network congestion, or credit card processing fees of 2–3%.

For a comprehensive breakdown of how fees work across different scenarios and how to minimize them, read our complete guide to lightning network fees.

Lightning Network Capacity and Growth

The lightning network has grown substantially since its mainnet launch in 2018. As of early 2025:

  • Public channels: ~55,000+
  • Public nodes: ~15,000+
  • Total public capacity: ~5,000+ BTC (~$500M+ at current prices)
  • Private channels: Unknown, but estimated to represent a significant portion of total activity

These numbers only reflect the public network. Many channels are private (not announced to the network’s gossip protocol), so the actual usage is considerably higher than what public statistics show.

Key growth milestones:

  • 2018: Mainnet launch with a handful of nodes and channels
  • 2019: First wave of wallets (Eclair Mobile, Zap) made lightning accessible to regular users
  • 2021: El Salvador adopted Bitcoin as legal tender with the Chivo wallet using lightning for payments
  • 2022–2023: Non-custodial wallets like Phoenix and Breez dramatically simplified the user experience
  • 2024–2025: Splicing, BOLT12, and improved channel management reduced friction further

The network’s growth is driven by real use cases: cross-border remittances, point-of-sale payments, social media tipping on platforms like Nostr, and micropayments for digital content. You will explore these use cases hands-on in Lesson 4.4.

Lightning Network Limitations

The lightning network is powerful, but it has tradeoffs that every Bitcoin user should understand:

  • Liquidity constraints: You can only receive payments up to your inbound channel capacity. This concept confuses many newcomers and is covered in detail in Lesson 4.2.
  • Online requirement: Your node (or wallet) must be online to receive payments. Unlike on-chain Bitcoin, where funds arrive regardless of whether your wallet is open.
  • Channel management: Maintaining balanced channels requires attention and sometimes costs. Our channel management masterclass covers strategies for this.
  • Not ideal for large payments: The lightning network works best for smaller transactions. Very large payments may struggle to find a route with sufficient liquidity.
  • Complexity: Despite major UX improvements, lightning is still more complex than on-chain Bitcoin for end users.

These are active areas of development. Improvements like splicing (resize channels without closing), better pathfinding algorithms, and channel factories aim to address many of these limitations over time.

Key Takeaways

  • The lightning network is a Layer 2 protocol that enables instant, low-fee Bitcoin payments through off-chain payment channels
  • Payment channels use 2-of-2 multisig addresses and commitment transactions to allow unlimited off-chain transfers between two parties
  • HTLCs and onion routing enable secure, private multi-hop payments across the network without trusting intermediaries
  • Fees are minimal — typically less than 1 satoshi for small payments — compared to on-chain fees that fluctuate with network demand
  • The network has grown to thousands of nodes and billions of satoshis in capacity since its 2018 mainnet launch
  • A revocation-based penalty system makes cheating economically irrational, keeping the network trustless
  • Channels can be closed cooperatively (cheap, fast) or via force close (more expensive, time-delayed)

Frequently Asked Questions

Is the lightning network safe?

Yes. The lightning network inherits Bitcoin’s security model for the funds locked in channels. Commitment transactions and revocation keys ensure that neither party can steal funds. The main risk is from force closes during high-fee periods, where on-chain fees may consume a portion of small channel balances. Using reputable, well-tested lightning wallets further reduces operational risks.

How much does it cost to use the lightning network?

Routing fees are typically less than 1 satoshi for payments under a few dollars. You will pay on-chain fees twice — once to open a channel and once to close it. Modern wallets like Phoenix handle channel management automatically, charging a 1% fee on inbound liquidity. For most users, lightning is dramatically cheaper than on-chain transactions or traditional payment processors.

Do I need to run a node to use the lightning network?

No. Wallets like Phoenix, Breez, and Zeus run lightweight lightning nodes on your phone. However, running your own full node gives you maximum sovereignty and the ability to earn routing fees. Lesson 4.5 covers the benefits of running your own node in detail.

Can the lightning network handle large payments?

The lightning network is optimized for small to medium payments. Large payments (several hundred dollars or more) may face routing challenges due to liquidity constraints along the path. Multi-path payments (MPP) help by splitting a large payment across multiple routes. For very large transfers, on-chain Bitcoin remains the better option.

What happens if my channel partner goes offline?

You can force-close the channel by broadcasting your latest commitment transaction. Your funds will be returned to you on-chain after a time delay (typically 144 blocks, or about 1 day). This is why the lightning network is trustless — you never depend on your channel partner’s cooperation to recover your funds.

Search on Knowing Bitcoin