What is Lightning Network?

Basic information

Nowadays, it is not common to use BTC normally in shops, cafes and the like. It is not technically difficult to do this, but the expansion of BTC payment is hindered by a cumbersome payment verification system and high transaction fees. This problem can be solved by the Lightning Network (LN), which is gradually pushing through.

The biggest issue

The processing of transactions on the blockchain is done using block mining and verification. The size of these blocks is limited to 1 MB and is set to take about 10 minutes to verify each. As a result, BTC will process a maximum of 7 transactions per second.

This gives rise to several limitations, which we collectively call the “scalability problem”.

This issue causes transaction verification to take 40-60 minutes and the average fee can reach USD 50 or more per transaction.

The solution

A solution to this problem would be to modify the cryptocurrency transaction behavior, for example by increasing the block size. This change would have to be approved by more than half of the miners, but most of them disagree.

Increasing the block size would cause the blockchain to grow, and then only large companies could afford mining, which would contribute to the centralization of the network.

Another possibility to solve the problem would be to divide the blockchain into several overlapping parts (shards).

While verification of each transaction is currently carried out on all nodes, with sharding, individual node groups would share the same copy of the blockchain part. The transaction speed would remain the same, but with the existence of 10 shards, it will be able to process ten times more transactions. Individual shards would verify transactions independently of each other. So far, the implementation of this technology in BTC is only in the theoretical discussion phase.

Different technology concepts are difficult to implement with BTC and it often takes years to convince the mining community. For example, the reduction of the file carrying transaction data with the introduction of SegWit in 2017 was a milestone.

And it was SegWit that laid the groundwork for the Lightning Network, a technology that many believe is the best way to solve Bitcoin’s scaling problem.

Illustrační obrázek sítě

What is the Lightning Network?

LN is a transactional network operating on the blockchain. We can think of it as a second layer that allows for a theoretically unlimited number of transactions with a low fee.

How does it work?

Let’s imagine two entities, a customer and a store, who agree to open a payment channel. Part of this agreement is to store a certain amount at a special address in the blockchain. This address is signed by both parties and behaves like a smart contract. It is programmed in such a way that the stored funds are released only when they receive an order signed by both the customer and the store.

In the following model situation, only the customer deposits their funds (e.g., 0.050 BTC) into the channel. They then pay for orders in the store from this amount. Each payment takes place only within the Lightning Network and is confirmed by both parties after the transaction is complete.

If one item type costs 0.001 BTC, the network protocol will make the payment and record that the store now owns 0.001 BTC and the customer 0.049 BTC, the rest of the deposited amount. Both the store and the customer will receive a copy of the record with the counterparty’s signature.

With each transaction, the previous record is deleted, and the log issues a new bill. After purchasing additional goods, both parties receive a confirmation that the store now owns 0.002 BTC and the customer 0.048 BTC.

After 16 such transactions, when the customer has 0.034 BTC and the café has 0.016 BTC, the customer decides to close the payment channel. To do this, it is enough for him or her to add his signature to his copy of the current fund distribution, verified by the café’s signature, and send the copy to the Bitcoin blockchain.

At that moment, the terms of the smart contract will be fulfilled (they will receive a record with the same signatures that opened the address), the payment channel will be closed, and settlement will automatically take place. Although there were 16 transactions in total (the customer bought from the store 16 times on different occasions), from the perspective of the blockchain, only two transfers took place: sending 0.050 BTC to a special address and sending 0.034 BTC to the customer and 0.016 BTC to the café.

LN can be used by users who are not in direct contact. It is enough if they are connected through an intermediary. Within LN, tokens are moved and after a given period all parties involved are billed.

Bitcoin illustrační obrázek

Safety of the LN

One of the important security elements are Watchtowers. These prevent situations where one of the parties cancels the result of the last few transactions, closes the payment channel, and appropriates all of the counterparty’s funds.

LNs for other cryptocurrencies

A similar project under the name Plasna is also being introduced by the Ethereum network. This tool should handle up to 5000 transactions per second. Optimism, Loopring and OMG Network technologies are also trying to solve the scaling issue on the ETH blockchain.

Sources: coinmarketcap.com, coindesk.com, wiki, pixabay.com, oKrypte.sk

👉 Whole Charlie’s Crypto Dictionary


Previous Logo
Sorry, no more definitions.


Next Illustration
Sorry, no more definitions.