Lightning Network: Fast Bitcoin Payments on a Second Layer

Lightning Network: Fast Bitcoin Payments on a Second Layer

The Lightning Network is a network of payment channels that runs on top of Bitcoin and is designed to update payments between two parties without a new block for each payment. That makes it a second layer: a network that uses the Bitcoin blockchain, the shared record of Bitcoin transactions, to settle its final balances, which means to record them. A payment channel is a balance that two parties share and update by signing messages.

Lightning and the Bitcoin Lightning Network are other names for the same network. Its rules are written in specifications known as BOLTs, short for Basis of Lightning Technology.

Why Is the Lightning Network Called a Bitcoin Layer 2?

The Lightning Network is called a Bitcoin layer 2, another name for a second layer, because it runs on top of Bitcoin and uses the blockchain for settlement. Opening and closing a channel are on-chain, which means each is recorded in a block, a batch of transactions that the blockchain holds. The payments in between are off-chain, which means they take place between the two parties without a new block.

An on-chain Bitcoin transaction is a transaction recorded in a block. Until a block includes it, the transaction is unconfirmed and waits in a mempool, the waiting area where a node holds unconfirmed transactions. A node is a computer on the Bitcoin network. The sender attaches a fee, and because each block can hold only so many transactions, an on-chain transaction can wait for a block.

What Is a Lightning Network Payment Channel?

A Lightning Network payment channel is a balance that two parties share and update by signing messages. The channel starts with a funding transaction, a Bitcoin transaction that locks an amount of BTC in one output.

An output is the part of a transaction that assigns an amount to a recipient under a spending condition. For a channel, the condition is a 2-of-2 multisignature, which means the output needs signatures for two keys, one for each party, before it can be spent. A signature is proof, made with a private key, that the key’s holder approved the spend. In plain terms, channel capacity is the amount of BTC locked in the funding output.

A commitment transaction is a transaction that spends the funding output and pays each party its balance, less fees. The two parties sign commitment transactions without publishing them, and each party holds a version that it can publish. Either party in a Lightning channel can publish the latest commitment transaction to close the channel on-chain.

Each new commitment transaction replaces the earlier one as the current balance, and only the latest one is meant to be published. An earlier commitment transaction is still a transaction that both parties signed, which is why publishing it counts as a breach.

How Does the Lightning Network Work When a Channel Opens, Updates, and Closes?

A Lightning channel moves through three steps: open, update, and close. Either party can start the channel closure.

  1. Open the channel. The two parties agree on terms, then make the funding transaction and broadcast it, which means sending it to the network. The channel is usually ready once the funding transaction has enough confirmations, a count of the blocks that have been added since it, starting with the block that includes it.
  2. Update the balances. Each payment changes the balances, and both parties sign new commitment transactions that record them. No Bitcoin transaction is needed for an update, because the signed transactions stay with the parties.
  3. Close the channel. The final balances are paid out in a Bitcoin transaction on-chain, which ends the channel.

A channel can close cooperatively or by force. In a cooperative close, the two parties agree on a closing transaction, sign it, and publish it, and it pays each party its final balance.

In a force close, one party publishes the latest commitment transaction without the other party’s agreement. The publisher’s own output then waits for a time lock, a rule that stops an output from being spent until a set number of blocks has passed.

How Does a Lightning Payment Cross Several Channels?

A Lightning payment crosses several channels along a route, a path of connected channels from the sender, who pays, to the receiver, who is paid. The sender picks the route from what the sender’s Lightning node has learned about the channels. A Lightning node is a computer or other device that takes part in the Lightning Network and holds channels, unlike a Bitcoin node, which takes part in the Bitcoin network.

Onion routing is a method in which the sender wraps the route in layers, so that a node that forwards a payment can read only its own layer. That layer holds the amount to forward and the deadline for it. The method is designed so that a forwarding node learns about the route only the node before it and the node after it. The specifications note that onion routing does not rule out traffic analysis, in which an observer tries to link payments by watching network traffic.

A channel can announce a forwarding fee, which is the fee a node charges to forward a payment. The forwarding fee is a base amount plus a share of the forwarded amount, and the sender sends the amount plus the fees.

Here is a made-up payment, with amounts that are not typical fees and not a recommendation. Party A pays party C 100,000 satoshis through party B, over a channel between A and B and a channel between B and C. A satoshi is one hundred millionth of a BTC. The specifications count some amounts in thousandths of a satoshi, called millisatoshis.

Party B charges 1 satoshi plus 100 parts per million of the amount it forwards, which means 100 satoshis for every 1 million satoshis, or 0.01%. The example ignores on-chain fees.

For 100,000 satoshis, the proportional part is 100,000 times 100, divided by 1 million, which is 10 satoshis. Adding the 1 satoshi base fee makes the fee 11 satoshis. Party A sends 100,011 satoshis to party B, and party B forwards 100,000 satoshis to party C. The 11 satoshis are the forwarding fee, which the sender pays on top of the amount. The table shows made-up balances, meaning how much each party holds on its own side of each channel, before and after the payment.

