Skip to content
Switch branches/tags
Go to file
10 contributors

Users who have contributed to this file

@rustyrussell @toadlyBroodle @cdecker @HugoDoyon @shannona @niftynei @Roasbeef @nayuta-gondo @dlogicman @cjamthagen

BOLT #0: Introduction and Index

Welcome, friend! These Basis of Lightning Technology (BOLT) documents describe a layer-2 protocol for off-chain bitcoin transfer by mutual cooperation, relying on on-chain transactions for enforcement if necessary.

Some requirements are subtle; we have tried to highlight motivations and reasoning behind the results you see here. I'm sure we've fallen short; if you find any part confusing or wrong, please contact us and help us improve.

This is version 0.

  1. BOLT #1: Base Protocol
  2. BOLT #2: Peer Protocol for Channel Management
  3. BOLT #3: Bitcoin Transaction and Script Formats
  4. BOLT #4: Onion Routing Protocol
  5. BOLT #5: Recommendations for On-chain Transaction Handling
  6. BOLT #7: P2P Node and Channel Discovery
  7. BOLT #8: Encrypted and Authenticated Transport
  8. BOLT #9: Assigned Feature Flags
  9. BOLT #10: DNS Bootstrap and Assisted Node Location
  10. BOLT #11: Invoice Protocol for Lightning Payments

The Spark: A Short Introduction to Lightning

Lightning is a protocol for making fast payments with Bitcoin using a network of channels.


Lightning works by establishing channels: two participants create a Lightning payment channel that contains some amount of bitcoin (e.g., 0.1 bitcoin) that they've locked up on the Bitcoin network. It is spendable only with both their signatures.

Initially they each hold a bitcoin transaction that sends all the bitcoin (e.g. 0.1 bitcoin) back to one party. They can later sign a new bitcoin transaction that splits these funds differently, e.g. 0.09 bitcoin to one party, 0.01 bitcoin to the other, and invalidate the previous bitcoin transaction so it won't be spent.

See BOLT #2: Channel Establishment for more on channel establishment and BOLT #3: Funding Transaction Output for the format of the bitcoin transaction that creates the channel. See BOLT #5: Recommendations for On-chain Transaction Handling for the requirements when participants disagree or fail, and the cross-signed bitcoin transaction must be spent.

Conditional Payments

A Lightning channel only allows payment between two participants, but channels can be connected together to form a network that allows payments between all members of the network. This requires the technology of a conditional payment, which can be added to a channel, e.g. "you get 0.01 bitcoin if you reveal the secret within 6 hours". Once the recipient presents the secret, that bitcoin transaction is replaced with one lacking the conditional payment and adding the funds to that recipient's output.

See BOLT #2: Adding an HTLC for the commands a participant uses to add a conditional payment, and BOLT #3: Commitment Transaction for the complete format of the bitcoin transaction.


Such a conditional payment can be safely forwarded to another participant with a lower time limit, e.g. "you get 0.01 bitcoin if you reveal the secret within 5 hours". This allows channels to be chained into a network without trusting the intermediaries.

See BOLT #2: Forwarding HTLCs for details on forwarding payments, BOLT #4: Packet Structure for how payment instructions are transported.

Network Topology

To make a payment, a participant needs to know what channels it can send through. Participants tell each other about channel and node creation, and updates.

See BOLT #7: P2P Node and Channel Discovery for details on the communication protocol, and BOLT #10: DNS Bootstrap and Assisted Node Location for initial network bootstrap.

Payment Invoicing

A participant receives invoices that tell her what payments to make.

See BOLT #11: Invoice Protocol for Lightning Payments for the protocol describing the destination and purpose of a payment such that the payer can later prove successful payment.

Glossary and Terminology Guide

Theme Song

  Why this network could be democratic...
  Why it could be released Lightning!
  (Release Lightning!)

  We'll have some timelocked contracts with hashed pubkeys, oh yeah.
  (Keep talking, whoa keep talkin')
  We'll segregate the witness for trustless starts, oh yeah.
  (I'll get the money, I've got to get the money)
  With dynamic onion routes, they'll be shakin' in their boots;
  You know that's just the truth, we'll be scaling through the roof.
  Release Lightning!
  (Go, go, go, go; go, go, go, go, go, go)

  Oh released Lightning, it's better than a debit card..
  (Release Lightning, go release Lightning!)
  With released Lightning, micropayments just ain't hard...
  (Release Lightning, go release Lightning!)
  Then kaboom: we'll hit the moon -- release Lightning!
  (Go, go, go, go; go, go, go, go, go, go)

  We'll have QR codes, and smartphone apps, oh yeah.
  (Ooo ooo ooo ooo ooo ooo ooo)
  P2P messaging, and passive incomes, oh yeah.
  (Ooo ooo ooo ooo ooo ooo ooo)
  Outsourced closure watch, gives me feelings in my crotch.
  You'll know it's not a brag when the repo gets a tag:
  Released Lightning.

  [Instrumental, ~1m10s]
  (Lightning! Lightning! Lightning! Lightning!
   Lightning! Lightning! Lightning! Lightning!)

  C'mon guys, let's get to work!

-- Anthony Towns


[ FIXME: Insert Author List ]

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.