LIGHTNING NETWORK

Words
1346
Reading
6 min
6y
Listen to this post
~9 min

image.png

Image Source

Most of us already know that Bitcoin, the most used and valuable digital asset in the world, was the first to make it possible for anyone to send value over the internet safely and without intermediaries.

This gives him the strength he has today and his increasingly growing status as a store of value.
However, due to its decentralized design, there are points to be improved and one of them is its ability to support a greater number of transactions, which today are not so fast and cheap, which become a barrier to its adoption as a means of payment. .

Remembering, of course, that the main function of Bitcoin is not this, but rather to prioritize secure and finalized transactions in a decentralized way.

Thinking about solving this, developers created a second layer solution, called Lightning Network (LN), which is one of the first implementations with the objective of improving the scalability of Bitcoin, allowing transactions to be carried out outside the blockchain, granting them a lot faster.

The Lightning Network was formally prepared in a paper by Joseph Poon and Thaddeus Dryja in 2015 and is a technological solution designed to solve the problem of speed and transaction capacity of the Bitcoin blockchain, allowing quick and cheap payments without worrying about the time of blocks confirmation.

It uses payment channels between two parties through a multi-subscription transaction.

After opening this channel, it is possible to make and receive numerous payments, micropayments and nano payments, which are only updated on the main blockchain when both parties close that channel.

This approach dramatically accelerates the speed of a transaction because they do not need to be approved by all nodes, they are not limited to the block size and the Bitcoin blockchain does not need to store all the transactions that take place. Thus, it allows transactions with the security of the Bitcoin network and enhances its usefulness as a means of payment.

image.png

Transactions using LN take seconds to complete compared to ten minutes - on average - of transactions directly on the Bitcoin blockchain.

image.png

In terms of fees, they are currently $ 11.79. In 2017, due to high demand, fees exceeded $ 50.00. It is important to note that, for all your security, it is normal for rates to be a little higher.

Due to the nature of its decentralized technology, which requires consensus from all nodes in its network, Bitcoin's blockchain manages to perform around 7 transactions per second (tps) and currently averages 370 transactions per day. Much less than the tens of thousands of credit card transactions per second. When the network becomes congested, confirmation rates increase, as each block has a limited size of transactions that can be stored (1MB) and a time limit for confirmation of transactions (10 minutes).

image.png

Visa, on the other hand, claims to be able to process 24,000 transactions per second and can scale to allow up to 65,000 tps.

image.png

HOW IT WORKS

A payment channel is opened and users deposit funds. Through the use of smart contracts, two connected parties can carry out an unlimited amount of transactions within that private channel without transmitting the microtransactions to the main blockchain. Therefore, these channels are called "bidirectional".

Transactions are recorded and signed in a ledger outside the main blockchain. Only when the channel is closed, the most recent state of the off-chain ledger is published on the blockchain, updating each participant's Bitcoin balance.

As the LN nodes are interconnected, it is not always necessary to open a new direct channel with whom one wishes to make transactions. Payments can be sent through other channels, as long as there is a liquid path between the two transaction nodes.

Thus, the network automatically finds the shortest route. It is important to note that payment channels can remain open indefinitely and are only closed once users agree to close it.

So, the only two transactions that go to the blockchain are the opening of the channel and the closing of the channel and, therefore, the main network is decongestionanda.

CHANNEL CREATION

To open a channel on the Lightning Network, users must deposit funds in a multi-subscription (multi-sig) wallet. The address of the multi-sig wallet will be transmitted to the main blockchain and the payment channel is officially opened.

Funds that have been deposited in the multi-sig portfolio will be blocked for as long as the channel remains open. Here is an illustration of what happens when Frodo wants a channel with his favorite coffee shop:

Each party has a multi-signature wallet private key, which is required to verify and sign all transactions. Therefore, funds can only be spent if both parties initiate the transaction using their private keys.

image.png

EFFECTING TRANSACTIONS

They can now perform an unlimited amount of transfers and exchanges with each other. Each transaction that takes place on the payment channel requires the digital signature of both parties through each of their private keys in the multi-sig wallet.

Both parties will sign an updated balance sheet after each transaction to reflect the balance due to each other in the multi-sig portfolio.

A copy of the balance sheet is maintained by both parties as evidence of the transactions and the balance due for each party. The channel can remain open as long as both parties do not agree to close it.

image.png

CLOSING THE CHANNEL

Whenever both parties close the transaction or want to make the balance, they can close the payment channel. A final payment transaction will be agreed by both parties and the final balance will be transmitted to the main blockchain. In the event of a dispute, both parties can use the most recent balance sheet to prove the final balance and recover their balance.

image.png

MAIN ADVANTAGES

  • QUICK PAYMENTS - As transactions are carried out outside the blockchain, the main network is saved and therefore the Lightning Network allows payments that do not have to wait for block confirmations.

  • LOW RATES - When transacting and settling outside the blockchain, the Lightning Network allows for significantly lower fees, which enables new use cases, such as instant micropayments. In other words, you can buy Bitcoin coffee with lower transaction fees.

  • SCALABILITY - With the power of LN, Bitcoin can handle millions of transactions
    per second and serve as an alternative to payment systems such as Paypal and Visa, without depending on intermediaries.

According to the blockchain analytics website P2SH.info, the amount of Bitcoin sent by LN has grown dramatically, from 400 BTC to over 1 million BTC today.

image.png

TOTAL USD LOCKED AT LN CURRENTLY IS $ 25 MILLION
image.png

Since March last year, LN has seen an increase in the number of new payment channels, increasing from around 1,500 channels to more than 36,000.

Each channel represents a route to process payments.

The more channels, the better the performance of the network and scaling layer.

image.png

This graph shows the number of nodes. A Lightning Network node is software that connects to the LN to send and receive Bitcoin from other nodes. The network is formed entirely by these nodes connected to each other. Nodes are the basic building blocks of the network. The more nodes there are, the stronger the network will be.

image.png

The Lightning Network is actively maintained and developed by more than six different development teams around the world, but it is not a definitive solution.

Some research suggests that there are certain vulnerabilities due to the centralization of nodes in the network that control most funds.

Solutions like LN are a process of natural evolution among other tools that will be tested and will have to prove viable and easy to use over time. The solutions we have today require some knowledge of technology and are far from definitive and the main obstacle is still accessibility and user experience, which needs to be improved.

Bitcoin was not created specifically to allow super fast and cheap transactions, its proposal is different and LN is a step in the improvement, without giving up decentralization and security, which are the most important.

LIGHTNING NETWORK | Ecency