Lightning Network


The Lightning Network is a "layer 2" payment protocol that operates on top of a blockchain-based cryptocurrency. It is supposed to enable fast transactions among participating nodes and has been proposed as a solution to the bitcoin scalability problem. It features a peer-to-peer system for making micropayments of cryptocurrency through a network of bidirectional payment channels without delegating custody of funds. Lightning Network implementation also simplifies atomic swaps.
Normal use of the Lightning Network consists of opening a payment channel by committing a funding transaction to the relevant base blockchain, followed by making any number of Lightning Network transactions that update the tentative distribution of the channel's funds without broadcasting those to the blockchain, optionally followed by closing the payment channel by broadcasting the final version of the settlement transaction to distribute the channel's funds.
To perform as intended, Lightning Network required a transaction malleability fix in the layer 1 blockchain, such as Segregated Witness in bitcoin.

History

Joseph Poon and Thaddeus Dryja published a draft of the Lightning Network white paper in February 2015.
In 2017 the bitcoin community activated SegWit which enabled second layer solutions such as the Lightning Network.
On March 15, 2018, Lightning Labs CEO Elizabeth Stark announced the initial release of lnd 0.4-beta for developers, with the intent on making it available for testing purposes on the main Bitcoin network with Litecoin support. The network was endorsed by mobile payment entrepreneur Jack Dorsey.

2019 bitcoin lightning torch

On January 19, 2019, pseudonymous Twitter user hodlonaut began a game-like promotional test of the Lightning Network by sending 100,000 satoshis to a trusted recipient where each recipient added 10,000 satoshis to send to the next trusted recipient. The "lightning torch" payment reached notable personalities including Twitter CEO Jack Dorsey, Lightning Labs CEO Elizabeth Stark, and Binance CEO "CZ" Changpeng Zhao, among others. The lightning torch was passed 292 times before reaching the formerly hard-coded limit of 4,390,000 satoshis. The final payment of the lightning torch was sent on April 13, 2019 as a donation of 4,290,000 satoshis to Bitcoin Venezuela, a non-profit that promotes bitcoin in Venezuela.

Design

has referred to the Lightning Network as a second layer routing network. The payment channels allow participants to transfer money to each other without having to make all their transactions public on the blockchain. This is done by penalizing uncooperative participants. When opening a channel, participants must commit an amount. Time-based script extensions like CheckSequenceVerify and CheckLockTimeVerify make the penalties possible.
The CheckSequenceVerify Bitcoin Improvement Proposal details how Hash Time-Locked Contracts are implemented with CSV and used in Lightning: .

Benefits

There are several claimed future benefits to using the Lightning Network compared to on-chain transactions:
The Lightning Network is made up of bidirectional payment channels between two nodes which combined create smart contracts. If at any time either party drops the channel, the channel will close and be settled on the blockchain.
Due to the nature of the Lightning Network's dispute mechanism, which requires all users to watch the blockchain constantly for fraud, the concept of a "watchtower" has been developed, where trust can be outsourced to watchtower nodes to monitor for fraud.
Another limitation the Lightning Network faces is payment routing, a concept discussed below.

Routing

In the event that a bi-directional payment channel is not open between the transacting parties, the payment must be routed through the network. This is done using an onion routing technique similar to Tor, and it requires that the sender and receiver of the payment have enough established peers in common to find a path for the payment. In effect, a simple route would look like this:
The original whitepaper in reference to routing suggests that "eventually, with optimizations, the network will look a lot like the correspondent banking network, or Tier-1 ISPs".

Implementations

BOLT specifications were drafted in late 2016. Several implementations were made:
Cryptocurrency exchanges such as Bitfinex use it to enable deposits and withdrawals. Laszlo Hanyecz, who gained fame in the cryptocurrency community for paying 10,000 BTC for two pizzas in 2010, bought two more pizzas in 2018 using Lightning Network and paid 0.00649 BTC.