Channel sideBalance before (satoshis, made up)Balance after (satoshis, made up)
Party A, in channel A-B500,000399,989
Party B, in channel A-B200,000300,011
Party B, in channel B-C400,000300,000
Party C, in channel B-C100,000200,000

The payment from party A to party C changes the balances in two channels and adds no transaction to the blockchain for the payment itself. Party B has a side in each of the two channels, so its two balances together change from 600,000 satoshis (200,000 plus 400,000) to 600,011 satoshis (300,011 plus 300,000), and the difference is the 11-satoshi fee. The example only shows how a fee is calculated. It says nothing about what any real node receives, what it costs to run one, or whether forwarding pays.

A hash time-locked contract (HTLC) links the payments on a route by tying each channel’s payment to the same secret. Each channel on the route is designed to hold an HTLC that uses the same payment hash, which the receiver’s invoice supplies.

A Lightning payment usually starts with an invoice, which is the receiver’s request for payment. The invoice usually carries an amount and a payment hash. A hash is a fixed-length fingerprint calculated from data, and the payment hash is the hash of a secret that only the receiver knows at first. Showing the secret behind the payment hash is designed to prove that the payment arrived.

An HTLC is a conditional payment. It is designed to pay the receiver if the receiver shows the secret behind the payment hash before a deadline, and otherwise to return the amount to the sender.

A node on the route that learns the secret can use it to claim the HTLC in the channel before it, and so on back along the route toward the sender. The HTLC deadlines on a route are designed to be later in the channels closer to the sender, so that a node that learns the secret from the next channel still has time to claim from the channel before it.

How Is a Lightning Channel Designed to Discourage Cheating?

A Lightning channel is designed to discourage cheating, not to make it impossible: a party that publishes an old balance can lose its funds to the other party.

A party could try to publish an old balance that favors it, because an old commitment transaction is still a transaction that both parties signed. To discourage that, each party gives the other a secret that revokes the old balance each time the parties move to a new one. With that secret, the other party holds a revocation key that can take the funds in the old balance’s outputs.

If a party publishes a revoked balance, the other party can use the revocation key in a penalty transaction, a transaction that claims the funds in the revoked balance’s outputs. The publisher’s own output is held back by a time lock set when the channel opened, which gives the other party a window to respond.

After a party publishes a revoked balance, the other party has to watch the blockchain during the window to respond. The other party can also ask a third party that watches the chain on a party’s behalf, sometimes called a watchtower, to do it. A response after the window may not recover the funds.

What Does a Lightning Channel Cost, and What Does It Need?

Opening a Lightning channel and closing it are Bitcoin transactions, so each pays an on-chain fee. BTC locked in a Lightning channel stays locked until the channel is closed or changed in a way the specifications allow.

In plain terms, liquidity is how much of a channel’s balance is available to send or to receive. Outbound liquidity is the part of a party’s balance that the party can send, after any minimum balance the channel requires that party to keep. That minimum is called the channel reserve. Inbound liquidity is the part of the balance on the other side, which the party can receive.

How Does a Lightning Payment Differ from an On-Chain Bitcoin Transaction?

A Lightning payment differs from an on-chain Bitcoin transaction in where it is recorded, what confirms it, what it needs, and what limits it.

AspectOn-chain Bitcoin transactionPayment over a Lightning channel
Where the payment is recordedIn a block on the public blockchainIn updated balances that the two channel parties hold; only the channel’s opening and closing are on the blockchain
What confirms itA block that includes it; each later block adds one confirmationThe parties sign the new balances and revoke the old ones, and the receiver shows the secret behind the payment hash
What the payment needsUnspent outputs the sender can sign for, and a fee that Bitcoin nodes acceptAn open channel, or a route of open channels
Main limitBlock space is limited, so a transaction can waitA payment is limited to the balance on the sending side of a channel

What Are the Limits of the Lightning Network?

A Lightning payment can fail when no route has enough balance on each channel along the way. A force close also makes the closing party wait for a time lock before it can spend its own balance.

Being offline can mean missing the window to respond when the other party publishes an old balance. Lost or outdated channel data can lead a party to publish an old balance itself, which exposes that party’s funds to a penalty transaction. Closing a channel also costs an on-chain fee.

What Does the Lightning Network Not Mean?

The Lightning Network is not a separate cryptocurrency or a separate blockchain, and its channel balances are amounts of BTC backed by a Bitcoin output. A description of the Lightning Network protocol is not a description of any wallet, service, or company that uses it, or of any other network.

Describing Lightning Network payments as fast refers to a design aim, payments updated between the parties without a new block for each payment, and not to a measured result. The Lightning Network carries no promise of speed or low cost.

As of October 2026, the Lightning Network specifications describe a channel’s life cycle as open, update, and close. Software written by different teams can differ from that flow, and some channel types and optional features work differently.

November 18, 2026

GoMining News

You might be interested in: