• Blogs
  • What is a Lightning Network, and how does it work?

What is a Lightning Network, and how does it work?

What is a Lightning Network, and how does it work?
Author: Rakshita Jain
10-Jun-2022

Key takeaways

* A lightning network is a mode to perform off-chain Bitcoin transactions through building payment channels between users.

* A lightning network allows faster transactions of Bitcoin at lower fees.

* The payment channels of the Lightning network are bi-directional, so both parties can send and receive payments through it.

* Researchers Joseph Poon and Thaddeus Dryja proposed the lightning network.

* The capacity of the Lightning network is increasing continuously.

As its name suggests, a Lightning network is developed to create lightning-fast transactions of Bitcoin. It is one of the latest technologies proving as a stepping stone for making the bitcoin transactions more scalable and fast. 

You can think of it as some temporary sideways to lower the highway traffic. While this example is not making it any simpler for you to understand the lightning network, it pretty much sums up the basic idea behind the Lightning network. The below blog will clear the rest of your doubts.

What is a Lightning Network?

A Lightning Network is a mode of performing transactions of a cryptocurrency from one address to another without verifying it from the blockchain. It is made by creating payment channels between users so that they can transfer a crypto asset to each other directly. Transactions performed through a lightning network do not reflect in the blockchain database.

Let's start understanding it from the beginning.
Generally, a number of network nodes verify a crypto transaction, and then the transaction (On-chain) gets completed. The user who raises a transaction request has to pay a fee for every transaction. 

With the ever-increasing popularity and adoption of cryptocurrencies, a huge number of transaction requests come to the Bitcoin blockchain every second. It creates congestion in its network as the validation process of on-chain transactions is time-taking. It has been the biggest challenge in the scalability of the Bitcoin network for years.

To solve this issue, a Lightning network helps complete a few small and insignificant transactions without validating them from the blockchain. It does so by creating multiple micropayment channels between parties or bitcoin users. This way, the parties can make or receive crypto payments directly from each other without informing the main blockchain every time.

How does Lightning Network work?

Like the bitcoin blockchain, a lightning network also consists of nodes that run the Lightning network software. These lightning nodes transact with each other directly through payment channels. These bi-directional payment channels mean both parties can send and receive payments. Each lightning channel has a fixed crypto capacity. 
When two lightning network participants decide to open a Lightning channel, they deposit a Bitcoin in a unique digital wallet. This wallet operates with multi-signature addresses and is called a Multisig wallet.

This transaction of Bitcoin deposition in a multisig wallet gets recorded and validated in the Bitcoin blockchain. Once done, a Lightning channel opens up. This channel allows an unlimited number of instant Bitcoin transactions between its participants.

For example, let's assume that two users, A and B, create a Lightning network. They both deposit one bitcoin each in their multi-sig wallet. Now, 

 * User A transfers 0.5 Bitcoin to B through this lightning channel. So their shared balance updates in a way that 0.5 BTC (1- 0.5) belongs to A and 1.5 BTC (1+0.5) belongs to B after the transfer. 

 * Then again, User B transfers 0.2 BTC to A, and their updated shared balance will become 0.7BTC (0.5+0.2) for A and 1.3 BTC (1.5-0.2) for B.

Similarly, their shared balance continues updating without updating in the bitcoin blockchain.

When both A and B complete all their transactions and decide to close their transaction pathway, they can close this lightning channel after the Bitcoin blockchain validates their final balance change. 

This way, multiple bitcoin transactions between A and B can happen without undergoing validation and paying transaction fees each time. 

How do blockchain record the Lightning Network transactions?

The Bitcoin blockchain only records the transactions in opening and closing a Lightning network. All the transactions that take place between the opening and closing period of a payment channel are handled by the Lightning network. This process would stay the same whether A and B transacted a million times or a few times because they are transacting the same fund multiple times with each other. 
Hence, the lightning network handles these transactions so that the bitcoin blockchain can complete other unique transactions.

What is Lightning network capacity?

When we talk about Lightning network capacity, it means the total number of bitcoins locked in the Lightning Network (LN).

Since its launch, the capacity of the Lightning network has been demonstrating an upward trend. If we talk about the latest numbers, the Bitcoin lightning network has increased by 1000 in the past year. It attained an all-time high of 3915.776 BTC as of June 2022.

What is the history of the Lightning network?

A bitcoin developer Mike Hearn published Satoshi Nakamoto's explanation of payment channels in 2013. Later, the lightning network was proposed by researchers Joseph Poon and Thaddeus Dryja, who published a white paper about the Lightning Network on January 14, 2016. Two years later, they launched the first lightning network version on Bitcoin in March 2018 with the help of Lightning Labs, a blockchain engineering lab.

Lightning Labs is a company that works towards developing and adapting the Lightning network. 

What is the speed of Bitcoin's Lightning Network?

A Lightning Network can complete 1 million transactions per second as compared to 7 transactions per second by the Bitcoin blockchain.

What is the fee for using Lightning Network?

Lightning network fee = Fee to open/close the Lightning channel + Routing fee.

The Routing fee is the fee that the lightning network takes to pay its lightning nodes to ensure efficient allocation of funds between sender and receiver after every transaction. 

The lightning network fee is meager as compared to the transaction fee taken by the blockchain for every transaction.

What are the difficulties associated with the Lightning Network?

Even though Bitcoin's Lightning network successfully solves its scaling issues through low fees and fast transactions, it comes with its problems. 

 * Firstly, users need a lightning supportable wallet to initiate the lightning network. This wallet costs a fee that most users do not like to pay.

 * Secondly, any lightning network requires the users to lock a specific amount of their Bitcoin till they use that micropayment channel. The users need to close their lightning channel if they want to unlock that bitcoin amount.

 * Thirdly, all the participants of a Lightning network need to be online. If one participant chooses to close the channel while the other participant is offline, the former can steal the funds of the other.

NOTIFICATIONSClose
ALL
USER
Nothing to see here!
It looks like you are already updated
Nothing to see here!
You must Login to see actions