• What is Lightning Network

Lightning Network is a Layer 2 solution for Bitcoin, designed to enable users to pay with Bitcoin at a lower cost and faster speed under decentralization.

The earliest concept of Lightning Network is called "payment channel". Its design idea is to use transaction replacement to update unconfirmed transaction status until it is broadcast to the Bitcoin network. Satoshi Nakamoto had the idea for payment channels when he created Bitcoin in 2009, and included a draft code for payment channels in Bitcoin 1.0, which allowed users to update transactions before they were confirmed by the network. In 2013, Mike Hearn further elaborated on Satoshi Nakamoto's ideas for payment channels in the Bitcoin development mailing list.

In the following years, related solutions appeared one after another, but they did not bring much impact. Until February 2015, the white paper "The Bitcoin Lightning Network: Scalable Off-Chain Instant Payment" written by Joseph Poon and Thaddeus Dryja was released. At this point, the Lightning Network was born.

In December 2015, Gregory Maxwell proposed a scaling roadmap in a Bitcoin developer email, which prominently included the Lightning Network. This roadmap is supported by the majority of the Bitcoin technology community and is implemented in the Bitcoin Core project. This has aroused everyone's expectations for the Lightning Network.

Subsequently, enthusiastic developers built the Lightning Network’s protocol stack—BOLT. Based on this standard, the Lightning Network is compatible with Bitcoin, Litecoin (or other Bitcoin-like Tokens).

In March 2018, Lightning Labs released a beta version of the Lightning Network implementation, whose functions can support early users, marking a milestone in the development of the Lightning Network. At the same time, Lightning Labs announced that it has received $2.5 million in seed round financing, and investors include Twitter founder Jack Dorsey.

Since then, the protocols and applications related to the Lightning Network have gradually become more abundant, such as OmniBOLT, an enhanced version of the BOLT protocol, Cash APP and Strike, the payment platform that supports the Bitcoin Lightning Network, etc. After the launch of Damus, the Lightning Network once again ushered in a new breakthrough...

2. Implementation method

The core idea of ​​the Lightning Network is not complicated, that is, the transaction process is carried out off-chain, and only the final transaction result is confirmed on the chain, thereby improving the transaction efficiency of the existing Bitcoin network. Its operation method is as follows:

Both parties to the transaction establish an off-chain payment channel during the first transaction, which is essentially a ledger shared by both parties to the transaction to save transaction records. Both parties to the transaction lock a certain amount of funds in the channel, and then sign the transaction through the private key.

Fund transfers between the two parties are not carried out on the chain, but are only stored in each other's ledgers. When one or both parties decide that the channel is no longer needed, the settled balance is broadcast on the main network.

But the Lightning Network is not just a direct connection between the two parties, it can connect a large number of single channels in series to form an interconnected and vast payment network (Figure 4). In other words, assuming that C and A have a channel, C and B do not have a channel, but A and B have a channel, then C can indirectly trade with B through A, and A, as an intermediary, can charge routing fees. In the Lightning Network, the network will find the path with the fewest nodes and the least transaction fees to complete the transaction.