The Lightning Network

The Lightning Network (LN) as a concept was created by Joseph Poon and Thaddeus Dryja in 2015. The main idea behind the project is to design a payment protocol that can be used as an off-chain solution for the scalability problem faced by the Bitcoin blockchain, but the concept may be applied to other Cryptocurrencies as well.
The introduction of the Lightning Network was triggered by the limitations that not only Bitcoin but by many other cryptocurrencies are facing. Currently, the Bitcoin blockchain is only able to process from 2 to 7 transactions per second (TPS). As the cryptocurrency ecosystem grows and more people join the network, the number of transactions being broadcasted to the blockchain also increases. As the network gets more and more congested, the overall performance is compromised, which greatly reduces the practical usability of Bitcoin as global digital currency. In such a context, the LN was created as an attempt to alleviate the network congestion of the Bitcoin blockchain.
How does it work?
The Lightning Network consists of an off-chain transfer network that is being built on top of the Bitcoin blockchain. The system works on a peer-to-peer (P2P) level and its usability relies on the creation of the so-called bidirectional payment channels, through which users can make seamless cryptocurrency transactions.
After two parties decide to open a payment channel, they are able to transmit funds back and forth across their wallets. Although the process of setting up a new payment channel involves an on-chain transaction, all transactions that take place within the channel are off-chain and do not require a global consensus. Therefore, these transactions can be quickly executed through a smart contract, incurring in much lower fees and a much higher TPS rate.
In order to open a payment channel, the two parties involved need to set up a multi-signature wallet and add some funds to it. Funds that are stored on multi-sig wallets can only be accessed if the private keys of both parties are provided (two or more, depending on the case). This means that one party cannot open the wallet without the consent of the other.
As an example, let’s imagine that Alice wants to use the Lightning Network to trade Bitcoins with Bob. First, they set up a payment channel, using a multi-signature wallet. While the payment channel acts like a smart contract, the multi-sig wallet acts like a vault, where the funds to be traded are deposited. During the lifetime of the payment channel, Alice and Bob can perform as many off-chain transactions as they want.
Right after each transaction, both Alice and Bob sign and update their own copy of the balance sheet, which records the amount of coins each one has. When they are done with their transactions, they can close the payment channel and broadcast the final balance sheet to the Bitcoin blockchain. The LN smart contract will make sure they receive their Bitcoins, according to the last version of the balance sheet.
Summing up, the parties involved only need to interact twice with the Bitcoin blockchain. One time to open the payment channel and another one to close it, which means that all other transactions that take place within the channel are not directly interacting with the main chain.
Network Routing
Even if two parties do not have a direct payment channel, they are still able to send and receive Bitcoins through interconnected payment channels. That means that Alice is able to send payments to Charlie without having to create a direct channel with him, as long as there is a network route between them that contains enough balance.
So, if Alice has an open payment channel with Bob and Bob has a channel with Charlie, she can send the payment through Bob. The payment routing may involve many Lightning Network nodes, but the smart contract will automatically search for the shortest available path.
Stupid Cookies EU Law Warning
We are using technologies like Cookies and Google Analytics to show you more relevant data and improves your internet experience. We value your privacy, but if you prefer no cookies, then we suggest you do not use our site.