Lightning & layer 2
Lightning exists because block space is scarce and a coffee should not have to bid against a settlement for it. The idea is simple even where the vocabulary is not. Two parties lock bitcoin in a channel, trade signed updates about how it is split, and only the opening and the closing ever touch the chain.
Everything else follows from that. A channel has a capacity and it has a direction, so one that has been used hard in a single direction cannot receive again until it is rebalanced. Routing means finding a path of channels between you and the person you are paying, which is why a Lightning payment can fail in ways an on chain payment cannot. Invoices carry an amount and they expire, which is why Lightning feels less like sending money and more like paying a bill.
The trade offs are real and this section names them. Channels need funds that are online and watched, a different risk model from cold storage. Force closing is what happens when a counterparty vanishes, and it costs an on chain fee at whatever the fee rate happens to be that day.
Sidechains, statechains and the other layer two designs are here too, along with what each one is really asking you to trust.
47 terms. Last reviewed 2026-09-07.
Terms in Lightning & layer 2
- Anchor outputAnchor outputs are the two 330 satoshi escape hatches attached to a Lightning commitment transaction, one keyed to each partner, so either side can raise the fee on a close signed in advance.
- ArkArk lets you receive bitcoin off chain without opening a channel, by giving you a share of a large shared output that expires unless you refresh it.
- Atomic swapAn atomic swap trades coins on two different blockchains in a single all-or-nothing operation, enforced by matching hash locks and timelocks rather than by an exchange holding both sides.
- Base feeThe base fee is the flat amount a Lightning node charges for every HTLC it forwards, quoted in millisatoshi and advertised to the network in its channel_update message.
- Blinded pathA blinded path is a route to a Lightning node in which the recipient replaces each hop's public key with a tweaked one, so the sender never learns the real destination.
- BOLT11 invoicealso Lightning invoice, BOLT 11A BOLT11 invoice is the long string starting with lnbc that a Lightning wallet produces to request a payment, encoding the amount, a payment hash, an expiry, and a signature.
- BOLT12 offeralso offerA BOLT12 offer is a reusable Lightning payment code beginning lno1 that any number of payers can turn into their own fresh invoice by asking the issuer over the Lightning network itself.
- Cashualso Ecash, Chaumian ecashCashu is an open protocol for Chaumian ecash on bitcoin, where a mint issues blinded digital notes that spend instantly and privately but remain the mint's IOUs.
- Channel announcementA channel announcement is the signed gossip message that tells the Lightning network a public channel exists, proving ownership of the funding output with four signatures.
- Channel capacityChannel capacity is the total amount of bitcoin locked in a Lightning channel's funding output, which is the ceiling on what the two peers can move between them, not the amount you can spend.
- Channel reserveChannel reserve is the slice of a Lightning channel balance each side is forbidden to spend, held as collateral so cheating with an old commitment transaction always costs something.
- CLTV expiry deltaA CLTV expiry delta is the number of blocks a Lightning node subtracts from an incoming payment's timelock before passing it on, advertised per channel direction in gossip.
- Commitment transactionA commitment transaction is the signed, unbroadcast bitcoin transaction that each side of a Lightning channel holds, spending the funding output into the current balance split.
- Cooperative closeA cooperative close ends a Lightning channel by agreement: both peers sign one transaction that pays each side its final balance, with no delay and no penalty risk.
- Drivechainalso BIP300Drivechain is an unactivated proposal, BIP300 and BIP301, that would let bitcoin miners rather than a federation guard sidechain deposits, with withdrawals taking months of miner votes.
- Dust HTLCA dust HTLC is a Lightning payment too small to get its own output in the commitment transaction, so a force close hands it to miners rather than either channel partner.
- Feature bitA feature bit tells other Lightning nodes that your node supports one specific protocol extension, with odd numbers marking it optional and even numbers marking it mandatory.
- Fedimintalso Federated mintFedimint is a protocol for community custody: a group of guardians holds bitcoin in a threshold multisig and issues blinded ecash notes that the guardians themselves cannot trace.
- Force closeA force close ends a Lightning channel without your counterparty's help: you broadcast the latest commitment transaction, pay on-chain fees, and wait out a delay before your own balance is spendable.
- Gossip protocolThe gossip protocol is how Lightning nodes flood signed channel and node announcements to each other, so every node can build its own map of the network without asking a server.
- HTLCalso Hash time-locked contractAn HTLC is a payment that pays out only against a secret, and refunds the sender if that secret never arrives before a block height both sides agreed on.
- Inbound liquidityalso Receive capacityInbound liquidity is the amount someone can send you over Lightning right now, which equals the balance your channel partners hold on their side of your open channels.
- Invoice expiryInvoice expiry is the x field of a BOLT11 payment request, a number of seconds counted from the invoice's own timestamp, after which payer and payee should both refuse it.
- KeysendKeysend sends a Lightning payment with no invoice: the payer generates the 32 byte preimage, hashes it into the payment hash, and ships the secret inside the onion.
- Lightning addressA Lightning address looks like an email address, user at domain, and resolves to a web endpoint on that domain which hands your wallet a fresh Lightning invoice on request.
- Lightning Networkalso Lightning, LNThe Lightning Network is a payment layer built on top of bitcoin where two parties lock coins in a shared on-chain address and then pay each other instantly off-chain.
- Liquid Networkalso LiquidLiquid Network is a bitcoin sidechain run by a federation of exchanges and financial firms, offering one minute blocks, confidential amounts, and issued assets in exchange for federated custody.
- LNURLLNURL is a family of small web protocols that let a Lightning wallet fetch a fresh invoice, a withdrawal, or a login challenge from a server by following one encoded link.
- Maximum HTLC value in flightMaximum HTLC value in flight is the cap each Lightning peer sets on the total value of payments the other side may have pending at once.
- Millisatoshialso msatA millisatoshi is one thousandth of a satoshi, the unit Lightning uses to count channel balances and routing fees, and an amount the bitcoin blockchain itself cannot record.
- Node aliasA node alias is the 32 byte name a Lightning node writes into its own signed node_announcement, giving explorers and wallets something readable to display instead of a raw public key.
- Onion routingalso sphinxOnion routing is the layered encryption Lightning uses to send a payment across several hops, giving each node only the instructions for its own forward and nothing else.
- Payment channelalso Micropayment channel, Lightning channelA payment channel is a two-party bitcoin contract funded by one on-chain transaction, inside which the two sides can rewrite the split of that money thousands of times without touching the chain.
- Payment hashA payment hash is the SHA-256 digest of a 32 byte secret the recipient generated, and it is both the lock on a Lightning payment and the name everyone calls it by.
- Payment secretA payment secret is a 32 byte value the recipient generates per invoice and requires back in the final onion payload, so knowing the payment hash alone does not make you the payer.
- Penalty transactionA penalty transaction is the on-chain sweep that takes every output of a Lightning channel when your peer publishes a revoked commitment, signed with the revocation key you already hold.
- PTLCalso Point time-locked contractA PTLC locks a payment to an elliptic curve point rather than a hash, so each hop on a Lightning route sees a different lock and cannot recognize the same payment twice.
- Revocation keyA revocation key is the blinded public key locking the delayed and HTLC outputs of a Lightning commitment transaction, which your channel partner can spend the moment you reveal the secret retiring that state.
- Route hintA route hint is an entry in a Lightning invoice naming a public node, a channel and its fees, so a payer can reach a recipient whose own channels are not announced.
- Routing nodeA routing node is a Lightning node that keeps channels open in both directions and forwards other people's payments through them, collecting a small fee on every hop it relays.
- Short channel IDalso scidA short channel ID is the 8-byte pointer Lightning uses to name a channel, packing the funding transaction's block height, its index in that block, and its output index.
- Shutdown scriptA shutdown script is the on-chain address your Lightning balance is paid to when a channel closes cooperatively, named in the BOLT 2 shutdown message as a raw scriptpubkey.
- SidechainA sidechain is a separate blockchain whose coins are backed by bitcoin locked on the main chain, so value moves between the two through a peg instead of a trade.
- SplicingSplicing resizes an open Lightning channel by spending its funding output into a new, larger or smaller one, so the channel keeps its history and stays usable throughout.
- StatechainA statechain moves an entire bitcoin output from one owner to the next off chain, by handing over a key share while a server that co-signs promises to forget the old one.
- Submarine swapA submarine swap trades on-chain bitcoin for Lightning bitcoin in one atomic step, using the same payment hash on both sides so neither party can take the money and run.
- WatchtowerA watchtower is a service you pay or ask to watch the blockchain while your Lightning node is offline, ready to punish a channel partner who publishes an old balance.
The other 13 sections
- BasicsWhat bitcoin is, what a satoshi is, and the handful of ideas the rest of the glossary is built on.
- Addresses & keysWhere coins get sent, what a private key actually controls, and how one seed produces thousands of addresses.
- Wallets & custodyHot, cold, custodial and multisig, and what each one changes about who can move your coins.
- Privacy & securityThe attacks that take people's bitcoin, and the habits and tools that stop them.
- Transactions & feesWhat a bitcoin transaction is made of, why it costs what it costs, and how to unstick one.
- Buying & exchangesOrder types, spreads and fee schedules: the vocabulary an exchange uses while it is charging you.
- Markets & investingMarket cap, volatility and spot ETFs. The language of price, without the price predictions.
- Mining & consensusHow new blocks get made, what difficulty adjusts, and why the rules hold with nobody in charge.
- Protocol & upgradesSegWit, Taproot, soft forks and BIPs: how bitcoin changes and who gets to decide.
- Regulation & taxKYC, the Travel Rule, MiCA and capital gains: the rules that reach your account and your tax return.
- Culture & historyMt. Gox, the genesis block, HODL, and the events and slang that shaped how people talk about bitcoin.
- Nodes & softwareBitcoin Core, full nodes, pruning and RPC: the software that enforces the rules.
- Developer referenceP2P message types, opcodes and script terms: the field names you meet reading bitcoin code.
Frequently asked questions
What problem does Lightning solve?
Block space is scarce, and a coffee should not have to bid against a settlement for it. Two parties lock bitcoin in a channel, exchange signed updates about how it is split, and only the opening and the closing ever touch the chain.
Is a Lightning wallet still self-custody?
It depends entirely on the wallet. Some run a real node on your phone and hand you a seed phrase. Others are an account on somebody else's server wearing the same interface. The difference only becomes visible when you try to recover.
Why did my Lightning payment fail?
Usually liquidity rather than a fault. A payment needs capacity along a route, and receiving needs inbound capacity you may not have yet. Failures are cheap and safe, which is why wallets retry quietly and you rarely notice them.
What is a force close and what does it cost?
Closing a channel unilaterally when the other side is unreachable. Your funds are safe but locked until a timelock expires, often several days, and the on-chain fee comes out at whatever rate was agreed when the channel was opened.