Lightning Network
The Lightning Network (LN) is a payment protocol built on the bitcoin blockchain.[1] It is intended to enable fast transactions among participating nodes (independently run members of the network) and has been proposed as a solution to the bitcoin scalability problem.[2][3][4]
History
[edit]Joseph Poon and Thaddeus Dryja published a Lightning Network white paper in February 2015.[5][6]
Lightning Labs launched the Lightning Network in 2018 with the goal of reducing the cost and time required for cryptocurrency transaction. Specifically, the bitcoin blockchain can only process around 7 transactions per second (compared to Visa Inc., which can process around 24,000 transactions per second). Despite initial enthusiasm for the Lightning Network, reports on social media of failed transactions, security vulnerabilities, and over-complication lead to a decline in interest.[7]
On January 19, 2019, pseudonymous Twitter user hodlonaut began a game-like promotional test of the Lightning Network by sending 100,000 satoshis (0.001 bitcoin) to a trusted recipient where each recipient added 10,000 satoshis ($0.34 at the time) to send to the next trusted recipient. The "lightning torch" payment reached notable personalities including former Twitter A.K.A X CEO Jack Dorsey, Litecoin Creator Charlie Lee, Lightning Labs CEO Elizabeth Stark, and Binance CEO "CZ" Changpeng Zhao, among others.[8][9]
Design
[edit]Andreas Antonopoulos calls the Lightning Network a second layer routing network.[10] The payment channels allow participants to transfer money to each other without having to make all their transactions public on the blockchain.[11][12] This is secured by penalizing uncooperative participants. When opening a channel, participants must commit an amount on the blockchain (a funding transaction).[13] Time-based script extensions like CheckSequenceVerify
and CheckLockTimeVerify
make the penalties possible.
Transacting parties use the Lightning Network by opening a payment channel and transferring (committing) funds to the relevant layer-1 blockchain (e.g. bitcoin) under a smart contract. The parties then make any number of off-chain Lightning Network transactions that update the tentative distribution of the channel's funds, without broadcasting to the blockchain. Whenever the parties have finished their transaction session, they close the payment channel, and the smart contract distributes the committed funds according to the transaction record.[6]
To initiate closing, one node first broadcasts the current state of the transaction record to the network, including a proposed settlement, a distribution of the committed funds. If both parties confirm the proposal, the funds are immediately paid on-chain. The other option is uncooperative closure, for example if one node has dropped from the network, or if it is broadcasting an incorrect (possibly fraudulent) transaction state. In this case settlement is delayed during a dispute period, when nodes may contest the proposal. If the second node broadcasts a more up-to-date timestamped distribution, including some transactions omitted by the first proposal, then all committed funds are transferred to the second node: this punitive breach remedy transaction thwarts attempts to defraud the other node by broadcasting out-of-date transactions.[citation needed]
Implementations
[edit]Benefits
[edit]According to bitcoin advocate Andreas Antonopoulos, the Lightning Network provides several advantages over on-chain transactions:
- Granularity – According to Andreas Antonopoulos, some implementations of the Lightning Network allow for payments that are smaller than a satoshi, the smallest unit on the base layer of bitcoin.[10]
- Privacy – Lightning network payments may be routed through many sequential channels where each node operator will be able to see payments across their channels, but they will not be able to see the source nor destination of those funds if they are non-adjacent.[10]
- Speed – Settlement time for lightning network transactions is under a minute and can occur in milliseconds.[10] Confirmation time on the bitcoin blockchain, for comparison, occurs every ten minutes, on average.
- Transaction throughput – There are no fundamental limits to the amount of payments per second that can occur under the protocol. The amount of transactions are only limited by the capacity and speed of each node.[10]
Limitations
[edit]The Lightning Network (LN) operates through bidirectional payment channels between two nodes, forming smart contracts that facilitate off-chain transactions. If either party closes a channel, the final state is settled on the Bitcoin blockchain.[14] While this design enables faster and cheaper transactions, the necessity of on-chain transactions to open and close channels introduces scalability constraints. These limitations can be partially mitigated when multiple users who trust each other share a Lightning node.[15]
Lightning Network's dispute resolution mechanism requires participants to monitor the blockchain to detect and respond to potential fraud. This responsibility can be delegated to "watchtower"[16] nodes—trusted third parties that oversee the network on behalf of users. A standard time window, typically 24 hours, is allocated for a participant to contest an attempted fraud once a channel closure is broadcast.
Routing
[edit]When a direct payment channel between two parties is unavailable, the Lightning Network facilitates transactions through multi-hop routing. In this process, payments are forwarded across a series of intermediary nodes, each connected via bidirectional channels.[17] To preserve privacy and security, the network employs an onion routing protocol, wherein each node in the path decrypts only enough information to determine the next hop, without knowledge of the payment's origin or final destination .[18]
This routing mechanism relies on Hashed Timelock Contracts (HTLCs), which ensure that payments are either completed in full or fail entirely, preventing partial transfers. HTLCs use cryptographic hashes and time constraints to secure the transaction across multiple hops.
For successful routing, both the sender and receiver must maintain channels with sufficient liquidity. The sender's node constructs a route by analyzing the network graph to find a viable path that meets criteria such as channel capacity and fee rates. However, due to the private nature of channel balances, the sender may not have complete information about the liquidity available in each channel, leading to potential payment failures
To mitigate this, some implementations incorporate probing mechanisms and probabilistic scoring to estimate the reliability of potential routes based on historical data . Additionally, strategies like multi-path payments (MPP) allow larger transactions to be split into smaller parts, increasing the likelihood of successful routing.[19]
Overall, the Lightning Network's routing protocol enables scalable and private off-chain transactions, though it requires careful management of channel liquidity and network connectivity to ensure optimal performance.
Developer Tools and Simplification Efforts
[edit]To address the inherent complexities of operating on the Lightning Network—such as channel management, liquidity allocation, and routing reliability—several initiatives have emerged offering tools and platforms designed to abstract or automate these technical challenges.
Lightspark
[edit]Founded in 2022, Lightspark provides enterprise-grade infrastructure for the Lightning Network. It aims to simplify onboarding and scale Bitcoin payment capabilities for institutions and developers. The platform offers:
- Lightspark Connect – a tool for automated Lightning node deployment.
- Lightspark Predict – a smart routing engine that improves payment reliability by optimizing liquidity paths.
- Developer SDKs and APIs – allowing businesses to integrate Lightning payments into their products without managing underlying node operations. These tools collectively reduce the operational complexity for enterprises, supporting broader adoption of Lightning payments.
Breez SDK
[edit]The Breez SDK offers developers a comprehensive solution to integrate self-custodial Lightning payments into applications. It abstracts the complexities of channel management, liquidity provisioning, and node operations, facilitating seamless Bitcoin payment integration.
Nodeless (Liquid Implementation)
[edit]The Nodeless implementation leverages the Liquid Network, a Bitcoin sidechain, to facilitate Lightning payments without requiring users to manage channels or operate nodes. Key features include:
- Submarine Swaps: Utilizes submarine and reverse submarine swaps to convert between Liquid BTC (L-BTC) and Lightning Network sats, enabling seamless fund movement between networks.
- Protocol Support: Supports various payment protocols, including BOLT11, BOLT12, LNURL-Pay, LNURL-Withdraw, Lightning Address, and on-chain BTC addresses. [20]
- Multi-Asset Support: Offers compatibility with assets like USDT on the Liquid Network.
- User Experience: Eliminates the need for channel management and setup fees, providing a frictionless experience for end-users.
Native (Greenlight Implementation)
[edit]The Native implementation integrates with Blockstream's Greenlight, a cloud-based, non-custodial Lightning node service. This setup provides each user with a dedicated Lightning node, managed in the cloud but controlled by the user's device. Key features include:
- Dedicated Nodes: Each user operates a personal Lightning node hosted on Greenlight's infrastructure, ensuring autonomy and security. [21]
- Protocol Support: Facilitates payments via BOLT11, LNURL-Pay, Lightning Address, and on-chain BTC addresses.
- Integrated Watchtower: Includes a built-in watchtower service to monitor the blockchain for potential fraud, enhancing security.
- Fiat On-Ramps: Supports third-party fiat on-ramps, allowing users to convert between fiat currencies and Bitcoin seamlessly.
- Developer Tools: Provides SDK bindings for various programming languages, including Kotlin, Swift, Python, and React Native, facilitating integration across platforms.
Voltage
[edit]Voltage is a Lightning-as-a-Service (LaaS) provider that launched in 2020. Its mission is to provide enterprises with a Lightning Network solution that enables the settlement of real-time payments with near-zero fees, enabling organizations to send and receive payments while creating new experiences and business models[22]
Lightning Dev Kit (LDK)
[edit]LDK is a flexible Lightning implementation with supporting modules. It provides a multi-language native API, allowing developers to run a Lightning node on mobile, web, hardware security modules (HSMs), Lightning Service Providers (LSPs), or existing infrastructure.
Amboss Technologies
[edit]Amboss harnesses machine learning, including reinforcement learning on network graphs, to develop intelligent tools for the Lightning Network. With over five years of data-driven insights, Amboss drives network growth and unlocks new opportunities as Bitcoin scales globally.[23]
Strike
[edit]Strike is a mobile payments app that enables instant transactions via the Lightning Network. It facilitates swift, peer-to-peer micropayments in Bitcoin, aiming to make digital assets more accessible to the general public.[24]
Wallets
[edit]Currently the Lightning Network is supported in Electrum,[25] Cash App,[26] ACINQ Phoenix, Blue Wallet, Misty Breez, Klever Wallet, and others.
Use cases
[edit]Since its inception, Bitcoin has been envisioned as a peer-to-peer electronic cash system. A notable early example occurred in May 2010 when Laszlo Hanyecz paid 10,000 BTC for two pizzas[27]—an event now noted annually as Bitcoin Pizza Day [28]. As Bitcoin’s value and network congestion increased, its use shifted more towards a store of value. However, the development of the Lightning Network (LN) has revitalized Bitcoin’s potential for fast, low-cost, and scalable payments.
The Lightning Network is utilized globally for various practical applications:
- Micropayments and Everyday Commerce: LN enables low-fee transactions suitable for small purchases, from buying digital goods to paying for coffee. Innovative use cases, such as triggering actions like feeding goats via Lightning payments, have demonstrated its versatility.
- Grassroots Economic Initiatives: In El Zonte, El Salvador—also known as "Bitcoin Beach"—local communities began using LN to transact in Bitcoin for groceries, school fees, and services, showcasing how LN could support circular economies in developing regions.
- Global Remittances and Cross-Border Payments: Lightning offers an efficient alternative to traditional remittance services by enabling near-instant global transfers without intermediaries or high fees.
- Mobile and Point-of-Sale Payments: Mobile wallets integrating Lightning make it feasible to use Bitcoin in physical stores and daily purchases.
- Tipping and Content Monetization: LN is also used for micro-tipping on social media platforms and blogs, offering an alternative to traditional ad-driven or subscription-based models.
In Brazil, several communities have adopted the Lightning Network to enhance local economies:
- Rolante, Rio Grande do Sul: This town has become a leader in Bitcoin adoption, with over 200 businesses accepting Bitcoin payments. The initiative, led by the "Bitcoin é Aqui[29]" project, has transformed Rolante into a model for integrating cryptocurrency into daily life.
- Jericoacoara, Ceará: Known as "Bitcoin Beach Brazil," this coastal village has implemented LN to facilitate transactions among residents and tourists. The community has also engaged in educational initiatives, such as distributing Bitcoin wallets to students and teachers.
- Santo Antônio do Pinhal, São Paulo: Inspired by Rolante's success, this town has embraced Bitcoin adoption, with numerous establishments accepting Bitcoin payments via Lightning Network , aiming to promote cryptocurrency tourism.
- São Thomé das Letras, Minas Gerais: This tourist destination has integrated Lightning Network into its local economy, with businesses accepting Bitcoin and educational programs teaching residents about cryptocurrency.
As Lightning infrastructure continues to improve, adoption is expanding across both emerging economies and industrialized nations, reinforcing its role in Bitcoin’s usability for day-to-day transactions and financial empowerment.
References
[edit]- ^ "lightningnetwork/lnd". GitHub. Archived from the original on 2022-07-12. Retrieved 2021-05-04.
- ^ Russo, Camila (March 15, 2018). "Technology Meant to Make Bitcoin Money Again Is Now Live". www.bloomberg.com. Archived from the original on 2018-03-31. Retrieved 2019-12-12.
- ^ "MIT and Stanford Professors Are Designing a Cryptocurrency to Top Bitcoin: Unit-e". fortune.com. January 17, 2019. Archived from the original on 2021-10-06. Retrieved 2019-12-12.
- ^ Popper, Nathaniel (August 15, 2017). "Bitcoin price surges after deal on software updates". The Boston Globe. Archived from the original on December 13, 2019. Retrieved December 12, 2019.
- ^ "Lightning Network whitepaper 0.5 by Joseph Poon and Thaddeus Dryja". 28 February 2015. Archived from the original on 2015-02-28.
- ^ a b Lee, Timothy B. (2018-02-04). "Bitcoin has a huge scaling problem—Lightning could be the solution". Ars Technica. Archived from the original on 2021-09-01. Retrieved 2019-12-12.
- ^ Xie, Teresa (16 October 2023). "Bitcoin's Lightning Network Scaling Solution Seeks Resurgence After Losing Way". Bloomberg. Archived from the original on 13 May 2024. Retrieved 13 May 2024 – via Yahoo News.
- ^ Browne, Ryan (6 February 2019). "Jack Dorsey says the 'only' cryptocurrency he owns is bitcoin". CNBC. Archived from the original on 15 August 2021. Retrieved 17 December 2019.
- ^ Hackett, Robert; Roberts, Jeff John; Wieczner, Jen. "The Ledger: Cryptocurrency Custody, QuadrigaCX Quagmire, CEOs Pass Bitcoin 'Torch'". Fortune. Fortune Magazine. Archived from the original on 1 June 2022. Retrieved 17 December 2019.
- ^ a b c d e Antonopoulos, Andreas (2017-07-21). Mastering Bitcoin (2nd ed.). O'Reilly. pp. 297–304. ISBN 978-1491954386.
- ^ "The Lightning Network Could Make Bitcoin Faster—and Cheaper". Wired. ISSN 1059-1028. Archived from the original on 2021-11-25. Retrieved 2019-12-12.
- ^ "MIT, Stanford Academics Design Cryptocurrency to Better Bitcoin". Bloomberg. Archived from the original on 2021-10-06. Retrieved 2019-12-12.
- ^ Burchert, Conrad; Decker, Christian; Wattenhofer, Roger (August 29, 2018). "Scalable Funding of Bitcoin Micropayment Channel Networks" (PDF). Royal Society Open Science. 5 (8): 180089. Bibcode:2018RSOS....580089B. doi:10.1098/rsos.180089. PMC 6124062. PMID 30225004. Archived from the original (PDF) on 28 June 2019. Retrieved 17 December 2019.
- ^ Antonopoulos, Andreas; Osuntokun, Olaoluwa; Pickhardt, René (January 4, 2022). "How the Lightning Network Works". Mastering the Lightning Network: A Second Layer Blockchain Protocol for Instant Bitcoin Payments (1st ed.). O'Reilly Media. ISBN 978-1492054863. Archived from the original on July 1, 2022. Retrieved May 16, 2022.
- ^ Sztorc, Paul (April 4, 2022). "Lightning Network -- Fundamental Limitations". Truthcoin. Archived from the original on 2024-01-17. Retrieved 2024-01-17.
- ^ "Watchtowers | Builder's Guide". docs.lightning.engineering. Archived from the original on 2025-03-16. Retrieved 2025-05-29.
- ^ "Onion Routing | blockchain wiki". wiki.btcme.com. Retrieved 2025-05-29.
- ^ Antonopoulos, Andreas; Osuntokun, Olaoluwa; Pickhardt, René (January 4, 2022). "Chapter 8: Routing on a Network of Payment Channels". Mastering the Lightning Network: A Second Layer Blockchain Protocol for Instant Bitcoin Payments (1st ed.). O'Reilly Media. ISBN 978-1492054863. Archived from the original on June 4, 2022. Retrieved May 16, 2022.
- ^ "Lightning Routing". Chaincode, Github. Retrieved 29 May 2025.
- ^ "About Breez SDK - Nodeless - Breez SDK - Nodeless". sdk-doc-liquid.breez.technology. Retrieved 2025-05-29.
- ^ "Breez.Sdk 0.6.7". www.nuget.org. Archived from the original on 2025-04-19. Retrieved 2025-05-29.
- ^ "How Voltage uses Google Cloud to scale its Bitcoin Lightning Network". Google Cloud Blog. Retrieved 2025-05-29.
- ^ "Amboss Launches Rails: Empowering Bitcoin Yield and Lightning Network Growth". www.tmcnet.com. Retrieved 2025-05-29.
- ^ Kim, Crystal (2024-04-24). "Bitcoin-focused payments app Strike opens in Europe". Axios. Retrieved 2025-05-29.
- ^ "How to accept Bitcoin on a website using Electrum — Electrum 3.3 documentation". electrum.readthedocs.io. Retrieved 2025-02-28.
- ^ Perez, Sarah (2022-01-18). "Block's Cash App adopts Lightning Network for free bitcoin payments". TechCrunch. Archived from the original on 2022-10-15. Retrieved 2022-10-15.
- ^ Russo, Camila (February 27, 2018). "Crypto Legend Who Bought Pizza With 10,000 Bitcoin Is Back At It". Bloomberg. Archived from the original on 2022-02-23. Retrieved 2019-12-12.
- ^ "Bitcoin Pizza Day: Celebrating the 10,000 BTC Pizza Order". Investopedia. Retrieved 2025-05-29.
- ^ "A maior cidade de pagamentos em Bitcoin está no Brasil - MIT Technology Review". MIT Technology Review - Brasil (in Brazilian Portuguese). 2023-12-01. Retrieved 2025-05-29.