There is no doubt that it has proved to be quite safe and does not need any bank or financial institution in the middle but the same cannot be said when it comes to the speed.
And, this needs some immediate improvements for Bitcoin to become mainstream.
The Bitcoin blockchain is painfully slow being able to make 5 to 7 transactions per second. Other digital payment systems are much, much faster than it.
In order to fix this issue, the developers have come up with the Bitcoin Lightning Network.
This is a layer-2 solution that is built on the Bitcoin layer 1 blockchain. It increases the efficiency of the layer 1 blockchain.
The layer 2 solution is made of several payment channels that are established between the Bitcoin users and the other parties. It typically uses off-chain transaction processing.
This may seem to be a bit of a complex matter for any beginner to understand and a lot of questions may arise regarding its authenticity, working process, challenges and its merits and demerits.
Well, to get a fair idea about the Lightning Network, this happens to be one of the best places to be. This article will clear all your doubts and make you more knowledgeable.
What is Bitcoin Lightning Network?
The main idea of the Lightning Network is to move the load away from the primary blockchain to the layer 2 solution and process them there.
It is much like the branching off an express highway.
If the main highway is clogged, the traffic is diverted to these branches to keep the vehicles flowing and avoid traffic jams.
Therefore, the Lightning Network de-clutters the main Bitcoin blockchain and makes it much faster and reduces the cost of transaction.
It is simply an additional layer of the main Bitcoin blockchain that facilities off-chain transactions, which are the transactions made between parties who are not on the blockchain network.
It is due to the fact that the Lightning Network creates multiple payment channels that create the second layer, this specific network can typically facilitate a two-party transaction method in each of these channels.
This allows receiving or making payments between them.
This layer 2 solution increases the scalability of the blockchain since it manages the transactions outside the mainnet or the blockchain layer one.
However, this does not mean that the transactions that are processed in this second layer are deprived from the benefits of the dominant decentralized safety paradigm offered by the mainnet.
In fact, for all crypto coins, scalability is one of the biggest and most significant barriers that limit the widespread adoption of them.
If this scalability issue could be solved then the crypto blockchain networks would be able to handle millions or even billions of transactions per second like most of the digital payment systems such as Visa.
In this context, the Lightning Network seems to have been quite successful and have allowed the users to make instant micropayments with its off-chain processing at low cost of energy.
Still, in spite of its clear intent, the Lightning Network still seems to struggle while solving different other issues such as:
- Malicious attacks and
- Routing fees.
Talking about fees, there is a small fee involved in opening and closing a payment channel.
Add to that the routing fees are also needed to pay the nodes that are responsible to validate the transactions, though it is quite low.
Now, the question is: if the routing fee is so low then why would the nodes need such fees in the first place?
The simple answer to this question is that the miners usually do not validate small transactions since the rewards for it are pretty low.
As a result, the traders need to pay a small routing fee. It somewhat reduces the time to wait to get a transaction validated.
And, as for the malicious attacks, the bad actor can close all these small transactions at once by starting several payment channels.
All these channels then are required to get validated and as a process gets in the way of the legit transactions and thereby congesting the network.
This congestion gives the attackers a chance to pull off funds before the legit transactions are validated without letting the users know about the situation.
A brief look at the history of the Lightning Network is necessary at this point if you really want to have a more comprehensive knowledge about it.
In 2015, the Lightning Network was first proposed in a paper named “The Bitcoin Lightning Network” by two researchers, Thaddeus Dryja and Joseph Poon.
This was based on the previous discussions by anonymous creator of Bitcoin, Satoshi Nakamoto, and a fellow developer Mike Hearn who published it in 2013.
In this paper, the matter was described as an off-chain protocol consisting of several payment channels that will help two unknown parties to transfer funds without congesting the primary blockchain.
This, they said, would solve the scalability issue of the Bitcoin Network.
Their idea was substantiated with the example of Visa that could handle about 47,000 TPS that time during the holidays.
If Bitcoin blockchain has to come anywhere near this TPS or Transactions per Second, it will need to manage transactions per block worth up to eight gigabytes.
And, this was nowhere near the abilities of the existing Bitcoin blockchain network.
Initially, the Bitcoin blockchain network could handle only up to 5 to 7 transactions a second, that too if those transactions were only about 300 bytes each.
Moreover, the blocks of Bitcoin at that time had a transaction limit of only one megabyte.
Therefore, considering all this mathematics, there was very little to no room for the blockchain to handle as many as 47,000 Bitcoin transactions in one block.
Therefore, off-chain payment channels of Lightning Network were created to handle the transactions and address the scalability issue of the blockchain network.
These multiple channels processed several smaller transactions and therefore did not clutter the main network.
Dryja and Poon founded Lightning Labs in 2016 with a few other contributors.
This was the company that created the Lightning Network.
Its breakthrough was however possible due to the SegWit-based soft fork of Bitcoin in 2017.
This actually freed up a lot of space to allow accommodating more transactions into each block.
It also successfully removed a Bitcoin bug called transaction malleability that has been hindering the functionality of the blockchain network for a long time.
This bug allowed the users to lie to the network, fake transactions, and keep coins in their wallets.
The Lightning Network allowed the developers to build apps on it right away since it allowed pre-launch testing.
All these were facilitated by the power of the microtransactions of the Lightning Network.
Finally, in 2018, a beta version of Lightning Network was launched and implemented into the Bitcoin mainnet.
As you may know, the Bitcoin blockchain typically runs on the Proof of Work or PoW consensus mechanism.
This means that the validators need to use an immense amount of computing power to process transactions.
Every node or miner participating in the network needs to solve a complex mathematical puzzle to decrypt and scrutinize data and consume huge amounts of power.
As a return for their effort and computational power, the blockchain network rewards them with newly minted tokens.
There is another significant problem apart from the huge resources required to mine Bitcoin.
When new miners join the network in its current form consisting of only layer 1 mainnet, it will increase decentralization because the horizontal spread of the authenticators of the transactions will also increase.
In its current form, this will mean more energy consumption due to the additional nodes on the network.
This will slow down the already sluggish blockchain network being unable to handle the increased number of transactions.
Therefore, scaling of layer 1 was impossible.
This is where the off-chain or layer-2 steps in to take away the load and start processing some of the transactions. It verifies transactions quickly at low cost.
Therefore, the significance of the Lightning Network is quite high and its future is quite bright. In fact, the adoption of it is on the rise.
According to a report by DappRadar, there is more than $110 million in Bitcoin invested in the Lightning Network.
These include people paying for using apps, goods and services, and even gambling.
Some of the apps are very important to network usage such as the compatible wallets of the Lightning Network.
With more dedicated users, there is a chance of them becoming nodes which will expedite the transactions time of the network even further.
Keeping in mind that the Lightning Network is a detached protocol from the mainnet of Bitcoin, a different and more optimized type of wallets will be required by the users to create payment channels.
If the adoption of the Lightning Network continues to grow, the participation of more wallet developers to support the network can be expected.
The working process of the Lightning Network is primarily based on creating a P2P payment channel between two untrusted parties.
When this channel is created, the two parties can send and receive an unlimited amount of transactions.
These transactions are almost instant and inexpensive.
These payment channels act as a small ledger of its own and does not affect the mainnet of Bitcoin.
All these transactions made on the blockchain usually do not need any approval from the nodes.
Therefore, transactions can be processed pretty fast.
The nodes of the Lightning Network can route the transactions by combining each of the payment channels between the two parties concerned.
This indicates that the Lightning Network is nothing but several payment systems linked together.
Eventually, when the transaction is completed, the two parties concerned may decide to close the channel.
At that time, all of the info of the channel is consolidated as one single transaction. This is then sent to the mainnet of Bitcoin for recording.
The consolidated info of dozens of small transactions appears to be one single transaction and therefore simplifies and expedites the verification process making the main network faster.
However, there may be a few specific types of transactions that may be handled differently as compared to the ordinary transactions made on the Bitcoin blockchain.
For example, when transactions are made between two parties by simply opening and closing a channel, these are updated only on the primary blockchain.
The Lightning Network, typically, creates a smart contract between the two users taking part in a transaction.
The rules of the agreement are coded into the contract when these are created and therefore cannot be broken.
The smart contract code ensures that the conditions of the agreement are met by the two parties and fulfills it automatically without needing any third-party involvement.
The Lightning Network keeps the transactions anonymous within the payment channel when these are validated.
All that a person can see is the total value of the transfer and not each of the transactions in it separately.
Though the Lightning Network allows off-chain transactions, the mainnet always remains the arbiter of all of these transactions.
Even the distinct ledger of the off-chain protocols are integrated into the main chain which becomes the core of the design of the Lightning Network.
This means that no off-chain protocol can exist if there is no main chain available to build off.
To create an off-chain payment channel, the users need to lock a specific number of Bitcoin up with the network.
Once these coins are locked in, the receiver can bill amounts of it as necessary.
If one needs to keep the payment channel open then they will have to add coins consistently.
Now you may ask whether or not you have to create a payment channel always and make transactions in pairs.
Well, no, not always. For example, if A has an open channel with B and B has an open channel with C then A can transact with C even if there is no direct channel between them.
This simple interconnection will reduce the transaction time and cost as well.
Now, what happens when B closes the channel with C? Well, then A will also be affected and will have to create a separate payment channel with C.
A lot of such separate payment channels that are linked with each other create a web which forms the Lightning Network.
This off-chain processing of transactions in the Lightning Network is very secure because it offers all the benefits and uses the security protocols of the main layer of the blockchain.
The privacy and anonymity of the users are also maintained completely.
Challenges and Technological Advances
Bitcoin Lightning Network has gained immense popularity since its inception but there are still some significant challenges that remain.
One of the most significant issues is the scalability of Bitcoin.
Since all of the nodes or participants in the network, also called the miners, receive copies of the transactions, it can slow down the system, especially when the transaction volume is pretty high.
This latency in the processing of transactions by the network results in an increase in the fees involved in it. Lightning Network can help improve scalability of the Bitcoin blockchain, processing time, and lower the transaction fees.
Also, in order to send and receive payments through Lightning Network, the nodes need to be online all the time.
This increases its susceptibility. Using the private keys may have them compromised and result in theft of coins.
There are also some risks in making offline transactions on the Lightning Network.
One of the two parties of a payment channel may close it to pocket the funds when the other party is away.
This process is called Fraudulent Channel Close.
Though there is a time period to dispute any closure but if one party is not available for a long time, it might result in the expiration of that time period.
In such a situation, the money will be lost.
Then there is also a chance of malicious attacks as mentioned earlier.
If there is congestion in the network and it is hacked, it increases the risk of losing money.
If the attacker forces the channels to expire by creating a lot of them it will be broadcasted to the blockchain to affect the capacity of the block and overpower it.
Users will not be able to withdraw their money due to the congestion and the attackers may steal it from them.
As a result, in order to improve the functionality of the Lightning Network and make it a better payment system, there have been a lot of key improvements made in this protocol in the past years.
These improvements improve its working process and make the network more usable for the people.
Some of these significant improvements are as follows.
Activation of Taproot:
The addition of Schnorr signatures has improved the privacy aspect of Lightning Network.
Also, Taproot makes the Lightning transactions quite difficult to distinguish them from the normal Bitcoin transactions on the mainnet.
This keeps up with the transparent nature of Bitcoin blockchain in spite of the address format of the Lightning transactions being slightly different from the normal transactions.
Moreover, Taproot paves the path for PTLCs or Point Lock Time Contracts.
This connects all the nodes of the Lightning Network from around the world which allows the payments to find a path across it by hopping over various connected nodes.
This makes it harder for the bad actors to track the origin of a payment.
Inbound liquidity was a serious issue with the Lightning Network.
Users needed to find some other avenues to obtain inbound liquidity or spend money first to receive payments on Lightning.
This inconvenient requirement of the network confused the new users very much.
A lot of tools were introduced to make things easier for the users.
For example, the Lightning Pool acted as a marketplace to buy and sell liquidity which also helped in tracking them down with a better interface.
The sidecar channels also allowed the users to get the necessary liquidity from the marketplace for a fee.
Initially, only one party on one side of the channel had funds.
But the dual-funded channels allowed both parties to add funds and send and receive payments instantly over the network.
Also, liquidity ads allow nodes to advertise liquidity that are passed on to the other nodes looking to buy or sell liquidity.
Ideally, the user needs to set a closing fee while opening a channel.
But, Bitcoin processes are too volatile which means the fee set today can be either too high or too low tomorrow.
Anchor outputs implemented in the three major code implementations of the network namely LND, Éclair, and C-lightning of the Lightning Network helped to outdo these fee bumps.
Well, to some extent.
However, there were some security issues in it.
Therefore, a new fee-bumping technique was introduced which is called the Child Pays For Parent or CPFP.
However, if the nodes ignore the transaction then the fee of the ‘child’ transaction may not be bumped by the small fee of the ‘parent transaction.
This will slow down the transaction process.
The package relay project allows overcoming this issue by packaging both the child and parent transactions together.
This prevents the chances of ignoring the transactions by the nodes.
LNURL and Offers:
Usually, Lightning payments are accepted using a form of QR code which outlines the destination and amount of payments.
However, this code can be used only once. This means that, every time a Lightning transaction is to be made, it needs generating a new invoice.
This issue was somewhat overcome by the ad hoc standard LNURL which allowed using the same invoice to receive multiple payments.
Another proposal is also made called the ‘Offers.’
This proposal offered a new way to send recurring payments over the Lightning Network by implementing the C-lightning code of the network.
The reliability of payments made over the Lightning network is another issue that is resolved by the new routing method, especially for larger payments.
These payments need to go through a lot of nodes before it reaches its final destination.
All these nodes may have some built-in privacy which hides the balance allocation of the channels.
This can make it quite difficult to find a suitable path to send larger payments all the way smoothly to the final destination.
Typically, the average capacity of the Lightning channel is about $2,033.
Developers are trying to find out a cheapest route to make such transactions in terms of cost but it might be a path that will fail.
Therefore, a new approach is followed and it is based on the size of these channels in the path.
With all these improvements made, the working process of the Lighting Network is improved further and it has made using the network quite easier, more private and reliable.
Pros and Cons
As it is evident from the discussion above, there are some significant advantages as well as a few disadvantages of using the Lightning Network.
As for the advantages, the list includes:
- Faster transaction processing
- Cheaper transactions
- Ability to make micropayments and
- Safety and security ensured by the strong security protocols of the main Bitcoin blockchain.
The most significant benefit is that use of smart contracts ensures fulfillment of contracts without the need of a third party.
As for the disadvantages of using the Lightning Network, some of them are:
- Need for a compatible wallet
- Need to make deposit only with Bitcoin
- Need for a protocol interaction fee while opening a payment channel
- Need to close all open channels to unlock the coins tied with them when funds are required
- Chances of offline scams and frauds and
- Existence of bugs.
However, the benefits offered by the Bitcoin Lightning Network are much more in comparison to the demerits in it.
Therefore, it is quite prudent to use it especially when you want to make small payments and do not want to wait for a long time to get them approved by the nodes participating in the network.
Moreover, given the fact that the developers are trying hard to resolve the issues in it, and also has been quite successful in resolving a few of them, it makes it all the more feasible to use the Bitcoin Lightning Network.
The Bitcoin Lightning Network helps in making micropayments quickly. This concept has changed the functionality of the Bitcoin blockchain.
However, it cannot resolve all issues related to Bitcoin transactions, as pointed out in this article.