Bitcoin Lightning Network Explained

Table of Contents

    The Bitcoin Lightning Network lets people make bitcoin payments through a network of payment channels, with ordinary payments updating balances off-chain. For someone paying a merchant or receiving many small payments, the attraction is speed and potentially low routing fees. The practical questions are whether a payment has a usable route, who controls the funds, and what it costs to enter, maintain and exit the channels.

    This guide follows a payment from funding through routing and closing. Its numerical examples are hypothetical, denominated in satoshis, and based on the standard revocation-based channel design. Actual wallet features, fee policies and recovery procedures depend on the implementation.

    What Is the Bitcoin Lightning Network?

    Lightning is a payment protocol built on Bitcoin. A payment channel is an arrangement between two nodes that commits bitcoin on-chain while allowing the nodes to change its allocation through signed messages. Connected channels allow a payment to reach someone with whom the sender has no direct channel. Lightning uses bitcoin; it has no separate native Lightning coin. [1]

    Ownership, Direction and Exit

    Three facts determine what a channel can do: each participant’s current allocation, how much can move in the required direction, and the conditions for enforcing that allocation on Bitcoin. A large channel does not automatically support a large payment in both directions.

    A satoshi, or sat, is 0.00000001 BTC; one bitcoin contains 100 million sats. Lightning accounting can use millisatoshis, with 1,000 millisatoshis equal to one sat. Final Bitcoin transaction outputs use whole satoshis. [2] [3]

    The foundation is the same transaction and spending-condition system explained in how Bitcoin transactions work. Lightning adds a protocol for updating enforceable agreements without broadcasting each payment to every Bitcoin node.

    How a Lightning Payment Channel Works

    1. Fund a channel and secure an exit

    In the standard channel construction described by the published Lightning specifications, called BOLTs, the funding transaction creates an output requiring signatures from both participants. Before committing funds, the participants exchange the signatures needed for their initial commitment transactions: alternative transactions spending the funding output according to the agreed allocation. Each participant retains a version it can complete and publish to exit without obtaining fresh cooperation. [3] [4]

    The funding transaction enters Bitcoin’s confirmation process. Channel use depends on the negotiated opening conditions and wallet support; an apparently instant wallet setup does not establish that funding already has confirmations. Opening also uses capital and incurs on-chain fees. [5]

    2. Update the enforceable allocation

    Suppose two participants already share a channel. A successful payment changes their respective allocations while the funding output remains unspent. They exchange updated commitments and acknowledgments rather than putting a new Bitcoin transaction in a block for every payment. A channel can remain open across many payments. [5]

    3. Revoke the previous state

    The protocol’s commitment_signed and revoke_and_ack exchange makes updates enforceable and supplies the secret needed to penalize a previously valid state. Revocation does not erase an old transaction or make Bitcoin automatically recognize the newest balance. Publishing an old, revoked commitment can expose the broadcaster’s funds to a penalty claim by its peer. That protection requires timely action. [4] [6]

    4. Close cooperatively or enforce a commitment

    In a cooperative close, both parties agree to a closing transaction that spends the channel funding into their on-chain outputs. A force close uses a commitment transaction when cooperation is unavailable or a payment deadline requires enforcement. Confirmation, spending delays and possibly further transactions determine when funds become usable. [5]

    There is no requirement to settle channel payments in periodic batches. Ordinary updates remain off-chain; funding, closing and some liquidity operations involve Bitcoin transactions. This channel structure differs from the rollup mechanisms discussed in smart contracts and Ethereum.

    Inbound and Outbound Liquidity

    Outbound liquidity is the amount you can send through your side of a channel. Inbound liquidity is the amount your peer can send toward you. Your own allocation supports outbound payments; your peer’s allocation supports inbound payments. Both are constrained by reserves, fees, pending payments and channel policies. [7]

    Channel terms describe different constraints
    Term Meaning for the user
    Capacity Total bitcoin committed to the channel; it does not show how much each direction can carry now.
    Local balance Your allocation, some of which may be unavailable for a new payment.
    Remote balance Your peer’s allocation; usable funds on that side provide receiving room for you.
    Channel reserve Balance a participant must retain under the channel’s rules. It remains that participant’s allocation rather than becoming a paid fee.
    Pending HTLCs and limits Conditional payments can tie up funds and payment slots; minimum, maximum and total in-flight limits also apply.

    Reserve rules depend on the opening protocol and channel parameters. Fee and anchor requirements can reduce sendable funds further. Treat the wallet’s available-to-send or available-to-receive figure as more useful than simply subtracting a fixed percentage from capacity. [4]

    A merchant that mostly receives payments accumulates local balance and consumes inbound room. A user that mostly spends does the reverse. Opening a channel entirely with your own funds primarily creates sending ability; receiving usually requires usable funds on the peer’s side. [7]

    How HTLCs Route a Payment

    A hashed timelock contract, or HTLC, makes a payment conditional on revealing a secret called a preimage. The payment identifies the secret by its hash. A recipient who reveals the matching preimage enables the payment to be claimed; a timeout path provides a fallback when it is not completed. These conditions are incorporated into enforceable channel commitments. [8]

    In a conventional invoice payment, the recipient supplies an invoice containing the payment hash and other payment information. The sender’s wallet finds a route and offers linked HTLCs. The invoice’s expiration time and the HTLCs’ block-height deadlines serve different purposes. [9]

    1. Lock in the incoming condition. A router waits until the incoming HTLC is irrevocably committed before offering its corresponding outgoing HTLC.
    2. Use the router’s outgoing funds. It offers its own balance in the next channel under the same payment hash, with an earlier expiry and an amount reduced by its fee.
    3. Fulfill backward. The recipient reveals the preimage. The router uses that knowledge to fulfill its incoming HTLC, and channel allocations update as the conditions are removed.

    This arrangement limits an intermediary’s ability to collect the incoming payment while withholding the corresponding outgoing payment. It relies on correct implementation, adequate timelocks and timely enforcement. Failed or unresponsive paths can tie up liquidity and require on-chain resolution. [4]

    HTLCs also appear in the atomic swaps discussed in our altcoins guide. Here they connect bitcoin payment channels; a routed Lightning payment does not require exchanging assets across two blockchains.

    A Lightning Routing Example With Fees and Timelocks

    Consider three fictional participants: Alice pays Carla 50,000 sat through Bob. Alice and Bob share one 1,000,000 sat channel; Bob and Carla share another. Both channels are already open. Carla chooses a secret preimage R and includes its hash in her invoice; she keeps R private until fulfillment. The two HTLCs use that same hash. Initial channel allocations appear below.

    For this hypothetical check, each side retains a 10,000 sat reserve plus an additional 2,000 sat unspent fee/anchor allowance. Assume the actual channel requirements fit within that allowance, no other HTLCs are pending, and the payment meets all dust, minimum/maximum and in-flight limits. These allowances illustrate constraints; they are not universal wallet settings.

    Starting allocations and sending room (hypothetical)
    Channel Initial allocations (sat) Illustrated sending room
    Alice–Bob Alice: 600,000; Bob: 400,000 Alice: 600,000 − 10,000 − 2,000 = 588,000 sat
    Bob–Carla Bob: 300,000; Carla: 700,000 Bob: 300,000 − 10,000 − 2,000 = 288,000 sat

    Calculate Bob’s forwarding fee

    Assume Bob charges a base fee of 1 sat plus 200 parts per million, or ppm, of the amount he forwards. Set any inbound-fee adjustment to zero. The standard outgoing fee relationship is: [10]

    Standard Outgoing HTLC Fee
    Fee = Base fee + Forwarded amount × Rateppm / 1,000,000
    Use the same amount unit for the base fee, forwarded amount and result. Protocol calculations use integer millisatoshis.
    Alice Pays 50,011 sat to Deliver 50,000 sat

    Bob’s fee = 1 + 50,000 × 200 / 1,000,000 = 11 sat.

    Alice’s HTLC to Bob = 50,000 + 11 = 50,011 sat. Bob’s HTLC to Carla = 50,000 sat.

    Alice has 588,000 sat of illustrated room and Bob has 288,000 sat in the required directions, so both amounts fit.

    With several routers, calculate amounts backward from the recipient: an earlier HTLC must carry the final payment plus downstream fees. Actual policies can also include inbound discounts or fees where supported; the simple formula above does not describe every implementation’s complete fee policy. [11]

    Set the downstream deadline earlier

    Let the current hypothetical block height be H. Assume Carla requires a final HTLC expiry at least 40 blocks ahead and Bob requires a 40-block forwarding gap. With no additional privacy padding in this simplified example:

    • Bob to Carla: 50,000 sat, expiring at H + 40.
    • Alice to Bob: 50,011 sat, expiring at H + 80.

    The 40-block gap gives Bob an enforcement window after the downstream deadline. The nodes must still act within their safety deadlines. These are fallback deadlines, so a successful payment can complete promptly without waiting 40 or 80 blocks. Block intervals vary, and a timeout does not automatically deposit a refund into a wallet without resolution. [4] [10]

    Check the successful balance changes

    Once Carla reveals the preimage and both linked HTLCs settle off-chain, the allocations become:

    Allocations after the successful payment (hypothetical)
    Participant and channel Calculation (sat) New allocation (sat)
    Alice, Alice–Bob 600,000 − 50,011 549,989
    Bob, Alice–Bob 400,000 + 50,011 450,011
    Bob, Bob–Carla 300,000 − 50,000 250,000
    Carla, Bob–Carla 700,000 + 50,000 750,000

    Each channel still totals 1,000,000 sat. Bob’s combined allocation rises from 700,000 to 450,011 + 250,000 = 700,011 sat: 11 sat of gross routing revenue. His outgoing balance toward Carla fell, so repeated payments in this direction eventually need reverse traffic or liquidity management. Opening and eventual closing fees are separate from these allocation changes.

    Capacity Can Hide a Directional Bottleneck

    Reset the Bob–Carla channel to a different starting allocation: Bob owns 20,000 sat and Carla 980,000 sat. With the same illustrative reserve and fee allowance, Bob has 20,000 − 10,000 − 2,000 = 8,000 sat of room. He cannot forward 50,000 sat over that channel despite its 1,000,000 sat capacity.

    LND’s payment documentation explains that channel balance distributions are not publicly advertised. A wallet learns from routing successes and failures, but a known channel path can still lack the liquidity required right now. Multipart payments can help when the wallet and recipient support them, provided the available paths together can carry the payment. [12]

    How Users and Merchants Manage Liquidity

    The appropriate balance depends on the task. A payer needs useful outbound routes; a merchant needs inbound room where customers can reach it. A routing node needs both directions across different channels. A perfectly even split in every channel is not a universal objective.

    • Use natural reverse flows. Paying suppliers can create receiving room, while receiving funds can replenish spending ability.
    • Rebalance existing channels. A circular payment to yourself can reduce local balance in one channel and increase it in another. It consumes routing resources and may cost fees; it creates no new bitcoin.
    • Acquire suitable inbound capacity. A peer may open a funded channel toward you, potentially for compensation.
    • Move funds between layers when useful. Swaps and other supported liquidity operations can exchange on-chain and channel funds, with service fees, mining costs and implementation conditions.

    Lightning Labs documents these management choices and the cost of rebalancing. A Lightning service provider, or LSP, can automate parts of channel opening or liquidity provision for a self-custodial wallet. That assistance can carry charges even when an individual payment’s routing fee is small. [2] [13]

    Lightning vs On-Chain Bitcoin: Compare the Full Costs

    Payment speed and total cost depend on the arrangement
    Question On-chain Bitcoin Self-custodial Lightning
    What changes? Bitcoin transactions spend and create outputs recorded in blocks. Normal payments change enforceable allocations in channels.
    What affects completion? Propagation, miner inclusion and the recipient’s confirmation policy. Online participants, directional liquidity, routing and successful HTLC resolution.
    What costs arise? Transaction fees influenced by transaction size and demand for block space. Routing plus allocated opening, closing, liquidity-management and provider costs.
    What happens when cooperation fails? The valid transaction still needs inclusion and confirmations. A channel may need force closure, delayed claims and additional on-chain transactions.

    A direct payment over an existing channel has no intermediary forwarding fee, but channel and wallet costs may still apply. Native routing fees for the ordinary HTLC flow are earned on success; that statement does not cover every service fee a wallet or provider may charge. [14]

    A separate lifecycle-cost example

    For a separate hypothetical cost budget, assume opening costs 6,000 sat, cooperative closing costs 4,000 sat and liquidity management costs 3,000 sat. Assume each successful payment incurs 11 sat of routing fees. The non-routing budget is 6,000 + 4,000 + 3,000 = 13,000 sat.

    Illustrative Average Cost per Completed Payment
    Average cost = (Opening + Closing + Liquidity costs + Total routing fees) / Completed payments
    All costs must cover the same evaluated lifecycle and use the same currency unit.
    • 1,000 payments: (13,000 + 11 × 1,000) / 1,000 = 24 sat per payment.
    • 10 payments: (13,000 + 11 × 10) / 10 = 1,311 sat per payment.

    This arithmetic shows how usage spreads fixed costs. It does not predict market fees or prove the assumed liquidity budget can sustain either payment count. It is separate from Alice’s example: her original balances could not support 1,000 such one-way payments without replenishment. Capital tied up in channels is not itself a spent fee, although its opportunity cost matters. Hardware, labor and price-conversion costs are also excluded.

    For context on the wider payment landscape, see digital payment systems and CBDCs. The asset being transferred, the payment rail and the provider’s charges are separate parts of that comparison.

    Wallet Custody, Force Closes and Recovery Risks

    Check who controls the keys

    With self-custody, you control the keys needed for your side’s enforceable channel claims. With a custodial service, the operator controls funds and credits your account; your ability to withdraw depends on the service. A payment shown inside one operator’s app may simply update its internal ledger. Using a Lightning-branded interface alone does not establish self-custody.

    A custodian can handle routing and liquidity for users, while introducing dependence on its security, financial condition and withdrawal decisions. An LSP helping a self-custodial wallet is a different arrangement: service assistance does not by itself transfer control of the user’s funds. Examine the actual signing and recovery design. [1] [13]

    Allow for delayed exits and timely monitoring

    In the revocation-based design, the participant publishing a commitment generally has a relative delay on its own main balance output. This delay starts from the commitment’s confirmation. Other outputs depend on channel type and pending HTLCs; a force close does not make every balance immediately available. Fees may be needed for the commitment and subsequent claims or fee bumps. [3]

    A watchtower can monitor for a revoked commitment and broadcast a pre-authorized penalty response. Its usefulness depends on configuration, coverage, availability and an effective on-chain response. It does not provide receiving liquidity, operate the whole wallet or substitute for backups. LND’s watchtower functionality requires explicit setup. [6] [15]

    Payment participants normally need their nodes online to complete the HTLC exchange. Protection while offline is a separate question involving monitoring and enforcement deadlines. A phone wallet can hide much of this machinery, so verify its design rather than assuming that all self-custodial wallets require the same uptime or offer the same protection.

    Use implementation-specific backups and payment status

    A seed phrase alone should not be assumed to restore active Lightning channel state. LND documents recovery using its seed and a static channel backup, which initiates recovery of settled funds through peer contact and channel closure. That backup does not promise recovery of pending HTLCs. Restoring an old live channel database can be dangerous because it may contain revoked states. Follow the current instructions for the actual wallet and version. [16] [17]

    Distinguish pending from failed. A payment that is still locked in may complete or need timeout resolution. Check the wallet’s final status before initiating an independent replacement payment, and confirm receipt when the status is uncertain. LND explicitly separates in-flight, succeeded and failed states. [12]

    How to Evaluate Lightning for Your Payments

    1. Define the task. Estimate payment size, frequency and whether funds mostly arrive or leave.
    2. Identify custody and dependencies. Determine who signs, who supplies liquidity, what happens offline and how recovery works.
    3. Check practical limits. Review available sending/receiving amounts, routing fees, provider charges and exit conditions.
    4. Budget over a lifecycle. Include entry, liquidity management and a plausible on-chain exit alongside per-payment fees.
    5. Check payment completion. Begin with an amount you can afford to put at risk, verify receipt and understand pending-status handling before relying on the setup.

    For a separate merchant-pricing exercise, the Payment Method Cost Comparison Calculator compares hypothetical fixed and percentage processor-fee scenarios. It does not estimate native Lightning routing, on-chain, channel opening or closing, rebalancing, or liquidity costs. Keep those costs in a separate Lightning budget; entering a processor percentage does not model Lightning economics.

    Common Mistakes About the Lightning Network

    • Reading capacity as immediately spendable balance. Direction, reserves, pending HTLCs and policy limits determine usable funds.
    • Assuming opening with your own money solves receiving. Inbound payments need usable funds on the peer’s side and a route toward you.
    • Treating a revoked state as deleted. The penalty mechanism needs monitoring and timely enforcement.
    • Using a routing quote as an all-in cost. Include channel, liquidity and provider costs over the same period.
    • Expecting an automatic immediate refund after timeout. HTLC resolution can involve cooperation, on-chain transactions and additional delays.
    • Assuming a convenient app guarantees custody or recovery. Confirm key control, backups, service dependencies and exit procedures.

    Limitations of Lightning Payments

    Lightning adds operational requirements: sufficient directional liquidity, online cooperation for normal payments, reliable software and workable on-chain enforcement. Very small pending HTLCs can fall below on-chain output thresholds and be absorbed into fees during force closure. Channel capital and emergency on-chain costs deserve attention even when ordinary payments are inexpensive. [3]

    Payments are not broadcast as a public per-payment ledger. Onion routing limits the route information exposed to an individual intermediary, while traffic analysis and other information can still compromise privacy. Privacy is a property to evaluate, not an anonymity guarantee. [18]

    Faster bitcoin transfers also leave bitcoin’s exchange-rate risk intact. A merchant measuring revenue in dollars still needs a decision about holding or converting BTC. That is separate from channel mechanics; our guide to Bitcoin valuation and token economics covers the economic context.

    Frequently Asked Questions

    No. A payment can traverse connected channels through routing nodes. Every required hop still needs usable liquidity in the payment’s direction and must meet the payment’s policy and timing requirements.

    Your own channel balance supports sending, while usable peer-side balance supports receiving. Receiving can also fail because of routing, availability or policy constraints elsewhere. A large local balance does not by itself create inbound liquidity.

    No. Cooperative participants can keep a channel open and update its allocation across many payments. There is no mandatory periodic settlement batch. Closure spends the channel funding and brings the relevant claims on-chain.

    No. Routing can be inexpensive, particularly across existing useful channels, but entry, exit, liquidity management and service costs matter. A low-volume setup can have a much higher average cost than the routing quote alone suggests.

    No. A watchtower handles configured breach-monitoring and response tasks. It does not restore the wallet’s keys or guarantee recovery of every channel claim. Use the wallet’s documented backup and recovery procedure as well.

    No. Fees depend on successful traffic through useful channels. Rebalancing, capital commitments, operation and on-chain exits can consume revenue. Bob’s 11 sat in the example is gross forwarding revenue from one hypothetical payment, not a promised return.

    Sources

    1. Lightning Labs: Lightning Network FAQ. Bitcoin denomination, network structure and custody concepts.
    2. Lightning Labs: Managing Liquidity on the Lightning Network. Units, directional balances and rebalancing.
    3. BOLT #3: Bitcoin Transaction and Script Formats. Funding, commitment outputs, delays, anchors and dust.
    4. BOLT #2: Peer Protocol for Channel Management. Establishment, reserves, updates, forwarding and deadlines.
    5. Lightning Labs: Lifecycle of a Payment Channel. Opening, balance updates and closing.
    6. Lightning Labs: Watchtowers. Revoked-state penalties and monitoring.
    7. Lightning Labs: Understanding Liquidity. Sending, receiving and routing needs.
    8. Lightning Labs: Hashed Timelock Contract (HTLC). Conditional claims and preimages.
    9. BOLT #11: Invoice Protocol for Lightning Payments. Payment hashes, invoice expiry and final HTLC delta.
    10. BOLT #7: P2P Node and Channel Discovery. HTLC fee formula and routing timelocks.
    11. Lightning Labs: Inbound Channel Fees. Additional fee-policy and compatibility qualifications.
    12. Lightning Labs: Sending Payments. Hidden balances, multipart payments and pending status.
    13. Lightning Labs: Lightning Service Provider. Assisted liquidity and service charges.
    14. Lightning Labs: Channel Fees. Forwarding compensation and fee units.
    15. Lightning Labs: Configuring Watchtowers. Explicit LND client/server setup.
    16. LND: Recovering Funds From lnd. Seed, static backup and settled-fund recovery scope.
    17. LND: Operational Safety Guidelines. Backup safety and stale channel-state risks.
    18. BOLT #4: Onion Routing Protocol. Route information and traffic-analysis limits.

    Primary documents accessed November 14, 2026. Living specifications and implementation guides can change; the amounts and cost budgets above are hypothetical, not current fee quotes.

    Disclaimer

    This article provides educational information, not individualized financial, investment or technical advice. Bitcoin payments and wallet operation involve price, custody, software, liquidity and recovery risks. Verify the current documentation and terms for the wallet or service you use.