What is Lightning Network? How does Lightning Network work?

195

Bitcoin scaling is the biggest issue from the first day of bitcoin launched and it is still an unsolved issue but there are a lot of things tried by the bitcoin developers and all of them got failed to solve the scalability problem of bitcoin.

In February 2015, the First time in history two developers Joseph Poon and Thaddeus Dryja published a Lightning white paper that aimed to solve the scalability problem of the bitcoin.

This lightning whitepaper described the new type concept of payments that is known as the lightning network.

After two years of testing the first beta of the lightning network launched for public use on 15 March 2018.

Lightning network is one of the best solution that can really solve this big problem of scalability of bitcoin.

In this article, we will discuss the following topics:

  • What is Lightning Network?
  • Why Lightning Network?
  • How Lightning Network Works?
  • Features of Lightning Network
  • Advantages of Lightning Network
  • Limitations of Lightning Network
  • Conclusion

1 What is Lightning Network?

Basically, the lightning network is a multi-signature bitcoin address operated by two parties through the smart contract where Hashed TimeLock Contract (HTLC) is used with bi-directional payment channels.

Lightning Network is the second layer protocol that can be developed in the original Blockchain of any cryptocurrency like Bitcoin, Litecoin. It works off the chain means Original Blockchain do not aware of the transaction happened on Lightning Network.

The lightning network is layer 2 protocol and where layer 1 is the blockchain. Lightning network is not the blockchain but it runs on the top of the blockchain.

The lightning network works peer to peer between two users without any private involvement of third parties.

2 Why Lightning Network?

Cryptocurrencies like Bitcoin suffered from scalability problems due to a block-size limit to certain transactions. The bitcoin blockchain can handle a maximum of 5-7 transactions per second which creates network congestion when more transactions occurred as the network grows.

One solution to this problem is to increase the Block size in Blockchain by which network capacity increased.

Most of the Cryptocurrencies used this block size increment technique to remove the transaction handling problem.

But Bitcoin developers did not find this technique as a reliable solution for long term mass adoption. So they created a new type of protocol known as the lightning network.

In 2015 Thaddeus Dryja and Joseph Poon were described the Lightning Network first time in the whitepaper.

Check the current release of the whitepaper.

3 How Lightning Network Works?

Lightning Network is a separate layer, also known as layer protocol on the original blockchain.

To understand lightning working you have to understand some key points :

  • Lightning network and Original Blockchain network are different and none is aware of the other one. Both are separate networks but the blockchain network gets updated of the contract on the lightning network from time to time in order to avoid fraud.
  • Lightning works peer to peer through the channel between them. Channel is a type of connection between two parties for sharing information and it may be internet, radio waves, satellite connection. All transactions occurred peer to peer and there is no relation with another world.
  • It is just like a sharing of money between two parties by using receipts instead of real money by making that total amount of money locked.

Let’s talk about the lightning network working with an example.

Assume, Monty and Anna wanted to use the lightning network for doing Bitcoin payments between each other.

Then Both have to open a channel between them on the lightning network.

In order to open a channel, they have the need to transfer their BTC on that channel, let Monty deposit 0.01 BTC and Anna deposit 0.007 BTC.

Now they have opened a channel between them with a capacity of 0.017 BTC (0.01 + 0.007).

They both transferred their BTC on lightning means they transfer BTC from the main chain to the lightning chain (which is a multisign bitcoin address). So they have to pay the same fee as normal fee required on the main chain as this first transaction occurred on the main chain.

After the transfer of BTC from the main chain to lightning they both get the same amount ratio of BTC on the lightning network.

Now Monty has 0.01 BTC and Anna has 0.007 BTC on the lightning network.

Let, then Monty wanted to send 0.001 BTC to Anna through their lightning channel. Then this transaction now occurred on the lightning network and the main chain does not know anything about this transaction. This transaction occurred instant as fast as their connection with zero fees.

After this transaction, Monty has 0.009 BTC and Anna has 0.008 BTC.

Let if they wanted to close their channel as they do not want to do more payments between them. So they can close the lightning channel.

When Lightning Channel closed the last updated wallet balance is checked and that amount is transferred back to their connected bitcoin wallets addresses ( wallet addresses from they deposit BTC). This transaction will occur on Mainchain.

So Monty has 0.009 BTC and Anna has 0.008 BTC last checked balance. Then Monty got 0.009 BTC in his connected Bitcoin address and Anna got 0.008 BTC.

This is how Lightning Network worked. Hope you enjoyed it.

