Many believe that Bitcoin is the future of the financial system. But there is one obstacle that prevents it from achieving its goal - this is scalability. For example, VISA processes on average 4,000 payments per second and can increase throughput up to 65,000 payments per second. Bitcoin can process only seven transactions per second. Not tens of thousands, not hundreds, but only seven operations.
Obviously, this is the main obstacle for the development of Bitcoin into something more than a marginal payment system with an unstable course. To solve this problem, the blockchain community has created the Lightning Network. Further we will tell you what it is and how to use it for instant payments with a minimum commission.
What is Lightning Network
The basic idea is that microtransactions should not be written on the blockchain technology. If you make them outside the chain, it will avoid the restrictions on seven operations per second and give Bitcoin the potential for infinite scalability. This approach is called "out of the chain" (sometimes "offline"). You can understand how this works by a simple example.
Let’s suppose that before you go to work, you buy a cup of coffee every day at a nearby store. Making a payment on the Bitcoin blockchain for such a purchase is too much, since the transaction fee may be more than the actual cost of coffee, and payment confirmation will have to wait more than 10 minutes.
However, with Lightning Network technology, you can create a payment channel with a coffee shop and buy your favorite drink quickly and with a very small commission. To do this, you and the store invest a certain number of bitcoins in what is called an address with multi-signatures, or a multi-address (multi-signature address).
For example, you can imagine that you invested 0.5 BTC in a multi-address, and the store did not invest anything, because buying a coffee does not imply the possibility of returning the goods. An address with multi-signatures works as a safe, which can only be opened with the consent of both parties.
During the deployment of the payment channel, a report is created in which it is indicated how the funds are currently distributed. The report is the balance of all the wallets that are connected to the channel. In our case, the report says that you have 0.5 BTC on your balance, 0.0 BTC in the store (the same amount as it entered to the multi-address).
The opening of the channel is displayed on the blockchain so that the owner of the coffee shop can see that you have deposited money, and was sure that he will receive his coins as soon as the channel closes.
Now, when the channel is deployed, you can buy coffee by Lightning-payment. Suppose a cup of coffee is sold at a price of 0.005 BTC. Then, to make the payment, you need to change the report: write off 0.005 BTC from your balance and add this amount to the coffee balance. Then both parties certify the updated report, which reflects that after you close the channel, you will receive 0.045 BTC, the coffee shop - 0.005 BTC.
Now you can continue to buy coffee as long as you have money in the channel balance. In this case, and a coffee shop, and you can make hundreds of thousands, or even millions of transactions within the channel. There is no limit to transactions, since they occur outside the blockchain and do not require confirmation.
In order to use the Lightning Network, it is not necessary to open payment channels with all Bitcoin users. You can use existing channels to create a chain from them and transfer money through it. Such payments are called multichannel. You can understand how they work by the following example.
Let’s suppose that you have a friend Alice and you already exchange bitcoins with her using Lightning-payments, so you have an active payment channel between you. Suppose also that Alice, like you, likes to buy coffee in the morning. Then, instead of opening a new channel with a coffee shop, she can send coins to you, and then you will give them to the coffee shop. The number of intermediaries is not limited.
In the Lightning Network, your payment looks for a path from person A to person B. The network tries to do this with a minimum number of nodes and a commission. Which further reduces the load on the blockchain, but requires that intermediaries have enough money in the payment channels.
Such intermediary links — Lightning Network nodes — can be created by anyone. For this you need a Virtual Private Network (VPN), equipment, network connection and bitcoins on the balance. Node holders are entitled to charge commissions, the size of which they determine themselves - another way to make money on bitcoins.
The channel can be closed at any time. For this you need to send a report with signatures of the parties to the Bitcoin network only. Miners checks signatures and, if everything is normal, the funds inside the channel will be distributed according to the balance.
This action will create a single transaction in the blockchain chain. Thus, it turns out that on the blockchain instead of millions of transactions are displayed only two - the opening and closing of the payment channel.
The system ensures that only the last report will be used to unlock money. And since both parties always have a copy of the report with two signatures, they can return the money at any time, even in cases where the second party has disappeared or does not want to close the channel. For example, you can not keep money that belongs to a coffee shop, and vice versa.
Benefits of the Lightning Network
Almost free transactions. Any transaction in the Lightning Network is much cheaper than regular Bitcoin payments or bank transfers. However, some Lightning nodes can provide their services for free or even pay for the passage of payment through their node, which makes such transactions, if not free, then the cheapest of the existing.
Micropayments. Low commission or lack of it will allow microtransactions in the Bitcoin network - transfers to amounts of a few dollars or cents. Previously, they were not available, since the average commission in the network ranges from 30 cents to a couple of dollars.
Transactions speed. Operations in the Lightning Network are almost instantaneous, as they are not prescribed on the blockchain, which requires 10 to 60 minutes for the transaction information to be entered into three blocks of the blockchain.
Capacity. Christian Decker, a Blockstream engineer, claims that each Lightning channel can handle up to 500 operations per second. Thus, the more such channels, the higher the network capacity. Now more than 4,000 nodes are connected to the network, hence its throughput is 2,000,000 operations per second.
Scalability. The more nodes and channels, the greater the capacity.
How to use Lightning Network
In order to use the Lightning Network, you need to install a cryptocurrency wallet that supports work with this network. These can be Lightning Labs and Zap for personal computers or Rawtx and Eclair for Android. If you choose the desktop version, remember that installing it requires downloading the entire Bitcoin blockchain - more than 220 GB.
Let's test the process using the Eclair mobile wallet as an example:
1. Install Eclair Wallet on your mobile device. This can be done using Google Play (at the time of this writing, there was no version for Apple devices).
2. During the first connection, Eclair Wallet asks the user to write down and save a seed phrase, which consists of 12 words.
3. Next, you need to confirm the seed phrase. This is necessary to make sure that the user understands the importance of this moment, and does not click "OK" in order to move forward more quickly - as is the case with the user agreement.
4. After confirmation, the system sends the user to the main menu and conducts a briefing, describing what each icon does.
5. The wallet is installed and configured, you can test the Lightning Network. This is best to do using test coins, which can be obtained from this link. If you want to use real ones, transfer a small amount of money to the wallet.
6. Ask a friend, neighbor or a good person on the forum to install a wallet with support for Lightning Network and let it also fill up with its test coins. If you cannot find an assistant, you can do it yourself by installing another wallet on another device.
Now you can test everything on the example of buying a cup of coffee in the online store Starblocks — this is a platform developed by Alex Bosworth from Lightning Lab to explore the Lightning Network. Unfortunately, their coffee is also tested, i.e. not real.
7. Create a payment channel with a small amount. So it will receive confirmation more quickly (its presence is indicated by the inscription «Normal»).
8. Choose a coffee to your taste on the Starblocks test site and click on the «Checkout».
9. A window will pop up with the address in the form of a QR code that you need to scan using your mobile wallet. If you do this on a PC, in the new window there will be a symbol code that can be copied and pasted into the necessary wallet window.
10. Congratulations, buying a cup of coffee and testing Lightning Network was successful! You can check the amount of commission. In this case, it is zero. If you use real LN nodes, it will be, but very small.
A list of Internet sites that accept payment through the Lightning Network can be found at Lightning network stores. There is a filter by category, novelty and popularity, as well as the ability to add your site.
How to launch the node Lightning Network
Recently, more and more messages appeared on the news about launching LN nodes with large amounts on their payment channels. This is due to the fact that people see in such nodes a good way to make money - created a node, set a commission and receive passive income.
It is pretty simple to make. You need to find a supplier of private virtual servers with an acceptable payment, which allows you to use a large disk drive (you need to synchronize the node with the blockchain). After that, you need to install and configure the node.
The instructions will help with this:
A virtual server is needed so that your node is always on the network, and not just when the computer or laptop is turned on. However, if you have a free device, you can use it. But remember that users will start to bypass your node side if it has a reputation for unstable or unreliable node.
Use the following tips to attract users:
● Connect your node to others - the more channels, the higher the likelihood that your node will be included in the payment chain;
● Set an adequate commission for transactions that pass through your node - too large will scare away the users, too small will not bring profit. If you have free money, you can set a reverse commission for a while: when you pay a commission to attract users.
● Choose an attractive name for your node from a marketing point of view.
● Use social networks, forums and profile sites to promote the node and connect other users to it.
LN application area: 5 cases
Case 1: Fiat and Cryptocurrency Exchange. If cryptocurrency and Forex trading platforms unite through Lightning channels, it will lower trading commissions, which will lead to:
● increase in trading activity;
● increase in gross sales;
● alignment of asset rates.
In addition, Fiat and Cryptocurrency Exchange platforms can use Lightning-payments when replenishing an account by traders, which will allow the latter to not keep funds on stock exchange accounts. Instead, traders will replenish the account as needed, thereby removing the obligation to keep and protect huge amounts of money from stock exchanges.
The first technology introduced cryptocurrency exchange Vaultoro. Bitmex is sizing up this possibility, as is the world-famous Nasdaq, whose representatives believe that the future is in Lightning payments.
Case 2: trade operations. With any purchase on the Internet, users are forced to overpay a few percent of the value of a product or service in order to transfer money from their account to the buyer's account — these fees go to pay for the services of payment gateways and banks. Even in the case of a cryptocurrency payment, there is an overpayment, since the transfer from Fiat to Crypt and back (which the seller will do) requires an additional 2-10%.
By setting up a Lightning channel with an outlet, you can permanently get rid of such overpayments. This was proven by the CoinGate payment service, which connected more than 100 trading platforms to the Lightning Network through its site. CoinGate also launched a service that allows any trading platform to connect to their Lightning node and receive Lightning payments through it.
Case 3: money transactions. Banks typically charge for incoming and outgoing transfers. The cost varies from 0 to 30 dollars and above. Below are the median commissions for the US banking market for four types of banking services.
A cryptocurrency is used to reduce costs, since in this way it is possible to reduce costs to a couple of dollars in any transaction. However, this is not the limit - thanks to the Lightning Network, the commission can be reduced to a few hundredths of a cent or even get rid of it.
Case 4: activity fee. Thanks to the Lightning Network you can monetize any actions on the network - from watching videos and sharing to watching videos. This opens up great opportunities for marketing and content copyright holders.
A simple example: the monetization of torrent trackers. In the torrent files are divided into small parts that are on the computers of all who downloaded them. Using the blockchain and LN, you can create a torrent service, where peer nodes will pay seed nodes for distributing these parts of files.
Case 5: online gaming transactions. Micropayments are an integral part of modern games. By integrating support for Lightning-payments into the game client, they will become cheaper and more reliable. How this can be is shown in the next video.
Incompatibility with KYC & AML. Since the money in the Lightning Network can go through a lot of intermediary nodes, the final recipient is simply not able to track their origin. This is contrary to the SEC rules and procedures that are aimed at fighting against white washing and terrorist financing.
That is why dezentrilized cryptocurrency exchanges and banks are in no hurry to use new technology to reduce the cost of payments. They may simply lose their license, and in some cases go to jail with full confiscation.
The threat of centralization. The more money in the account of an LN node and the less its owner spends on servicing, the lower the commission he can set. In other words, the system encourages network centralization, which is contrary to the goal of creating Bitcoin. Therefore, a significant part of the Bitcoin community opposes the introduction of Lightning-payments.
The network is optimized for small transactions. Most nodes on accounts have small amounts - from 100 satoshi to 50 bitcoins. If someone decides to send a few hundred bitcoins using the Lightning Network, there may be difficulties in the system, as it can create a chain of nodes within which there are so many coins.
Network safety. Most system security tools do not work if the user is offline. In addition, due to the threat of centralization of the system, the risk of an attack increases by 51%.
Online only. Users can transfer money only if both parties are connected to the network.