A Look at the Bitcoin Lightning Network 

Introduction 

Cryptocurrencies have completely changed the world, with Bitcoin and Ethereum, the two largest and most popular cryptocurrencies seeing an exponential increase in transactions on their network. Of course, this does not mean that other cryptocurrencies in the space have not seen an increase as well. However, both Bitcoin and Ethereum saw a greater rise in popularity.  

Bitcoin and Ethereum on top of green gems.
Photo by Executium on Unsplash

However, this increase in popularity did expose a flaw in the technology behind these two cryptocurrencies. In a way, the burgeoning popularity made them acknowledge the flaw and work towards rectifying it. What is this flaw? It’s the flaw of scalability.  

Cryptocurrencies are pretty unique, with decentralization ensuring that they cannot easily be hacked or shut down. Therefore, individuals can use them to carry out transactions without a third party or a central authority. However, thanks to decentralization and the responsibility of the network split between nodes spread around the world, it invariably results in a lower than desired throughput. If the throughput is low, then the transactions per second (TPS) are also low, a significant hindrance for a cryptocurrency and a technology looking to appeal to the masses.  

So, what is being done to overcome the obvious limitation of scalability and a low number of transactions? Several scalability solutions have been developed and implemented to improve the number of transactions a network can process per second. We’re going to look at one such solution, the Lightning Network.

Lightning strikes over water.
Photo by Philippe Donn from Pexels

What Is the Lightning Network?

The Lightning Network was first visualized by Thaddeus Dryja and Joseph Poon to solve Bitcoin’s scalability issues and has been in development since 2015. It is one of the most essential and critical innovations in the current crypto space. The Lightning Network sits on top of an existing blockchain, facilitating transactions. While it is not exclusive to Bitcoin, we shall be looking at it from Bitcoin’s point of view.  

The Lightning Network is an “off-chain” or “Layer-2” solution that allows individuals to carry out transactions off the main blockchain. It also does not require the blockchain to record every single transaction. It operates completely independent of the Bitcoin network, having its node and software. However, the Lightning Network still communicates with the main Bitcoin blockchain. Using the Lightning Network requires the creation of special transactions.  

Currently, three teams are working in tandem on the Lightning Network, and these are Blockstream, Lightning Labs, and ACINQ. The three teams also take constant feedback from the Bitcoin community.

Office with people.
Photo by Cadeau Maestro from Pexels

How Does the Lightning Network Work?

Let us take a closer look at how the Lightning Network functions. First, Person A and Person B need to transfer money to each other quickly and with minimum transaction fees. They can do this by setting up a channel on the Lightning Network. To carry out the transaction, Person A and B will need a multi-signature wallet that they can access with their respective private keys. Once the wallet is set up, they can deposit the cryptocurrency into it.  

Once the cryptocurrency has been deposited into the wallet, Person A and B can perform unlimited transactions between them. The transactions are essentially the funds that are stored in the multi-signature wallet. If Person A transfers a certain amount to Person B, the ownership of the amount transferred is also transferred. Once this happens, the private key is used to sign and update the balance sheet. Once the channel is closed, the actual distribution of funds occurs, and the most recently signed balance sheet determines who gets what amount.  

The transactions are also recorded on the Bitcoin blockchain only after the channel between the two transacting parties is closed and the final balance recorded. Thus, the Lightning Network allows users to carry out multiple transactions off the main chain and record them as a single transaction. The hope is that once the Lightning Network is widely used, there will be no reason to create a dedicated channel to carry out transactions. Instead, users will be able to carry out transactions using existing, connected channels, with the system finding the shortest possible route to complete the transaction. However, it is worth noting that while the Lightning Network sits on top of the blockchain, it does not have the same level of security as the blockchain. As a result, off-chain networks will be used for microtransactions, while larger transactions will still be carried out on the main chain.  

Let’s understand what is behind the scenes that ensures the smooth functioning of the network.

Game pieces forming a network.
Photo by Pixabay from Pexels

Multisignature Address

