The Lightning Network is supposed to be a game changer for Bitcoin.
It is a fundamental part of Bitcoin going mainstream and being used for day to day purchases.
The Lighting Network can be hard to understand, but today we will answer what Bitcoin's Lightning Network is, why it is needed, how the Lightning Network works, and what are its advantages and disadvantages.
What is the Lightning Network?
The Lightning Network allows users to complete Bitcoin transactions away from the main Bitcoin blockchain.
The Lightning Network’s are called off-chain transactions because they do not happen on the main Bitcoin blockchain. Even though the transactions are taking place on the Lightning Network, it is still able to take advantage of Bitcoin's security.
The Lightning Network is a secondary layer on top of Bitcoin. Layers are a way to categorize blockchain networks. Bitcoin is a layer 1, which is responsible for sending and receiving transactions over its network. The Lightning Network is a layer 2 protocol. The goal of a layer 2 is to speed up those transactions and help make the layer 1 blockchain more scalable.
You can learn more about blockchain layers
Why is the Lightning Network Needed?
The Lightning Network’s goal is to make Bitcoin faster by speeding up transactions, increasing scalability, and reducing the cost per transaction.
People want Bitcoin to be a great digital currency that you can spend anyway in the world. However, transactions on Bitcoin are extremely slow. Bitcoin can only process about 7 transactions per second. To put that into perspective Visa processes around 65,000 transactions per second.
So, there are more than 7 people spending Bitcoin in any given second, then the next transactions have to wait until the next second, and so on until it’s minutes until a transaction fully processes.
Lots of little transactions can bottleneck the network. Big transactions, like 1 Bitcoin or more, are a little bit more rare than the small transactions just like buying a house happens less than buying a coffee. There could be thousands of small transactions for every large transaction.
On top of that, miners are more likely to validate larger transactions first because they will receive a higher reward for doing so. There is less of an incentive for miners to validate microtransactions, so they get pushed behind the larger transactions, making them take even longer.
No one wants to wait around for minutes, or even hours, for a transaction to process while buying coffee, and Bitcoin can’t just “get faster” without causing some issues, so a solution was needed.
And that’s why the Lightning Network was created. It will handle most of Bitcoin’s microtransactions (less than 0.168 $BTC), group them up, and send them to Bitcoin’s blockchain as one big transaction.
A single channel, which we will get into in a minute, on the Lightning Network can handle around 250 transactions per second, which is 35 times faster than Bitcoin.
At the Lightning Network’s best, it can probably handle around 1,000,000 transactions per second.
How Does the Lightning Network Work?
Now we know that the main goal of the Lightning Network is to increase the speed and scalability of Bitcoin, let’s learn how the Lightning Network does that.
The Lightning Network uses something called payment channels in order to directly connect users with each other. Once a payment channel is open, users can send an unlimited amount of cheap transactions to each other.
For example, you can open up a payment channel with a coffee shop to send them Bitcoin for a coffee almost instantaneously. You do not have to wait for the transaction to be sent to the main Bitcoin blockchain.
Payment channels are created using smart contracts
, which are just programs on the blockchain that automatically activate when certain conditions are met.
In order to open a payment channel, users must commit a certain amount of Bitcoin. The amount used to open the channel is the amount that is able to be spent. Users can always add more if they need to.
For example, if two users open a channel with each other and each add 1 BTC, then the total amount of Bitcoin that can be transferred between them is 2 BTC.
Now, you don't have to open another channel for each person you want to transact with because payments can easily go through multiple channels. User 1 can easily transact with User 3 if they both have a payment channel open with User 2. This means that large companies can open multiple channels and allow users to transact with hundreds or thousands of other users without having to open a direct channel with any of them.
Once users are done transacting with each other, they can choose to close the channel. When a channel is closed, the final result of the transactions is recorded on the main Bitcoin blockchain.
That means that two users can make unlimited transactions with each other and only the final total of those transactions when the channel is closed will appear on the actual Bitcoin blockchain.
Advantages of the Lightning Network
The Lightning Network addresses many of Bitcoin’s problems and has many advantages.
The main advantage, and the point of the Lightning Network, is that it speeds up transactions and increases the scalability of the Bitcoin blockchain. As stated above, Bitcoin can only handle about 7 transactions per second, and the biggest transactions take priority because they offer better rewards for miners. The Lightning Network allows users to easily and quickly transfer Bitcoin to each other. This is huge for Bitcoin if it ever wants to be used by the world as a payment method.
A second advantage of the Lightning Network is reduced fees. According to the Bitcoin website, in April of 2021 a single Bitcoin transaction could cost about $50 in fees. However, in August 2021 a transaction cost around $2.50. The more demand, the higher the fee. Either way, no one is going to use Bitcoin if it costs as much to send the money as it does to purchase the coffee. The Lightning Network will help small transactions be nearly free.
Since users are able to send multiple transactions over a single payment channel, and only the total of these transactions is reported to the Bitcoin blockchain, the Lightning Network will free up a lot of the transactions happening on Bitcoin’s blockchain. This means that Bitcoin will use far less energy because miners don’t have to validate as many transactions. Currently, Bitcoin is the worst cryptocurrency for the environment
, due to the amount of energy it consumes.
Disadvantages of the Lightning Network
The Lightning Network is not on by default. So, even if I send you a tiny amount of Bitcoin that transaction will still happen on Bitcoin’s blockchain. In order to actually use the Lightning Network, you have to have a compatible wallet. Not every wallet is compatible, and though you can easily find a wallet, there are just not too many choices. Not to mention, you have to send Bitcoin to this new wallet, which would cost a fee.
Another problem with the Lightning Network is that in order to use the Bitcoin you have received from someone else, you have to close the entire channel instead of being able to just pull out a fraction of the funds. Both opening and closing a payment channel costs a fee.
The biggest problem with the Lightning Network is potential scams and vulnerabilities of the network. Things like stuck payments, improperly closing a channel, attacks that cause the channel to not process transactions, purposely congesting the network in order to steal funds, and going offline before closing a channel are all big potential problems for the Lightning Network.
Luckily, even though these problems could theoretically happen, so far no one has been able to exploit the Lightning Network.
Is The Lightning Network Being Used?
Yes! Even though Bitcoin's Lightning Network is relatively young and still being worked on, there have been many uses of it already.
In a few countries, some businesses allow you to pay with Bitcoin using the Lightning Network. These transactions are as fast as normal payment methods, like a credit card, which allows customers to be in and out with their goods without having to wait for any kind of block confirmations.
The main country that the Bitcoin Lightning Network is used in is El Salvador. This is also one of the current best countries for cryptocurrency
. El Salvador allows their citizens to use Bitcoin to buy and sell goods because Bitcoin is legal tender there. The government created the Chivo wallet, which is compatible with the Lightning Network.
Another large use of the Lightning Network comes from the social media platform, Twitter, where users can send and receive Bitcoin as a tip. It would be unheard of for users to tip in whole bitcoins, but small amounts between $1 and $5 are quite common. These microtransactions are a perfect use of the Lightning Network.
Speaking of Twitter, the founder, Jack Dorsey's company, Block, which is in charge of Cash App, allows users to send and receive Bitcoin through the app using the Lightning Network. Now users can easily pay friends for things like dinner or coffee using Bitcoin.
Lastly, a large exchange called Paxful will allow its users, who are mostly in developing countries, to send and receive Bitcoin with each other using the Lightning Network, which reduces the fees needed to transfer money. In developing countries, these fees can be quite expensive, not because they cost more, but because money is more scarce in these areas. Fees can cost them a big chunk of their daily amount earned.
As the Lightning Network and Bitcoin grow and become more popular, more and more companies will allow payments using this network.
Bitcoin can only process 7 transactions per second, so the Lightning Network is the solution to Bitcoin’s speed and scalability problem.
The Lightning Network works by allowing users to open payment channels directly with each other. While a channel is open, users can send and receive as many transactions as they want. When the users close the payment channel, the final amount of the transactions is recorded on Bitcoin’s blockchain.
Some advantages of the Lightning Network are increased speed and scalability, reduced fees on small transactions, and reducing the amount of energy that Bitcoin uses.
Disadvantages include needing a compatible wallet, having to close the channel to receive funds, and potential bugs and exploits of the network.
The Lightning Network is currently used by a few wallets, as well as a few major companies like Cash App and Twitter, and countries like El Salvador where Bitcoin is legal tender.
Now that you know all about the Lightning Network, you can learn about other real world uses for blockchain