To fully understand how the blockchain works it is important that we describe it as a register. The register containing several pages that is referred to as “blocks”, and each of these pages contain transactions. If all pages (blocks) on the register (chain) are filled with transactions it must be added to the register before another page is recorded.
Before any block can be added on the chain, processing will be done to ensure that all parties agree on the information recorded on the chain. It will take about ten minutes for each block to be processed. This has been the major problem of the Bitcoin network.
A transaction fee is paid by users who want to speed up their block processing. These fees are not fixed and it depends on how much each user is willing to pay to speed up the processing speed. These reasons mentioned above are why blockchains are slow and also expensive. These problems have been solved with the adoption of the Lightning Network.
Solution – Lightning Network
Lightning Network was designed with the idea that not all transactions should be recorded on the blockchain. Certain transactions can be recorded on the chain and not on the blockchain. For users who carry out transactions often, a payment channel is created.
These payment channels allow these users to transact among themselves without being recorded on the blockchain. This channel can be open for hours, and the only time the blockchain is touched is when the channel is about to be closed. Two users of the blockchain will create a channel that will require them to sign on any fund that will be spent. The transaction carried out by these two users are not broadcasted on the blockchain.
These channels are created to ensure that blockchain transactions are rarely required. Since the blockchain will not be touched often, transactions on it will happen as fast as possible.
Lightning Network has been described by people as a second layer payment mechanism that operates on stable blockchains like that of Bitcoin and other cryptocurrencies.
Before its launch, it was described as Bitcoin’s mechanism for solving its scalability issues. It supports the peer to peer payment systems and it is done through the creation of payment channels. This reduces the risk of third party interference and also minimizes the delegation of funds. Lightning Network was launched in December 2017.
Payment channels have been referred to as safety boxes where two users deposit equal sums of money and lock it. This deposit of funds is recorded on the “Open Transaction” section of the blockchain. Once it is recorded, a payment channel is created between the two users. These funds are locked in a box to ensure that one individual does not spend it without the knowledge of the other. To transfer funds, a promise of ownership is needed.
To further breakdown the point, payment channels refers to the pooling of funds together, then with the promise of ownership, the pooled-in funds is transferred in the already agreed manner. To explain better, let’s say Joe and John decides to create a payment channel, and they both decide to pool in about 20 BTC each into the channel or common box.
If Joe decides to send 5 BTC to John, what does he do? First of all, he will have to transfer or send a promise of ownership for five of his BTC kept in the channel to John. Once it is confirmed, and the common box where the funds were stored is opened, John can will be able to make claims to 25 BTC while Joe will be left with 15.
This payment channels can also be used to transfer funds to people who are not on the same channel with you.
For example, if Joe and John have created a payment channel, but Joe decides to transfer funds to Phil who has a channel with John (but does not have a channel with Joe). Joe will ask John to transfer a specific amount to Phil through their channel. If the funds are transferred, Joe will have to reimburse John.
With the creation of these channels, transactions will be carried out off the blockchain to ensure that it is fast. Payment channels penalize users who do not cooperate.
This was designed to divide total funds that are gotten from each channel that is opened and it is done based on the accurate allocation. To better understand how this works, let’s say Joe has 2.0 mBTC which is equal to 0.002 Bitcoins and 200000 satoshis. While John on the other hand owns the same number of Bitcoins. The duty of the commitment transaction is to divide the value of each BTC as was done above.
It allows numerous users to be able to participate in single transactions. It does this by acting as a single entity and using a multiple signature key.
Limitations of the Lightning Network
One of the major problems of the Lightning Network is the fact that if one participant drops the channel, it will automatically be closed and then settles on the blockchain. Also, the nature of the Lightning Network means that it cannot watch over every node in the event of fraud, that was why a mechanism called “watch towers” was created. This mechanism helps to monitor all nodes in each payment channel.
Recently, an attack was made on the Lightning Network platform and about 200 nodes on payment channels went offline.
Lightning Network has proven to be a real solution to the scalability problem that is faced by numerous blockchains, hosting companies and other companies who accept bitcoin payments. The introduction of payment channels also ensures that transactions between users are fast and secure.
Also, the higher transaction fees that was experienced prior to its launch has become a thing of the past. It is interesting for users to know that a new version of the Lightning will be out in short time, this was announced by Elizabeth Stark the CEO.