When the Bitcoin large-scale adoption discussion occurs, it fails due to low transaction speed. So, to solve this issue, the Layer 2 Lightning Network makes cryptocurrency possibly even faster than mainstream payment processors.
Usually, before being confirmed by miners, Bitcoin transactions sit in a memory pool (mempool). The network sometimes faces dramatic activity spikes because of the intensive trading and countless transactions. And that makes the mempool congested.
The mempool congestion results in a tremendous number of transactions waiting to be included in the next block. And at times like this, miners prioritize larger transactions with greater fees. So, users who casually spend $50 worth of Bitcoin find themselves compelled to pay very high fees to record their transactions promptly.
While Bitcoin’s network usually confirms transactions every 10 minutes, your transaction can take several days to be approved if you don’t pay a high enough fee during busy times.
Therefore, the Lightning Network proposes a solution to bring high scalability into the Bitcoin discussion.
What is the Lightning Network?
The Lightning Network can be defined as a set of rules, a protocol, if you will, that is designed to handle micropayments.
It works as a second off-chain layer that records small transactions inside a dedicated channel, similar to a soft fork. After all the micropayments occur, the Lightning Network will broadcast the final settlement on the main chain.
The Lightning Network appeared for the first time in Joseph Poon and Thaddeus Dryja’s whitepaper in 2015 as a system allowing decentralized high-volume payments using Bitcoin.
In 2016 the two founded Lightning Labs. And together with Blockstream and other crypto developers, they launched the Lightning Network in 2018.
And although it all started with the goal of making Bitcoin significantly more scalable, the protocol is designed in such a manner to allow more than one version. So, the Lightning Network can be adapted for virtually any cryptocurrency out there. And thanks to the BOLT protocol (Basis of Lightning Network), every version can be interoperable with the others.
Lightning Network works as a layer 2 solution for Bitcoin
Introduced in 2016 and released in 2018, Bitcoin Lightning Network proposes a system in which small transactions don’t need to be recorded on Bitcoin’s Blockchain but off-chain.
The layer 2 off-chain focuses on Payment Channels between two users that open an off-chain direct channel.
The channel remains open, and the two users can send payments back and forth as they like without the data overloading the main blockchain. This way, users can transfer funds as quickly as their wallets can communicate.
Once the two users want to conclude their business, they close the channel and broadcast a final closing transaction on the main blockchain that settles all previous transactions.
Think of this system as two people writing on a paper how much they owe each other. Once they conclude, they go to the bank to make the final transaction.
Lightning Network Payment Channels
So, when opening a payment channel off-chain, the involved users make a deposit on the layer 1 blockchain in a multi-signature wallet address that acts as a security deposit. The deposit has to be equal to or larger than the value that will be transacted.
If one of the users wants to back out of the transaction at any point, he can simply take his deposit without consulting the other user. They are only updated on the main blockchain.
The transactions are signed on the off-chain ledger stating what amount was transferred to whom.
Once the transaction is concluded, the signed ledger can be closed on the main blockchain, and the deposits will be returned according to the new balances.
Regardless of the number of transactions that happened on the off-chain, the blockchain will only show 2 transactions: one for opening the payment channel and making a deposit and one for settling the final transaction.
The fraud protection mechanism
After a transaction is signed, if any user tries to pull out his deposit, he will lose all his funds in favor of the honest user. This is to discourage participants from trying to cheat.
The Routing Nodes
Following the fundamental way the Lightning Network works means that you would have to deposit funds with each new person you want to transact with.
That’s not the case, as the lightning network allows users to connect to people through intermediary channels.
So, let’s say person A wants to send some BTC to person D through the lightning channel. In this case, person A doesn’t have to open a new direct channel but to find their path. So, if A is connected to person B, B to C, and C to D, person A can reach person D through B and C’ channels.
This network effect employed by the lightning network makes the system globally scalable.
Lightning Network is activated on Bitcoin
Technically, the mainnet of Bitcoin Lightning Network was launched in 2018. However, there are dozens of code vulnerabilities, although it is fully operational.
That’s why many believe the current Bitcoin Lightning network is only a beta.
Despite all that, prominent exchanges such as Kraken, Bitfinex, and Bitstamp have started supporting the Lightning Network. Even the El Salvador government has introduced a wallet utilizing the Lightning Network protocol while allowing citizens to use other Bitcoin Lightning wallets. And in terms of usage, as of December 2022, there are around 12,000 routing nodes and 84,000 channels worldwide.
Does BTC Lightning Network have fees?
Bitcoin miners have two sources of income:
- The reward from creating a new block which gets lower with every halving;
- The fees from the transaction confirmation.
Therefore, some fear that Bitcoin mining will stop being profitable because of the Lightning Network.
And although it looks like The Bitcoin Lightning Network will take away the fee-based income source, that’s not the case.
The on-chain will broadcast an opening transaction and a closing transaction. So, the confirming transaction confirmation will still stand. But the network won’t overload with countless tiny transactions.
To make BTC friendly to casual users, a small $50 transaction can take place off-chain. After 10 transactions, the channel can be closed at a less busy time and broadcast for $500 with a small fee.
The Routing Fee Economics is quite complicated regarding Bitcoin Lightning Network transaction fees. Depending on the nodes and the length of the route you choose, you can pay no fees or a small fee for an instant transaction. The routing nodes establish the fees, which pile up depending on your route. The fees are either fixed, like 1 Satoshi per transaction, or a percentage of the amount transferred.
Pros and Cons
The Lightning Network is not perfect, but it solves the scalability issue that most cryptocurrencies face.
The fees are considerably smaller on the Lightning Network, allowing users to use Bitcoin for small casual spendings.
The instant transactions brought by the Lightning Network’s direct channels will help users settle transfers simultaneously without awaiting confirmation for the smallest spendings.
The insane scalability proposed by the Lightning Network supposes that the Lightning Network will be able to handle heights of at least 1 million transactions per second.
The Lightning Network has code vulnerabilities. Although the mainnet was launched in 2018, it’s still buggy and can be intimidating for the average BTC holder. On November 1, all Lightning Network LND node operators received an emergency update after a severe bug caused LND nodes to fall out of sync chain. The network has faced its second critical bug in less than a month.
The complexity of channels can get overwhelming. If you do not open a direct channel to another user but use intermediary channels, you will obtain a route formed by several routing nodes. Although you chose the route, the fees still pile up, and sometimes it can feel more expensive using the Lightning Network than the main blockchain.
The Lightning Network is quite centralized. You can only send your transaction through channels with a larger deposit than the amount you send. So, that makes the traffic go through a few custodial intermediaries with large-cap channels. It improves the performance, but as it is right now, the Lightning Network will suffer tremendously if the custodians decide to close the channels for any reason.