What is Bitcoin Lightning Network? Can we transfer bitcoin using the Bitcoin Lightning Network network?

Many people believe that Bitcoin and the adoption of Blockchain technology are the future of our financial system. But there is a major problem that is in the way of this goal: scalability .

What is Bitcoin Lightning Network?
What is Bitcoin Lightning Network?

The problem of scalability

To give you an example, the VISA processes about 4000 transactions per second and can reach up to a maximum of 65,000 transactions in a single second. On the other hand, Bitcoin can only manage up to 7 transactions per second , with a 1MB block size. To make sure you understand the difference well, we are not talking about 7 thousand transactions per second, but only 7!

Clearly, the main blockchain is not very scalable.

What is the main blockchain?

When we refer to the main blockchain , we refer to Mainnet or Layer 1 . This is the layer where all transactions, once confirmed, are registered directly on the blockchain and where the consensus rules (such as the size of the blocks and the limited number of transactions) apply.

Solution: Bitcoin Lightning Network network. But what is Bitcoin Lightning Network?

The Bitcoin community came up with a solution called Lightning Network or Lightning network to solve the scalability problem. The main idea is that small and daily transactions should not be stored on the main blockchain. This avoids the limit of 7 transactions per second and is called the off-chain (outside the network).

How does the Lightning network work?

Let's take an example: Mihai buys a coffee every morning on his way to work. Creating a transaction on blockchain just for a coffee is exaggerated. Could get to pay more on commissions than on coffee. However, with the Lightning , Mihai can open a payment channel with the cafe.

To do this, both the cafe and Mihai deposit a certain amount of bitcoin in a multi-security address (with multiple signature). Suppose that Mihai deposits 0.05 BTC, and the cafe does not deposit anything, because it does not offer refunds. This multiple signature address is like a safe that can only be opened when both parties agree.

When we open the payment channel, we also create a balance sheet that says how to distribute the money in the address. For the moment, he says that "Mihai will receive 0.05 BTC, and the cafe will receive 0 BTC", exactly as they submitted. The payment of the payment channel takes place on the main blockchain to ensure transparency.

Transactions in Lightning network

Now that this channel is open, Mihai can order his coffee in the morning. Let's say a coffee costs 0.001 BTC. To pay it, Mihai changes the balance sheet . He decreases the cost of coffee in his balance and adds it to the balance of the cafe. Now the sheet says that "Mihai will receive 0.049 BTC, and the cafe will receive 0.001 BTC".

Mihai and Cafeneaua sign the new balance sheet with their private keys, everyone keeps a copy, but I do nothing with it. Mihai can continue to order coffee while he has a balance in the payment channel. They can make hundreds of thousands of transactions between them, without a real limit, because everything happens outside the main blockchain.

Layers Blockchain Network
Layers Blockchain Network

Layers Blockchain network

Closing the payment channel

The payment channel can be closed at any time by Mihai or Cafe. All he has to do is take the last balance sheet, signed by both sides, and transmit it to the Bitcoin network, that is to send the transactions on this channel to the main layer, Mainnet . The miners will validate the signatures on the sheet and, if everything is fine, they will release the funds according to the balance sheet. This will create a single transaction on the Bitcoin Blockchain.

The advantages of the Lightning network

Thus, the Lightning can significantly reduce the task of the main blockchain. Requires only two transactions on blockchain: one to open the payment channel and another to close it. It is also very safe. The system ensures that only the latest signed balance sheet can be used to unlock the money.

And because both parties have a signed copy of the balance sheets, they can release the funds at any time, even if the other party does not want to collaborate. For example, Mihai cannot hold the hostage money belonging to the cafe and vice versa.

Lightning network and payments through intermediaries

You do not have to open a direct payment channel with everyone you want to send Bitcoin. You can use the network to pass your money through intermediaries. For example, Flavia , a friend of Mihai, already has an active payment channel with him in the Lightning network. If Flavia wants to buy a coffee, you don't have to open a direct channel with the cafe. She can send Mihai's money, who will send them to the cafe.

In the Lightning , your payment is trying to find a route from person to person B, using as few intermediaries and as few commissions. This further reduces the pressure on the main blockchain. However, it is necessary for intermediaries to have enough money in their payment channels. For example, if Mihai does not have enough funds to send further to the cafe, the system will look for another route through other intermediaries. If this is not available, a direct channel will be created between Flavia and the cafe.

Availability and implementation of Lightning network

The Bitcoin Lightning Network network is already implemented and used. Wallet wallets like Muun Wallet have integrated this technology, allowing users to perform fast and cheap transactions using the Lightning network. There are already numerous transactions successfully carried out through this solution.

If you want to make a Bitcoin Muun Wallet to use Lightning Network , you can read the article dedicated to this topic.

For more information on how it works access Lightning Network

In the situation where you want to know more about bitcoin you can read more on Investopedia or Wikipedia