What is the Lightning Network?

As the Bitcoin network developed, it became clear that the capacity of this system may not cope with the loads. And the more people connected to the blockchain, the more likely it is. And by 2015, the situation assumed alarming promotions - transactions had to wait for days to confirm, and the commission had seriously increased. Implementation of the SegWit protocol somewhat “offloaded” the channels, but did not solve the problem completely. Something more radical was needed.

In 2015, Joseph Poon and Faddus Dryya proposed an original solution - Lightning Network. Its meaning was to transfer the function of collecting information about transactions and their verification from Bitcoin itself to the second-level protocol, which is built on top of the main one.

How it should work

The main point of lightning network is the creation of many payment channels through which transactions outside the Bitcoin network can be done using the funds stored in it. At the same time, it will be necessary to interact with the main protocol only two times - at the time of opening the channel and transferring a certain amount of funds and the Bitcoin blockchain to it, and at the time of closing, in which information on all transactions carried out during the operation of the channel is entered into the blockchain in a large single block with his participation.

A payment channel is created between several specific users on the basis of smart contracts existing in the network. They create something like a common cryptocurrency wallet where they transfer some amounts of cryptocurrency necessary for work. Each transaction is certified by both parties to the process, so the question of mutual trust is no longer valid - without the consent of all parties, it is impossible to withdraw the desired amount from the wallet. In addition, this reduces the load on the network because it no longer requires the collective execution of the consensus algorithm.

Since the Lightning Network is an official protocol, there is no doubt that each of the participants using the payment channel and having sent a transaction report at the end of this process will be credited with the required number of bitcoins.

Routing

A direct payment channel, of course, is good, but there are alternatives. The Lightning network, through the use of smart contracts, can select the most efficient and shortest roundabout route. Yes, this may require the participation of a large number of nodes, but there will still be a result. The main thing is that there should be a sufficient balance of funds in the received payment channel.

Advantages

Disadvantages

Conclusion

In theory, everything looks very good. However, with real attempts to integrate the Lightning network and the current Bitcoin protocol, began some problems. Significantly enough, since the planned official launch, scheduled for March 15, 2018, was postponed indefinitely.