The Lightning Network is one of the most important additions to the Bitcoin blockchain. It stamped out the idea that cryptocurrencies can never achieve practical use in real life. It also set the stage for almost instant crypto transactions, and it may soon become the primary platform for BTC transfers. The cryptocurrency community first found […]
The Lightning Network is one of the most important additions to the Bitcoin blockchain. It stamped out the idea that cryptocurrencies can never achieve practical use in real life. It also set the stage for almost instant crypto transactions, and it may soon become the primary platform for BTC transfers.
The cryptocurrency community first found out about the Lightning Network in 2015. At that time, Joseph Poon and Thaddeus Dryja published a draft of the whitepaper and presented it as a solution for the Bitcoin scalability problem.
If you are new to cryptocurrency, understanding layer-2 protocols may be difficult. We hope that this guide to how the Lightning Network works and how to use it will clear the air for you.
What is the Lightning Network?
The Lightning Network spurred from the growing demand for a resolution of the Bitcoin scaling issue.
Bitcoin was the first cryptocurrency to see the light of day, and while it revolutionized the financial world, it showed functionality problems from the start. One of them is the limited rate at which the network can process transactions, and which results from the block size limit parameter.
Without a reliable solution, this issue would result in the gradual increase of transaction fees and in the delayed processing of transfers that cannot be fit into a block. It would make Bitcoin unscalable and question its potential mass adoption.
In recent years, the community has suggested several answers to the Bitcoin scalability problem. One of them came in the form of a hard fork, Bitcoin Cash. However, the demand for a simpler solution that would not defeat Bitcoin’s initial purpose remained.
Bitcoin required a protocol that would enhance transaction speed without sacrificing trustless operation, and this is where the Lightning Network entered the stage.
How the Lightning Network Solves Bitcoin’s Limited Scalability
The Lightning Network enables the creation of a payment channel through a funding transaction on the Bitcoin blockchain. Users can operate on this channel, which works as a second layer for fast micropayments without delegating funds custody and by paying low or no fees at all.
The network also enables users to access multiple channels at the same time through nodes. Once the payment channel closes, the final transaction set is added to the blockchain. This way, the participants are not limited by Bitcoin’s block size limit parameter, and they can still engage in lightning-fast bidirectional payments with all the benefits of the trust protocol.
Here is how the Lightning Network helps Bitcoin users trade:
- The participants in a transaction agree on a smart contract or a multi-signature contract that creates a payment channel on the network
- Once they are on the layer 2 protocol, the participants can communicate with each other without notifying miners
- The participants can engage in an unlimited number of microtransactions through the payment channel
- After the final transaction ends, the payment channel closes and the transaction becomes part of the blockchain below it
A payment channel closes only when it meets a condition preset by the participants, and which may include:
- A specific period in which the transactions can take place
- A specific number of transactions that can take place
There are various types of payment channels that participants can use, out of which the Hashed Timelock Contracts (HTLC) channel is the easiest and most popular one. The benefits of using HTLCs include:
- A participant can forfeit a transaction and send back the payment to the other participant
- It enables participants to exchange cryptos on a blockchain for different cryptocurrencies on another chain, a practice also known as an atomic swap
The other forms of payment channels are Nakamoto High-Frequency Transactions and the Spillman-Style Payment Channel.
What Makes the Lightning Network Scalable?
The Lightning Network can combine millions of payment channels to create a global web for microtransactions between an equally high numbers of users.
Here is a simple example of how it works!
Let’s say that we have 3 users (A, B, and C) who access the layer 2 protocol by creating payment channels. User A agrees on a payment channel with User B and on a different payment channel with User C. At this point, User A becomes a node that facilitates microtransactions between User B and User C without the two having to agree on a payment channel between them.
Now, let’s consider that Users A, B, and C each have 100 unique payment channels with other users. They all create a wide web of interconnecting nodes that enable fast and potentially free microtransactions based on the trust protocols that smart contracts establish between them.
With the continuous revolutionizing impact that Bitcoin has on financial markets, the Lightning Network may facilitate daily transactions of millions of dollars once BTC reaches mass adoption.
What Makes the Lightning Network Secure?
Mutual trust between users is one of the fundamental principles of the Bitcoin blockchain that also defines the Lightning Network. However, in a time when digital hacks reach $4 billion per year, it is difficult to imagine that none of the participants to the network will try to run off with all the money inside the channels.
Fortunately, the Lightning Network benefits from a high level of security given by:
- Smart Contracts
As we’ve mentioned before, one of the conditions for participants to access the layer 2 protocol is to sign a smart contract.
Smart contracts represent conditional agreements between two parties that automatically self-execute when they meet their requirements. A smart contract does not need a central authority to ensure that none of the parties will interfere with the forthcoming transaction.
Another condition for engaging through a payment channel asks participants to agree on a specific period in which the transactions can take place. Also known as a timelock, this transaction period ensures that none of the participants can exit the channel while the clock is still ticking.
- Asymmetric Revocation Commitments
To make matters even more secure, the Lightning Network enables users to agree on penalizing commitments before entering the protocol. Some of these commitments may go as far as users losing the entire balance of their wallets if they attempt to cheat the network in any way.
Is the Lightning Network Expensive?
When you consider the fees that miner nodes practice, the transaction fees on the Lightning Network seem like a true bargain.
In time, as the number of blockchain miners drop the number of Lightning Network users will increase. Once all the Bitcoins will be mined out, the miners may remain on the chain and capitalize on the increasing transaction fees on the Lightning Network rather than from mining.
How to Use the Lightning Network
The Lightning Network functions on a straightforward mechanism, which you should grasp once you start trading on it. Here is a simple example of a transaction involving users A, B, and C from the previous showing:
- We already established that User A acts as a trusted node between Users B and C even if a payment channel doesn’t exist between these two.
- If User B wants to make a payment towards User C, it will have to go through User A.
- At this point, User C generates a SHA256 hash code, which it then sends to User B.
- User B puts a condition for the transaction, which states that the only user who can receive the payment is the one who has the hash code that User C generated.
- User B sends the payment to User A, who immediately forwards it to User C. User A cannot hold the payment for himself because he doesn’t have the hash code.
- User C sends the hash code to User A, and in return, it receives the payment.
- User A forwards the hash code to User B at which point the transaction completes.
The Lightning Network in 10 Flash Statistics
Here are some representative data about the Lightning Network at the time of this writing, according to 1ml.com:
- The current capacity of the Lightning Network is 936.63 BTC
- There are 12,665 nodes and 36,017 channels in the world
- The top locations in the world are
- Paris (FR) – 231 nodes and 370 channels
- Toronto (ON, CA) – 89 nodes and 730 channels
- Ashburn (VA, US) – 79 nodes and 5,619 channels
- North America features 1,132 nodes and 15,018 channels
- Europe has 1,446 nodes and 15,018 channels
- Asia has 161 nodes and 1,017 channels
- The United States has 884 nodes and 13,557 channels
- Germany has 365 nodes and 2,741 channels
- France has 239 nodes and 1,409 channels
- Canada has 239 nodes and 1,409 channels
The Lightning Network Benefits
If you are not sure yet about the efficiency of the Lightning Network, here are some of its benefits that may convince you:
- Quick Microtransactions
The average duration for a Bitcoin transaction is between 10 minutes and 1 hour. With the Lightning Network, microtransactions can take place in a matter of seconds, thus reducing the overall time of a major transaction significantly.
- Low Transaction Costs
The average microtransaction fees on the Lightning Network vary between 1 and 10 satoshi ($0.00008 — $0.0008), which are much lower than the Bitcoin transaction fees that average around $2.5 at the time of this writing.
- Less Pressure on the Bitcoin Blockchain
Since many users access the layer-2 protocol to complete microtransactions, the Bitcoin blockchain does not have to deal with constant user agglomeration.
- Atomic Swaps are easier to perform through the Lightning Network
- Constant protocol improvements should take place with the ongoing increase of the community
- Seamless user experience makes it easier to access for people who are new to Bitcoin
The Lightning Network Disadvantages
- Unlike in the case of Bitcoin transactions, for payments on the Lightning network, both parties involved in them have to be online
- Participants on the Lightning Network must keep their assets in hot wallets, which are more susceptible to hack attacks
- The Lightning Network is still in its development stages, and several bugs and issues must be addressed before mass adoption occurs
Wallets to Use on the Lightning Network
If you have opted to participate in the Lightning Network, you will require a reliable wallet for your transactions. Here is a list of the best wallets for the Lightning Network that will make layer 2 microtransactions safe and easy:
Lightning Network Alternatives
The Lightning Network is not the first form of peer-to-peer payment protocol built on a blockchain. A similar solution comes from Litecoin.
The Litecoin Lightning Network is also in its developing stages, but it is lagging far behind Bitcoin’s similar network. It currently features over 220 nodes and more than 600 channels worldwide.
The Bottom Line
The jury is still out on how long it will take before the Lightning Network hits mass adoption levels. It all depends on its evolution, and how many investors choose to trade on the layer 2 protocol.
The Lightning Network may have a few bugs to solve now, but it promises much in the long run. It’s convenient scalability, secure and fast transfers, as well as the low-cost payment fees should take cryptocurrency transactions to the next level.
The 2020 Bitcoin halving and a gradual decrease in the value of the rewards that miners get for their work should increase interest in the most reliable solution to the Bitcoin scalability problem so far.