Multisignature or Multisig addresses is an address that allows multiple private keys to spend from it. When creating the multisignature address, you need to specify how many private keys can spend the funds and how many are required to sign off on transactions. Let’s simplify this a little. If someone creates a 1 of 5 scheme, this means that five keys can produce a valid signature, while just one key is required to spend the funds. Similarly, a 2 of 3 scheme would mean that out of three keys that can produce a valid signature, two are required if the funds are to be spent.  

A lightning channel requires a 2 of 2 scheme, which means that only two private keys can sign the address, and both are necessary to carry out a transaction.

Hash Timelock Contracts (HTLCs)

Hash Timelock Contracts or HTLCs is the mechanism that enforces the contract between the two parties involved in the transaction. This ensures that if one of the two parties has any malicious intent, the aggrieved party can safely access their funds. An HTLC combines hashlocks and timelocks to ensure the security of all payment channels. First, let’s understand what a “timelock” and a “hashlock” are.  

A “hashlock” dictates that you can spend the funds by proving that you know a secret. The sender hashes data and includes the hash as part of the transaction sent to the receiver. The receiver needs to have the original data (the secret) that matches the hash attached. Only then can the funds be spent. A “timelock,” as the name suggests, disallows the party from spending the funds for a designated time.

Why Is the Lightning Network Important? 

The Lightning Network has gained prominence as a viable solution to Bitcoin’s scalability issues. This is because changes in a humongous network are risky, with the prospect of bugs and hard forks a constant threat. With so much at stake, it is incredibly risky to make any drastic changes to the ecosystem. The Lightning Network functions on a separate layer, away from the main blockchain, allowing for enhanced flexibility. This means that even if a process or function goes awry, it will have zero impact on the Bitcoin network. This is because off-chain or Layer-2 solutions do not impact the existing security of a protocol, giving users an option to transact both on the off-chain or the main chain.

Padlock on keyboard.
Photo by FLY:D on Unsplash

How Does the Lightning Network Solve Bitcoin’s Scalability Issues?

The Lightning Network has not been fully implemented on the Bitcoin network. However, enough individuals have confirmed that it indeed goes a long way in solving the issues faced with faster transaction speeds and lower transaction fees. There have been reports of users making payments on the Bitcoin testnet and the transaction being confirmed in under two seconds with almost negligible transaction fees.  

However, users must temper any expectations that Bitcoin’s Lightning Network will solve Bitcoin’s issues in one fell sweep. There will be a couple of hiccups along the way. The first one is that after funding the channels, the balance could diminish when payments are made, triggering potential liquidity issues on the network. Liquidity issues could be tackled by creating a payment channel that is open and funded at all times.  

The second potential issue could be that funding channels could tie up funds that could have been used for other purposes. This could prompt users to keep minimal balances in the channel and top them up only when needed.

Fees Involved with the Lightning Network

Fees on the Lightning Network are a combination of two different charges. These are the routing charges for routing payment information between nodes and the transaction fees for opening and closing nodes. The fees on the network are negligible, especially when compared to the fees prevalent on the Bitcoin network.  

Why are the fees on the Lightning Network considerably lower? This is because the work done by miners and the nodes on the bitcoin network is vital and significantly more complex than the work done on the Lightning Network. Alternatively, since the plan is to use the Lightning Network frequently, the fees collected should be more than enough to compensate the Lightning Network nodes.

What Are Some Advantages of the Lightning Network?

The Lightning Network is in a very nascent stage of its development, and whether or not it is the answer to what ails Bitcoin remains to be seen, with developers still working hard to perfect it. However, if it were to be adopted and utilized in the Bitcoin community, the following would be its most significant advantages.

Transaction Fees

Transactions on the Lightning Network will take place off the main chain, which means that users will have to pay nominal transaction fees if any. However, one of the most significant advantages of the Lightning Network once fully operational is that it will enable bitcoin as a method of payment that can be used pretty much anywhere and for anything.

Bitcoin being inserted into a slot.
Photo by Old Money on Unsplash

Transaction Speed