4 Features Of Lightning Network

The developers are working hard and developing a lot of features in the lightning network to make it easy to use and adaptable worldwide. Some of these important features are shown below:

  • Atomic Swaps
  • Eltoo
  • Lightning Loop
  • Watchtowers
  • Submarine Swaps
  • Neutrino
  • Channel Factories
  • Rendezvous Routing
  • Splicing
  • Trampoline Payments
  • Turbo channels

5 Advantages of Lightning Network

  • High Throughput: Lightning Network provides very high throughput of millions of transactions per second. It can easily and efficiently handle millions of transactions instantly on the network.
  • Micro-Payments: You can send very small amounts such as 100 satoshis on the lightning network which is not possible on the main blockchain of the bitcoin. The lightning network allows you to transfer very small values instantly with a negligible very low fee.
  • Better Security: The lightning network is designed to have very strong security. The network itself is very secure and provides a secure way to do transactions.
  • Better Privacy: The main focus of lightning developers is also to provide better privacy to users. The only sender and receiver know about their transactions occurred between them and there is no third party involves in it, hence all the transactions going on the lightning network are totally private between the sender and receiver where others do not have any idea of it.
  • Scalability: As lightning network can handle the millions of transactions per second instantly with low fee and better security makes it easy to scale for mass adoption for regular bitcoin payments. It also reduced the small transaction traffic burden at the on-chain bitcoin network.
  • High Transaction Speed: There is no transaction confirmation required from the network and only sender and receiver confirmation needed for the transaction on the lightning network. It makes the transaction as fast as the connection between the sender and the receiver. That’s why the lightning network has high transaction speed almost instant.
  • Low Transaction Fee: Nowadays transaction fees also become a little bit problem for bitcoin users but here in lightning network users don’t need to pay that much fee. Users need to pay 1-2 sats fee that is almost negligible when doing a transaction on the lightning network. Also, there is no fee (not even a small amount like 1-2 sats) is paid if you opened a channel with your friends where you both have their own lightning nodes and doing transactions between yourself.
  • Instant Payments: All the transactions through the lightning network occurred instantly in microseconds and it does not depend on the network traffic.
  • Pure Anonymity: All the transactions on the lightning network is shared by onion routing by default and do not even record on the blockchain even blockchain is unaware of these transactions. It makes the lightning network purely anonymous for users as there is no way to trace or disclose the identities that using and doing transactions on the lightning network.

6 Limitations of Lightning Network

  • Offline Transactions: The main problem of using the lightning network is that users can not do payments if the receiver is offline. Both the sender and receiver must be online together in order to make payments between themselves using the lightning network.
  • Large Amount Transfers: Lightning Network is designed to handle the small or medium amount transactions and can’t handle the large amounts of transfers that limit the use of the lightning network.
  • The Complexity of Channels and fee problem: Every user needs to open a lightning channel with someone that he/she wanted to do transactions with. Also, users have to fund the newly opened lightning channel by doing an on-chain transaction that usually takes a high fee in order to do payments using the lightning network. On the other hand, when the user closed the lightning channel then the last transaction has also occurred on the on-chain network which also takes a high fee. The opening and closing of channels create complexity for new users.
  • Cold Wallets Integration: As we know the lightning network is currently in the early stages of development that’s why only a few hot wallets are available to use and store funds that are not much safe. There is no integration of the lightning network with cold storage wallets like Ledger, Trezor, Coldcard, Opendime and Core wallet.
  • Centralization of Hubs: Large bitcoin holding companies can create a hub by opening a large number of lightning channels in order to earn commission by enabling users to transfer payments through these channels. It can lead to the centralization of the lightning network that is almost similar to the centralization of mining that you can see in the Bitcoin cash mining.

7 Conclusion

Lightning Network is just a smart contract-based network on multisign addresses and worked on the basis of the routing protocol. It can solve the scalability issue of Bitcoin as it provides very high throughput with millions of transactions per second.

There is a lot of developments going on in the Lightning Network but it is still in early stages where people suffered from a lot of bugs from time to time. Lightning network is still in the testing phase, so please only use it with small amounts as you may lose your funds due to bugs.

Developers are working hard in order to make the Lightning Network feasible for the mass adoption, it is a possibility that we may see the lightning network in full beta version in the next 4-5 years but it is just an expectation.

Lightning network website: https://lightning.network/

Lightning on GitHub: https://github.com/LightningNetwork

Also READ: Lightning Loop Alpha launched, a new feature on Lightning Network