
Lightning Network
Overview
Status
Mainnet
Type
State Channel
Fee Token
BTC
BTC Supply
₿0
The Lightning Network (often called Lightning) is a payment-channel-based Layer 2 protocol built on bitcoin. It enables users to open a payment channel with a counterparty and make an unlimited number of offchain payments within the channel. By routing payments across a network of interconnected nodes, users can reach recipients outside their specific channel.
CUSTODY
DATA AVAILABILITY
OPERATORS
FINALITY ASSURANCE
Trust Assumption Review
BTC Custody
Low
✅
Lightning BTC
Funds are secured in a 2-2 multisig with unilateral exit support for each counterparty
When users open a payment channel, funds are deposited onchain into a 2-of-2 multisig address shared between the respective channel counterparties.
Users can collaboratively close a channel by signing and broadcasting a closing transaction which distributes the funds on bitcoin L1 based on the latest channel state.
If a counterparty is unresponsive during a cooperative channel closure attempt, a user can unilaterally enforce the process by broadcasting the most recent commitment transaction representing the latest balance distribution. There is a challenge-response mechanism to settle potential disputes between channel counterparties over the final state of a channel closure transaction.
Users can collaboratively close a channel by signing and broadcasting a closing transaction which distributes the funds on bitcoin L1 based on the latest channel state.
If a counterparty is unresponsive during a cooperative channel closure attempt, a user can unilaterally enforce the process by broadcasting the most recent commitment transaction representing the latest balance distribution. There is a challenge-response mechanism to settle potential disputes between channel counterparties over the final state of a channel closure transaction.
Data Availability
Low
✅
Channel state data is self-hosted by users
Lightning Network users are solely responsible for preserving their channel state data, as the network does not provide data redundancy. Failure to maintain this data could result in a complete loss of funds stored in the channel.
Network Operators
Low
✅
Network operators run nodes to route Lightning payments, with node operation being permissionless. Single-node failures do not compromise payment reliability
Users in the Lightning Network interact directly with their channel counterparties, bypassing the need for block builders or sequencers. Payments to other recipients are routed through a decentralized network of nodes.
If a route fails due to a node operator being offline, users can route via an alternative channel.
If a route fails due to a node operator being offline, users can route via an alternative channel.
Finality Guarantees
Low
✅
Lightning transactions are atomic and settle instantly. Finality occurs with channel closure
Transactions on the Lightning Network use HTLCs to ensure atomicity, meaning they either succeed completely or fail entirely. Once settled, they are irreversible. Finality on Bitcoin occurs only when a channel is closed, at which point the agreed-upon state is validated and enforced by Bitcoin consensus, allowing for fund withdrawal.
Bitcoin Security
Settlement is finalized by Bitcoin consensus
Settlement is optimistically finalized through bitcoin consensus.
The protocol does not enable MEV on Bitcoin
Lightning does not enable malicious MEV on Bitcoin because all transactions occur off-chain, leaving miners unable to influence transaction ordering.
No alternative token needed for network security
Lightning does not use another token for network security.
Opening and closing channels contributes to the security budget
Lightning does not directly contribute to bitcoin’s security budget, but users do pay onchain transaction fees to miners when opening and closing LN channels.
Withdrawals
Users can unilaterally withdraw their funds with optimistic settlement guarantees
Collaborative closure: Users can close a channel collaboratively by agreeing on the final state of the channel and withdraw funds directly to their respective onchain addresses.
Unilateral closure: A malicious user may attempt to steal channel funds by broadcasting an outdated channel state. If the counterparty (or their watchtower) is online, they can broadcast a penalty transaction onchain using the revocation secret to counteract the fraud attempt, reclaims the full channel balance, and penalizes the malicious actor.
Unilateral closure: A malicious user may attempt to steal channel funds by broadcasting an outdated channel state. If the counterparty (or their watchtower) is online, they can broadcast a penalty transaction onchain using the revocation secret to counteract the fraud attempt, reclaims the full channel balance, and penalizes the malicious actor.
Technology
Payment channels
Payment channels are 2-2 multisig addresses on bitcoin L1 that allow two counterparties to lock funds and process an unlimited number of offchain payments between each other. Payments achieve finality only when a channel is closed and funds are settled onchain. Opening and managing one or more payment channels is how a user interacts with the Lightning Network.
Payment routing
The Lightning Network consists of interconnected two-party payment channels. Users can route payments across intermediary nodes to reach the intended recipient. Routing is enforced by HTLCs, ensuring payment atomicity and security.
Hashed Timelock Contracts (HTLCs)
Hashed Timelock Contracts (HTLCs) are smart contracts that enable atomic and conditional payments on the Lightning Network. They lock funds using two conditions: a cryptographic hash and a time limit. To unlock the funds, the recipient must provide the secret preimage matching the hash; otherwise, funds are returned automatically to the sender after the time limit expires. HTLCs facilitate secure payment routing across multiple nodes, ensuring funds cannot be misappropriated by intermediaries. The preimage, created by the recipient when generating an invoice, ensures that only they can complete the payment.
Use Cases
Micro-transactions
Once channels are established, payments occur offchain without requiring paying fees for bitcoin miners, enabling low-cost transactions. This makes Lightning well-suited for small, high frequency transactions.
Faster transactions
With near-instant confirmations enabled through offchain processing and p2p consensus, Lightning is optimized for rapid payments.
Additional Considerations
UX friction leading users to centralized solutions
Non-technical users can find it challenging to self-host a Lightning node, often driving them towards custodial solutions. This trend contributes to liquidity and network centralization, as users rely on intermediaries instead of interacting directly. A 2024 report from River found that 80% of Lightning Network liquidity resides in channels managed by centralized service providers.
Source Code
Code is open-source
There are multiple free and open-source implementations of the Lightning Network protocol.
Knowledge Bits
Learn more