Let’s face it, Bitcoin’s transaction fees are abysmal, with users having to wait several minutes for the confirmation of their transactions. However, waiting would be a thing of the past on the Lightning Network as it would process transactions instantly. The implementation of the network would enable the cryptocurrency space to compete with traditional payment systems such as PayPal, Visa, and Mastercard.

Atomic Swaps

Testing of cross-blockchain transactions was successful. If two blockchains have the same cryptographic hash function, users will be able to send funds from one blockchain to another without an intermediary.

Scalability

The Bitcoin Lightning Network is expected to solve the scalability issues by taking transactions off-chain. Let’s understand how transactions on the Bitcoin network work. A block on the Bitcoin network is created once every ten minutes, making it a scarce resource, which means users have to compete against other users to have their transactions included. Miners on the network give preference to transactions with higher fees attached.  

Now, this isn’t a problem on a typical day when there aren’t too many people carrying out transactions simultaneously; however, when there is more traffic on the network, users have to attach higher fees for miners to process their transactions. This is an issue specifically for transactions of lower value. This is where the Lightning Network comes into the picture. 

Lightning strikes over a city.
Photo by Frank Cone from Pexels

To use the network, users still have to pay two fees, one fee to open the channel and the other fee to close the channel. But once the channel is open, the two parties can make unlimited transactions until it is closed. Once transactions are done, all that needs to be done is to record the final state on the blockchain.  

Suppose the Lightning Network is the solution that Bitcoin is looking for. In that case, users can move their transactions off-chain, with low-value transactions carried out off-chain and block space utilized for larger transactions. This would make the Bitcoin network more efficient and accessible.

Micropayments

The Bitcoin Lightning Network makes a compelling case for micropayments. The smallest transaction that users can send in a transaction is 0.00000546 BTC. However, the Lightning Network allows users to send transactions as small as 0.00000001 BTC.  

The network is the perfect platform for micropayments that cannot be carried out on the main chain thanks to higher transaction fees. In addition, users can send as many microtransactions as they want within a channel on the Lightning Network.

Privacy

The Lightning Network also offers users a high level of privacy, with the channels on the network separated from the network. While those on the blockchain will be able to see the channel, they will not be able to tell the details of what is in the channel. The participants in the channel also have the option of making their channel private. The final state is published on the blockchain only after the channel is closed.

Padlock on computer keyboard with chains.
Photo by FLY:D on Unsplash

Security

Payments made on the Lightning Network are secure and almost invulnerable to attacks. This is because the Lightning Network utilizes onion routing for its HTLCs.

What Are Some Problems of the Bitcoin Lightning Network?

While the Lightning Network is seen as a game-changer in the evolution of Bitcoin, there are a few challenges that it has to face.

It only partially solves the transaction fee problem

A lot of users believe that the Lightning Network offers a solution to Bitcoin’s high transaction fees, with backers of the technology claiming that transaction fees will come down after implementation of the network. However, the fee charged by the cryptocurrency makes up a large chunk of the cost of the Lightning Network. There are two primary components of this cost. The first part is a fee equal to transaction charges to open and close a channel between the transacting parties.  

Even though the parties can make multiple transactions between themselves, they must first complete an opening transaction to open the channel. Once the transactions have been settled, the transacting parties need to record a closing transaction on the blockchain.  

Apart from the fee for opening and closing channels, a separate routing fee is also charged for transferring payments between channels. The belief is that the low fees of the Lightning Network will attract more users. However, if the routing fees are low as well, what incentive do the nodes have to facilitate payments. Then there is also the added possibility of businesses that adopt the Lightning Network charging fees as well.

An almost-solved Rubik's cube.
Photo by Edgar Moran on Unsplash

Being online has its drawbacks

The Lightning Network requires that nodes stay online at all times to send and receive payments. The parties involved in the transaction are also online and use their private keys to sign in. If the computer that stores the private keys is compromised, then someone could steal the coins. To address this problem, the Lightning Network does provide cold storage facilities. However, going offline is not without problems. One member of the transacting parties could perform a “Fraudulent Channel Close” and pocket all the funds.  

