Lightning Network – what is it and how does it work?

Lightning Network what is it and how does it work?

Lightning Network

Lightning Network — payment protocol operating on blockchains. It allows for instant transactions between participating nodes and is proposed as a solution to the scalability problem of bitcoin.

Lightning Network consists of nodes and bidirectional payment channels. A payment channel is established between two network nodes. Each of the two nodes of the payment channel contributes a certain amount of funds to the channel through a transaction in the blockchain. In the future, the channel capacity is the sum of the funds contributed by the nodes.

The Lightning Network uses concepts such as:

  • Channel opening – blocking in the blockchain of funds that will be transferred to the management of the newly created Lightning Network channel.
  • Closing a channel – closing a channel and transferring funds under the control of the blockchain.
  • Channel depletion is a reversible process, as a result of which the channel can actually work in only one direction. If the first node transferred all the funds in the channel to the second node, then the direction of the transfer of funds from the first node to the second will not be possible until the second node transfers some of the funds to the first. Or two nodes will need to open a new payment channel.

How Lightning Network Works

The essence of the Lightning Network is to create two-way payment channels between two installed network nodes, through which instant bilateral cryptocurrency payments will pass without commission. Each node in the network initially blocks the amount in the blockchain allocated for the Lightning Network channel. Subsequently, the blocked funds are processed by the channel, using debt receipts of cryptocurrency holders, and not the cryptocurrency itself. In the blockchain, only the fact of allocating funds to the open Lightning Network channel and the final transaction balance after the channel is closed is recorded. A payment channel between nodes can remain open indefinitely at the request of users.

When you create two or more channels that work together, The Lightning Network is being formed. In it, users send receipts to each other, using optimal routes from a chain of open channels. So the sender who does not have a payment channel with the final recipient of his funds, uses his open channel with a user who has a direct connection with his final recipient. As you can see, it becomes possible to make many small transactions outside the blockchain eliminating the problems of congestion in the main network. Lightning Network allows you to process any transaction volumes without network costs, while maintaining scalability and a high level security.

All work of the Lightning Network can be considered in three of its components:

  • Payment channels.
  • Hash contracts for blocking amounts to be transferred to Lightning (HTLC).
  • Lightning Network Protocol.

The high degree of automation of the Lightning Network can significantly simplify the transaction process, creating a platform to further reduce the cost of the cryptocurrency network.

A key principle of the Lightning Network is the use of payment channels in which funds are transferred between participants. A payment channel is a wallet with multisig function, which stores a certain number of bitcoins. Coins can provide both parties, and only one of them.

The channel is opened by means of a normal bitcoin transaction, that is, in this case, data about this transaction is written to the blockchain (also data is written to the blockchain when the channel is closed). However, in the future, all transactions carried out within the channel occur directly between participants without writing data to the blockchain.

The payment channel is inherently an analogue of a safe, in which money is placed, which are then available to a certain circle of people. But, if you need to know the combination of numbers to open the safe, then in our case private keys are used.

What is Lightning Network Technology for?

The main goal of the Lightning Network is scaling and faster operation of blockchain networks, in particular, the implementation of instant micropayments with lower commissions than with ordinary transactions.

Simply put, the Lightning Network allows users to conduct transactions directly between themselves, without writing information to the public blockchain. Thus, two tasks are solved at once: faster and cheaper transactions, as well as reducing the amount of blockchain data. In addition, this technology contributes to greater anonymity of users.

Lightning Network Case Study

The simplest example of using LN technology: Anatoly’s favorite coffee shop announced that it had begun accepting bitcoins as payment. But paying every time for a cup of coffee, creating a separate transaction for this, may be too expensive because of the fees associated with this, in addition, it takes a certain amount of time to confirm the transaction.

It is here that LN comes to the rescue. Anatoly opens a payment channel between himself and the coffee house and puts, for example, 0.01 BTC, which he intends to spend on ordering coffee in the future. When creating a channel, 0.01 BTC is displayed on the balance of Anatoly, 0 BTC on the balance of the coffee shop.

Let’s say a cup of coffee costs 0.0005 BTC. After the first order, the balance of Anatolia will already show 0.0095 BTC, on the balance of the coffee shop – 0.0005 BTC. Thus, Anatoly can order coffee until his balance is zero or he decides to close the channel. For each transaction, Anatoly and the coffee shop sign an updated smart contract that displays how many coins in the channel belong to each side. As already mentioned, this data is not written to the blockchain – instead, each side stores its copy of the smart contract.

Who is responsible for developing the Lightning Network?

As in the case of Bitcoin and a number of other cryptocurrencies, the development of the Lightning Network is decentralized, and the code of the protocol itself is available in the public domain. Therefore, it is not necessary to talk about any one “official” version of LN. At the same time, there are a number of well-known companies and projects that offer their own implementation of the technology, and in this case, the decision on which one to use remains with the end user.

Among these can be called Lightning Labs, Blockstream, ACINQ, Bitfury and several other projects.

What is the state of the Lightning Network today?

The Lightning Network microtransaction protocol has been developed over the past few years, but only in March 2018, when Lightning Labs introduced the first beta version of the lnd client, can it be considered the date of its official launch. In addition, last year, the Eclair wallet from the French startup ACINQ was released, as well as a beta release of c-lightning – the implementation of the Lightning Network from Blockstream.

Another important event was the release of Casa Node, a physical Lightning node from the American startup Casa, which significantly lowers the threshold for access to technology, making the use of the Lightning Network extremely easy for users who do not have extensive technical skills.

Also, the Lightning Network is increasingly being used to pay for real goods and services. The Swedish startup Bitrefill became a real pioneer in this regard, back in March 2018, it announced the possibility of using the protocol to replenish telephone bills and purchase gift vouchers and certificates.

In January 2019, Bitrefill also introduced Thor, a service for opening an empty channel in the Lightning Network from its own startup node. Own node to which users can connect.

What to expect from the Lightning Network in the future?

Lightning Network is still a very young technology, but it really prophesies a great future. The network capacity is steadily growing, having recently exceeded the 700 BTC mark, the number of nodes is approaching 6500, and the number of open channels has already exceeded 28,000.

In addition, the technology opens the way for fundamentally new solutions such as cross-platform atomic swaps, that is, instant direct exchange of coins from one network to coins of another without the participation of intermediaries in the form of exchanges and other exchange platforms. So, back in 2017, the first atomic transaction between Bitcoin and Litecoin took place on the Lightning Network.

You can also expect early support for the technology in a number of payment applications. The pioneer in this direction could be the Cash App developed by Square. In addition, the plans for the implementation of the Lightning Network were announced by the developers of the privacy-oriented users of the Beam cryptocurrency.

Recommended Related Articles:

Leave a Reply

Your email address will not be published. Required fields are marked *