The Lightning Network has enabled users to make faster, cheaper Bitcoin transactions through a second layer on top of the blockchain network. It also allows users to make low-value transactions more frequently without paying expensive fees. So, how does this network work?
How Does the Lightning Network Work?
The Lightning Network consists of multiple smart contract channels that work on the Bitcoin blockchain network. This allows Bitcoin to become a means of payment for lower-value products and services. As such, transactions do not need to be announced to the entire network of Bitcoin nodes. Below we will explain in more detail how this system works.
The Lightning Network protocol provides a peer-to-peer payment network between two parties, like a customer and a coffee shop. Once established, this payment network will allow them to send as many transactions as necessary that are almost instantaneous and cheap. The network works as a network ledger that records transactions and enables users to make small payments without affecting the underlying Bitcoin system.
The payer must lock in a certain amount of Bitcoin to create a payment network. Once the Bitcoin is locked in, the recipient can submit an invoice for the amount due. If the payer wants to keep the channel open, they can load Bitcoin continuously. By using the Lightning Network’s channel, both parties can transact with each other. When compared to regular Bitcoin transactions, some transactions are done in different ways. For example, if two parties open and close a channel, they will only know about it through the main blockchain network.
Both parties can transfer unlimited amounts of Bitcoin to each other without performing transactions on the main Bitcoin blockchain network. Since all transactions in the Lightning Network do not require validation from any nodes, this strategy deliversmuch faster transactions. The Lightning Network allows transactions that combine two channels from each party involved. Consequently, it results from two payment systems merged into one.
Later, when both parties decide to stop the transaction, they can close the channel. All the information in the channel will be recorded into a single transaction and sent to the primary Bitcoin network as transaction data in its main ledger. This ensures that all small transactions are made into a single transaction on the main network to avoid spam and require less time and resources to validate. Without payment channels, small transactions would block large transactions, slow down the network, and fill up blocks with nodes that need to be validated.
For example, suppose Ari goes to a coffee shop daily and wants to pay for it using Bitcoin. He could choose to make a small transaction for each cup of coffee, but due to Bitcoin’s scalability issues, the transaction would take an hour to validate. Ari would also have to pay expensive Bitcoin network transaction fees for such a small transaction. Using a Visa card for tiny transactions works because the network can process 24,000 transactions every second. In contrast, the Bitcoin network, on an average day, can only validate seven transactions per second.
With the Lightning Network, Ari can open a payment channel with the coffee shop owner to make transactions. This channel will record every coffee payment and the owner will continue to receive the compensation. The transaction will be cheap and possibly even fee-free and instant. Then when the Bitcoin in the channel runs out, Ari can put in more Bitcoin to replenish it. When he decides to stop the transaction and close the channel, all transactions will be recorded together for inclusion in the main Bitcoin blockchain.
The Lightning Network uses smart contracts between two parties. The rules that the two parties agree on are encrypted into the contract upon creation and are irreversable. The smart contract code also ensures that existing contracts will be executed automatically. Once all the requirements are filled, such as when a buyer pays a certain amount for a coffee, the contract is automatically executed without a third party validating it.
This network allows its users to conduct transactions without restrictions outside the blockchain network. We can trust off-chain transactions to support the blockchain when we remember they end up on the main network after closing the payment channel. The main network is the arbiter of all transactions. While off-chain protocols have their own ledger, it always integrates back to the main chain, which is the core of the Lightning Network design. Off-chain protocols can only exist if there is a main chain to build.
With the Lightning Network, there are no restrictions on how big the network will grow and how many transactions can happen every second. If this protocol can open millions of channels in the future, the network could theoretically process an unlimited number of transactions per second. But at the moment, the network is still limited; only 10 million channels can be opened each year. In the future, developments could make it easier for multiple participants to share a single channel, allowing for greater network expansion.
Limitations of Bitcoin’s Broadcast Network Method
With the explanation of the Lightning Network above, we see that individual consumer payments make much more sense using channels. With Bitcoin’s basic system every transaction is broadcast to everyone. Broadcasting each small transaction, such as a coffee purchase, to all nodes worldwide would be expensive and the system would not be effective. The Lightning Network replicates the concept of cash on top of Bitcoin’s base layer.
Any network trying to increase the number of transactions by making radical changes through increasing block capacity or speed using a base layer orientated to broadcast to all nodes on the network does not make sense. Changes can be made to the system’s basic rules at any time with the approval of the handful of large companies running the nodes. Thus all aspects of the future system, including the coin supply or who censors transactions, become changeable. Maintaining user privacy with such a system is difficult, as various parties can track your net worth and payment history.
The only way to make reasonable improvements to the transaction accounting system effectiveness, and avoid compromising decentralization, is to use a different approach on the outer layer of the blockchain system, such as the Lightning Network. Users can then choose their solution, depending on their particular needs.
How Can You Get Started with the Lightning Network?
If you want to start making transactions using the lightning network, you will need to transfer BTC to a digital wallet connected to the network. There are several types of wallets you can choose from out there. Some well-known choices include the ‘custodial’ type and the ‘non-custodial’ type. Here are the differences:
Custodial Wallet: some examples of this digital wallet are Strike, Blue Wallet, and Wallet of Satoshi. This type of wallet is suitable for beginners because they have simplified the system to send and receive Bitcoin using your private key. If you forget or lose your password, you can reset it easily.
Non-Custodial Wallet: examples are Muun, Breez, Phoenix, and Zap. This type of wallet is more suitable for experienced traders. They use a protocol where the user has complete control over their wallet. Only the user has access to their private keys. If you lose your password, you will lose access to it. If you are interested in using this wallet, make sure you know how to back up your data so that you don’t lose access if something happens.
Pros of the Lightning Network
The obvious pros of the Lightning Network are faster and cheaper transactions, enabling micropayments in ways that were never possible. Without the Lightning Network, users would have to pay high fees for simple transactions and then wait an hour or more for them to be validated. Longer wait times occur for smaller transactions, as miners choose to validate larger transactions because they get bigger rewards for doing so.
The Lightning Network is connected to the Bitcoin blockchain, which exists as a layer on top of it. The connection means that the Lightning Network still benefits from Bitcoin’s security protocols. Users can then choose the main blockchain for larger transactions and swap to the off-chain Lightning Network for smaller ones without worrying about security. The Lightning Network’s payment channels also provide private transactions, as onlookers cannot peek at each transaction, but rather only at the entire package.
Cryptocurrency enthusiasts have also tested atomic swap, exchanging one cryptocurrency for another without using a third party, or crypto exchange. Atomic swaps are more valuable than crypto exchanges, as they offer an almost instant exchange of assets with few to no fees for transfers between wallets.
Cons of the Lightning Network
One must get a Lightning Network-compatible wallet to utilize it. While finding a wallet that works with the Lightning Network is easy, users need to fund it from a traditional Bitcoin wallet. The initial transaction from a traditional wallet to the Lightning Network comes at a cost, reducing the user’s assets for the transaction fee. Once the funds are in the Lightning Network wallet, users must lock in their Bitcoin to create a payment channel.
Sending Bitcoin between wallets can be a hassle and very expensive, which is one of the turn-off factors for new users. However, some wallets can manage on-chain and off-chain payments without paying fees, and convenience tends to increase over time.
Supposeone of the participants in a payment channel decides to withdraw some funds. In that case, they must actively close the channel and receive the Bitcoin back before using it. Users can’t spend a small amount of money and leave the channel open. Even closing or opening a payment channel requires both participating parties to make an initial transaction called a routing fee. While opening a channel is a simple concept, all these additional payments make the process more expensive than many potential users realize.
However, one of the biggest issues with the Lightning Network is offline transaction fraud. If one of the participants in a payment channel chooses to close it while the other party is offline, the former can steal the funds. When the latter party finally comes online, it’s too late to do anything about it. The scammer can remain offline with no way to contact them.
In addition, the Lightning Network suffers from bugs such as stuck payments, which are outgoing transactions that are difficult to verify. The Bitcoin network will refund stuck payments, but it can take days to get them. When it comes to verification, valid transactions are prioritized over stuck ones.
Finally, even if the Lightning Network solves all its problems, there is still the case of regulators. Regulators may have a hard time understanding the Lightning Network to enforce proper protocols. If regulators struggle, crypto users may also struggle to use the Lightning Network. Even if regulators understand the protocol, they may not allow the Lightning Network because of its anonymity. Anonymous transactions may scare legislators. They can only see transactions completed after users close their payment channel, not individual transactions made within the channel.