Malicious attacks are another problem that could lead to network congestion. If the network is congested and there is a hack, the users will lose their funds as congestion on the network would slow down the network, preventing participants from withdrawing their funds. A hacker could also create multiple channels and force expire them at the same time, overwhelming the block. The hacker can take advantage of this congestion and steal funds from the network.

Complex channels

The Lightning Network comprises channels which once established, should allow transactions to take place seamlessly. However, if the payment needs to go through multiple channels, then there is no telling what could happen. Add to that, the fees could add up if the transaction has to go through numerous channels.

Aerial view of many roads.
Photo by Timo Volz on Unsplash

Operational readiness

This could probably be counted as the main disadvantage that the Lightning Network currently faces, the fact that it is not fully operational. This can be a hindrance when it comes to gauging the full capacity of the Lightning Network and whether it can fulfill its potential.

How Can You Join the Lightning Network?

There are several ways in which users can join the Lightning Network.  

Web Wallet – This is the easiest way of accessing the Lightning Network, by using a web wallet such as the HTLC.me. The HTLC.me is a web-based wallet that allows users to make Bitcoin payments without any configurations. Both parties involved in the transaction can send funds to each other using the web wallet.  

Desktop Wallets – Users can use desktop wallets such as Zap or the Lightning-ape wallet. Both wallets use Lightning Network Daemon (LND) as the back-end client. Users need to download the latest version of the LND from their Github page to install the application on their machine.

Phone wallet – Phone wallets such as LND, C-Lightening, and Eclair help enable transactions on the Lightning Network.

Use Cases of the Lightning Network

While there are several challenges to overcome before implementing Bitcoin’s Lightning Network, there are several use cases that, if employed, could see significant developments and improvements in the network.  

Cryptocurrency Exchanges – Cryptocurrency exchanges present the most promising initial use case for the Lightning Network. Kraken has already announced that it will support the Lightning Network in 2021. Kraken will implement the network in a phased manner, starting with withdrawals first and then implementing them fully.  

Larger Payments – Initially, channel sizes on the Lightning Network were limited to 0.1677 BTC. However, the limit was removed in 2020, giving users access to larger channels and increasing the utility and the usage of the Lightning Network.  

Watchtower – Watchtowers are crucial for weeding out fraud on the Lightning Network. The Watchtower watches the network for fraudsters broadcasting “old states” or “old transactions” trying to give themselves extra funds. The Watchtower then responds by punishing or reprimanding the fraudster. Watchtowers ensure that users don’t have to continuously be looking over their shoulder when transacting on the Lightning Network.

When Is the Lightning Network Coming on Bitcoin? 

While people can still access and use the Lightning Network through the beta version, Lightning Network Daemon, when it is completely integrated with Bitcoin is still unclear. The Beta release was launched after extensive development and research. However, several implementations of the Lightning Network are being worked on by teams involved in its development.

Now you might say this still doesn’t answer your question, so let us look at some statistics. Currently, there are 21,034 nodes with 48,087 active channels. The network capacity currently stands at 1,422.09 BTC. You can access detailed statistics here.

A question mark.
Photo by Anna Shvets from Pexels

Final Thoughts on the Lightning Network

The Lightning Network could be a game-changer for Bitcoin and other cryptocurrencies. While there are a few gremlins that need to be ironed out, there is significant optimism that the implementation of the Lightning Network could propel cryptocurrencies into the mainstream. The biggest complaint against Bitcoin and other cryptocurrencies, and one that had a significant influence on the mass adoption of them, was the impracticality when it came to everyday use.  

However, with the implementation of the Lightning Network, we will see transactions become faster and cheaper, making Bitcoin usable for even everyday transactions while also easing congestion on the Bitcoin blockchain.


Disclaimer: No Investment Advice The contents of this article are for informational purposes only and are not intended as, and shall not be understood or construed as, investment advice, financial advice or trading advice. There are substantial risks associated with the trading of cryptocurrencies and you should consult with a licensed financial advisor prior to making any trading or investment decisions. Content Not Warranted The contents of this article are provided “as is” and without warranties of any kind. You bear all risks associated with the use of the content provided including without limitation, any reliance on the accuracy, completeness or usefulness of any content available within this article.

Follow us on social!