On the basis of the Bitcoin blockchain, the Lightning Network is launched. There are already several hundred knots in it. Anyone can become a member and take advantage of lightning fast and almost free translations.
Imagine that you are in a cafe and want to drink coffee. Will the Lightning Network help?
You can build a direct payment channel between your own node and a cafe node. If both Bitcoin nodes are already synchronized with the main blockchain, then you will only need to send a request to create a payment channel to the blockchain, and reserve a certain amount of BTC for this channel. To pay for coffee, you will need to wait until the confirmation of the channel creation transaction on the blockchain is complete, and then you can make a payment.
Let's compare direct payment through a Bitcoin transaction and payment through a Lightning Network.
To make a direct payment on the Bitcoin network, you only need to have access to your Bitcoin wallet and know the address of the seller’s Bitcoin wallet.
To create a Lightning Network channel, you need access to the active Bitcoin blockchain site. Moreover, a direct connection between the Lightning Network nodes is also required. Creating a payment channel Lightning Network must be confirmed by a transaction in the Bitcoin-blockchain.
Direct Bitcoin payment is a normal transaction, so you need to have access to a Bitcoin wallet and wait an hour to confirm the transaction.
Payment through the Lightning Network payment channel will be fast, but you must provide a connection between the Lightning Network nodes with access to the active Bitcoin blockchain node. And it must be remembered that in advance it is required to reserve the necessary amount for this channel.
In the case of direct Bitcoin payments, no additional operations are required. After the transaction is committed, the payment "turns out" in the seller’s wallet.
The payment channel Lightning Network must be closed using a transaction in the Bitcoin blockchain, which requires confirmation.
One of the advantages of the Lightning Network is the ability to make a payment through a chain of payment channels without creating a direct payment channel between the buyer and the seller. The only limitation is the presence of a path in the Lightning Network between the buyer and seller nodes, the availability of these nodes at the time of the transaction, and sufficient funds reservation in each of the payment channels of the path.
In this case, it will be possible to spend the reserved funds not only in the cafe, but also in any other node of the Lightning Network. For a cafe, everything is not so great. Now, some other Lightning Network node must create a payment channel in advance from the cafe and reserve a certain amount, without knowing who will buy something and when. In addition, both the buyer and the seller still need to support Lightning Network nodes with access to the active Bitcoin blockchain node.
So, we come to the problem of the last kilometer. How can you take full advantage of the Lightning Network and make it easily accessible to end users and organizations?
The simplest answer is not to create Lightning Network payment channels at the end sections (last kilometer). Let's look at the following scheme:
Next, we assume that the node B can create an order, and the node A can instantly pay for it in the Lightning Network. That is, the path between the nodes exists and sufficient funds are reserved in the payment channels.
In this case, you must perform the following steps:
Consider these steps on the example of the situation in the cafe. So, you chose coffee and reported it to the seller. He calculated the total amount of the order and sent it to node B. To do this, on the side of node B, a fairly simple service (or a web page), where a unique order number will be issued to the Lightning Network for the entered amount.
In the next step, minor difficulties might arise, since the order number in the Lightning Network is very long. As a solution, one could use a QR code, or simply generate a link on an internal or external abbreviation service. The received order number in Lightning Network is transmitted to node A, for example, through a mobile application or website.
After receiving payment, node B can send a push notification to the seller, or the seller periodically requests the status of the order. When confirmation is received, you start to make coffee.
The scheme is similar to the usual payment by credit card. The key difference is that the seller’s acquiring bank requests the possibility of a transaction from the client’s bank. This is possible because all the protocols are described and the banks trust the equipment that is pre-installed in the cafe (POS-terminal) and issued to you (bank card).
It is possible that suitable protocols and equipment will appear and be distributed in the future in the blockchain. Then node A will ask you for authorization through node B. But this will require that your equipment be compatible with the equipment in the cafe. It is much easier to request online access to node A, keeping the previous scheme. But the transfer of the account number to the Lightning Network is still to be simplified.
What prevents you and the nearby cafe to start using the proposed scheme right now? First, the legal status of Bitcoin, Lightning Network, etc. is still not defined. Are everyone willing to take risks in this regard?
Secondly, node A and node B play an important role in the approach, and interaction with them occurs outside the Lightning Network. The question is how to find these nodes and negotiate with them?
Here I note that the distribution will depend on the availability of software and hardware solutions for establishing interaction between the client and the node A, as well as the seller and the node B. But this issue can be resolved quite quickly.
On the basis of what will the interaction between the client and node A be built? Or between node B and seller? The answer is simple - on trust.
I want to immediately emphasize that we are talking about trust only in the final sections. In the case of a client, either he must trust node A and make a deposit in advance, which he will then spend, or, conversely, node A trusts the client and is ready to provide a loan. But this is already happening, for example, when a bank issues a debit or credit card. That is, there is nothing new here.
In contrast to the situation with the Lightning Network payment channels, in this case, trust from the seller is sufficient for node B. Thus, node B will not have to reserve funds for each cafe in advance, that is, the threshold of entry for any seller will be minimal if he trusts a certain node B.
I will add that the purchase of coffee in any case will be based on trust, since there is no guarantee that after payment you will receive what you ordered, even if you are dealing with an automatic machine. That is, after the payment you have to trust the seller until you get the coffee.
There is still a question about the receipt of money by node A from the buyer and by the seller from node B. But there are no restrictions if the chosen method will suit both parties.
Solutions for the last kilometer may be different. A new technology will spread faster if mass application of known approaches is possible. The simple solution is often better than the rest.
Source: https://habr.com/ru/post/348268/
All Articles