Don't know lightning network? Zero-based can also be read by professional interpretation

In January of this year, the Bitcoin Lightning Network launched a “Torch Pass” experiment, which quickly ignited on Twitter – it lasted more than 80 days, experienced 275 people, crossed 6 continents, and eventually evolved into a world. Level phenomenon.

This massively encrypted network trust transmission activity has attracted the participation of all walks of life and various celebrities, including BitMexResearch, coin CEO Zhao Changpeng, Bochang Sun Yuchen, Andreas Antonopoulos, author of Mastery of Bitcoin, and Erik, CEO of Shapeshift. Voorhees, Bitcoin Jesus Roger Ver, Twitter founder Jack Dorsey, Finnish Miss Universe Rosa-Maria Ryyti, etc., and the addition of these people, in turn, led to widespread social attention to Bitcoin and lightning networks.

However, since each lightning network channel has an upper limit on the amount of payment, the lightning torch event will soon be "extinguished", and the global payment experiment is coming to an end.

Although the lightning torch activity is coming to an end, the exploration of the lightning network continues.

The lightning network, which is only 15 months online, should not be underestimated. According to 1ml of data, there are nearly 8,000 nodes and nearly 40,000 channels on the lightning network. Today, the capacity of the lightning network has exceeded 1,000 bitcoins, and the capacity data has increased by nearly 50% compared with the same period of last month. The lightning network is growing at an alarming rate.

At this critical time point, Mr. Liu Tao, one of the founders of 31Tri invited BitTribeLab, and Dr. Zou Jie, Chief Technology Officer of BitTribeLab, explained the progress, usage scenarios and technical bottlenecks of Lightning Network.

Why are domestic lightning network nodes sparse? Will the Lightning Network affect the revenue of Bitcoin miners? How to solve the problems of cost, revenue and economic incentives for node deployment, security of lightning network, evildoing and privacy? In addition to the lightning network, what other quality Layer 2 projects deserve our attention?

 

These questions are closely related to the destiny of the lightning network, and the two authors will answer them one by one.

Text / BitTribeLab

Editor / Xiao Ping

1

BTC expansion solution to increase transaction speed

1. How does Lightning Network work?

The lightning network is a multi-signal between two nodes that do not need to trust. The two parties pledge the same amount of bitcoin to establish a two-way payment channel . The second layer of a bitcoin that conducts transactions in this two-way payment channel (Layer) 2) Network .

In theory, the number of bitcoins mortgaged by both parties is not limited, but now the average node usually mortgages 0.16 bitcoins in the channel. The reason is that the capacity of the lightning network channel on the BOLT 1.0 (Basics of Lightning RFC) standard is about 0.16 bitcoin.

Since the payment in this two-way payment channel is paid outside the bitcoin chain , it is real-time and free . This kind of payment behavior is essentially a mechanism for securely performing out-of-chain validation transactions using hash time locks and smart contracts (bitcoin scripts).

If there is no direct establishment of a channel between the two nodes , the payment path passes through one or more intermediate nodes . Then the intermediate node can provide the path service by collecting the toll . The toll has two forms, the collection is based on the second order and the transaction rate. But the toll is far lower than the miners' fees on the bitcoin chain . Path services are implemented and secured by the HTLC Atomic Trading Protocol.

The generation of path services and tolls has also spawned the rise of node operators of lightning networks.

 

2. What is the main problem solved by the lightning network?

Anyone who knows about Bitcoin knows that Bitcoin has problems such as network congestion, high transaction fees, and slow transfer rates, which seriously restricts the development of Bitcoin.

In order to solve these problems, the debate in the Bitcoin community has never stopped, the consensus is serious, and it has caused many Bitcoin forks.

At present, the community consensus cannot be agreed, but it is clear that the solution to the existing problems of Bitcoin will be pinned on Bitcoin's Layer 2 network , and Lightning Network is the current solution. . Lightning Network mainly solves the problem that the transaction in the bitcoin chain is too slow (it takes half an hour to an hour to confirm), and the problem of unlimited transaction volume without the need for chain expansion.

2

Large-scale adoption potential in the field of micropayments and daily consumption

3. At present, how is the lightning network progressing? Can it be widely adopted and expanded?

The lightning network real-time progress can be found in this link https://1ml.com/statistics.

Lightning Network Real-Time Statistics

As of press time, there are nearly 8,000 nodes on the Lightning Network and nearly 40,000 channels. The current capacity has exceeded 1,000 bitcoins, and the capacity data has increased by nearly 50% over the same period last month. This speed can be said to have developed rapidly.

Lightning network expansion has no upper limit because each node and channel are parallel and independent. Many developers are currently developing the lightning network application Lapp.

The widespread adoption of Lightning Network in the future relies mainly on mobile phone bitcoin wallets and merchant lightning network node POS machines. Like Alipay, it relies mainly on mobile apps and merchant Alipay POS machines. Just like the current scan code payment, either "You sweep me" or "I sweep you."

The adoption of the lightning network has only begun to be very fragmented and has not yet become a climate.

It should be noted that , unlike the Alipay receipt code, the receipt code is different each time you collect the money. This is to protect the security of the wallet private key.

But the lightning network node is not very mature on the mobile phone . Basically, an external lightning network node is now used to implement the payment. We are also working on this issue.

4. How do the integration of the lightning network by some wallets such as Cobo, imToken, and Bitt, affect the entire ecology?

The wallet integrates with the lightning network, which helps to make the wallet an entry point for the digital world economic system, just like Alipay, WeChat payment.

In the future, these wallets will not only need to integrate lightning network, but also integrate decentralized IM, there may be Dapp and Lapp. This will play a positive role in promoting the entire new digital world.

5. What is Lapp? What is the difference between Dapp and Dapp? How many Lapps are there currently?

The application developed on the Lightning Network, called Lapp, includes various payment services and various financial services and derivatives based on payment services.

The main difference between Lapp and Dapp is that Lapp is a lightning network bitcoin payment application, while Dapp is a generalized decentralized smart contract. A payment application requires very expensive development.

There are currently no statistics on the number of Lapps.

6. How do you view the future development of Lightning Network? How big will it be?

Similar to Alipay, Lightning Network's current main usage scenarios are in micropayments and daily consumption , such as usual consumption, buying breakfast, buying coffee, especially abroad, without Alipay's similar payment system. There is also a usage scenario similar to WeChat, such as rewarding favorite authors, small donations, etc.

In the future, I believe that the lightning network will have a large-scale development in these two areas.

This is mainly because micropayments and daily consumption do not require users to have a large amount of bitcoin. At the same time, users can deploy lightning network payment nodes and hardware at very low cost (especially based on the Raspberry Pi Raspberry Pi). This guarantees a high degree of security.

For some developing countries, you can skip the two stages of credit card and Alipay and go directly to the payment phase of Lightning Network. This is like China basically skipping the credit card stage and entering the Alipay phase directly. In some countries where the currency is unstable, the lightning network can directly become the mainstream payment method for paying with bitcoin, just as gold became the mainstream currency and payment method during the turmoil. The payment system of Lightning Network is the digital gold payment system.

In developed countries, Lightning Network Payments will be used primarily to replace credit card payments while skipping the Alipay phase. With Lightning Networks, merchants can deploy payment node hardware POS at an extremely low cost while still ensuring security. Because there is no need for additional network facilities, it is very easy to replace the merchant's existing credit card network.

Merchants almost no longer have to pay high credit card fees, which will be the main driving force for merchants to adopt lightning network.

7. What role does Lightning Network play in the Bitcoin ecosystem?

Lightning Network is the first real point to realize the point-to-point cash payment system in Nakamoto's ideal. It is the channel for Bitcoin to flow in daily life, which will greatly promote the circulation of Bitcoin and promote Bitcoin in the real world. The application of life.

We return to the original heart of Nakamoto. Reading the emails of Nakamoto, we found that this is the original heart of Nakamoto. Nakamoto has mentioned (the original is this):

The letter mainly describes the concept of the trading channel, which is also the most original idea for building a lightning network.

8. Can you say some of the more interesting lightning network use cases that have already landed?

  • London taxi drivers use the lightning network to collect bitcoin, and then quickly sell bitcoin to make a difference, which is because the lightning network has the ability to pay in real time.
  • On the Pollofeed.com website, Bitcoin can be fed online via Lightning Network.
  • Coca-Cola vending machines that accept bitcoin payments via the Lightning Network.
  • An arcade game that accepts Lightning Network to pay Bitcoin.
  • Small bitcoins can be paid through the Lightning Network and candy can be bought from the candy dispenser. This technology can also be used to purchase medicines and other goods during non-business hours.

3

Bottleneck: channel capacity cap and wallet can't always be online

 

9. What other problems and development bottlenecks remain in the lightning network?

The Lightning Network is still in its infancy. To date, the two major development teams of Lightning Network (Lightning Lab and Bitcoin code core development team Blockstream) have also defaulted their lightning network software deployment to the Bitcoin test network instead of the Bitcoin main network. Warn the risks of using on the Bitcoin main network.

 

In response to the capacity problem of the lightning network node channel , BOLT 1.1 is currently proposing to increase the default capacity of the lightning network node channel from 0.16 BTC to 2.56 BTC, thereby supporting a larger amount of capacity and making the transfer more convenient. The solution is to charge the existing channel to increase the channel capacity, instead of turning off the channel and reopening a new channel. Because the channel is closed and the new channel is opened, the transaction is on the bitcoin chain and needs to be paid twice. Miner fees.

Support for submarine exchange transactions is to pay from the bitcoin chain to the lightning network node and then pay from the lightning network node to the bitcoin chain.

 

Note: All development teams are now developing on the BOLT 1.0 standard.

Https://github.com/lightningnetwork/lightning-rfc/tree/v1.0.

 

At present, the big bottleneck in the development of lightning network is that the mobile wallet cannot support the problem that the lightning network channel is always online . Because the channel of the lightning network needs to be always online. The mobile wallet is not always online, so its lightning network channel is not always online. This leads to two problems, one is security and the other is that you can't always support real-time payments.

 

10. Is the lightning network usage high? It is said that there are fewer Chinese nodes in the lightning network? Why does this happen?

At present, the usage rate of lightning network is still not high, and they are still in the exploration stage.

The Chinese node of the lightning network is not too small, it is less pitiful. At present, there are only 38 nodes, accounting for 0.92% of the total number of nodes in the world. The channel capacity is less than 5 bitcoins, accounting for 0.44% of the global total.

In contrast, the United States has 1,146 nodes, accounting for 27.84% of the total number of nodes in the world, and the channel capacity is nearly 664 bitcoins, accounting for 61.7% of the global capacity.

I think there are two main reasons. First, because China's Bitcoin is relatively small, it only accounts for 4% , and there are only about 400. The second reason is that the fixed IPv4 resources in China are limited and the cost is high . Perhaps IPv6 is a possible solution. Because the lightning network node is IPv6-capable.

Editor's Note: IPv4 is the abbreviation of English Internet Protocol version 4, and the Chinese name is Internet Protocol version 4.

4

Node cost, revenue and competitors

 

11. How high is the cost of deploying a lightning network? How to motivate the lightning network to build nodes?

Individuals deploying a lightning network node basically do not need any cost. With one PC, one node can be deployed, and a transaction channel can be established with other nodes.

However, the lightning network node needs a fixed ip to be able to provide external services. Due to the limitation of ip in the country, the network nodes deployed by individual users cannot actually provide services because they do not have fixed ip.

 

If we go to a cloud service vendor to purchase a cloud server to deploy a lightning network node, a lightning network node costs about $200-400 per year, based on the most basic configuration and the current price of the cloud service provider . If you are deploying multiple nodes, you should consider the geographical layout.

In fact, in foreign countries, because individual users basically have a fixed ip, individual users can deploy a lightning network node in the home to make it permanent online. Just like a router, it provides services to the outside world. So for individual users, the lightning network node will be more secure in their own home, and the transaction through the node can also charge a certain routing fee, why not? At present, manufacturers have been doing such low-cost devices to run lightning network nodes, which will greatly reduce the operating deployment costs of lightning network nodes.

12. Is the Lightning Network a competitor to Bitcoin? Will the Lightning Network affect the income of Bitcoin miners?

The Lightning Network is not a competitor to Bitcoin. It is just a Layer 2 network of Bitcoin that makes Bitcoin easier to use . On the contrary, the lightning network will make Bitcoin develop in a more benign direction, otherwise it will inevitably lead to difficulties such as consensus and bifurcation.

As for the impact on Bitcoin miners' income, I think this issue needs to be discussed from the consensus of the Bitcoin network. In other words, suppose that the current number of people who form a consensus on Bitcoin is N. When the user is still N after the lightning network is applied in a large scale, the income of the miner will be greatly affected . However, if the number of users on the chain increases or the number of transactions on the chain does not change or increases after the large-scale application of the lightning network, the income of the miners will not change or increase . The Lightning Network will greatly increase the circulation of Bitcoin, so it will greatly increase the trading on the Bitcoin chain.

In fact, we have such an example in our lives. Just like we live in Beijing, do you think that the more the subway is repaired, the more crowded it is? When there were only Line 1 and Line 2, were there any seats available? This is because after the scale of the subway, the number of users has increased on a large scale, and the requirements for the capacity of the subway have been higher.

13. Recently, the bitmex research institute issued a report saying that the lightning network operation node has poor revenue and cannot be popularized in the short to medium term. What do you think?

I read it carefully about the research report on bitmex. I believe that the future lightning network operators are in a state of free competition. The benefits are highly uncertain, but there is no explosive income.

 

The lightning network cannot be popularized in the short term, and it does not depend on the revenue of the lightning network node operator, but on how much the actual landing application is.

At this stage, the technology of Lightning Network is still not mature, and the Bitcoin core development team only deploys it on the test network of Bitcoin. The popularity of the lightning network really needs to go a long way. At present, the lightning network is in the stage of thick accumulation.

14. If there are more Ethereum Layer 2 solutions in the future and support Dai, will it affect the lightning network?

I think the impact will be small. If the bitcoin ratio is made into gold, then Ethereum is at best silver. In the future, there will be stable coins on Bitcoin. Just like the relationship between Ethereum and Dai, we are currently doing some research in this area. In addition, many projects in Ethereum are developing high-speed payment systems based on State Channel technology.

15. As a Layer 2 expansion solution, what impact does the Lightning Network have on the Layer 1 solution BCH? Who do you think is more promising?

This question is very interesting. The solution of Layer 1 may eventually lead to hard forks. After a hard fork, different interest groups will play.

This can't help but remind me of the scene of a fairy fight a few months ago, which is the hard fork of BCH. The bifurcation results in BCH ABC and BCH SV. In the course of this hard-forked war, the blockchain digital currency, which was originally fair, just and decentralized, was manipulated by two interest groups at will. This kind of manipulation is bound to lead to both losses, and even the end of the fish.

To solve the problem of Bitcoin expansion, Layer 2's solution is the right direction, and Lightning Network may be the best solution at present.

 

16. Layer 2 solution, what other good projects besides lightning network?

1. Liquidity Network proposes the concept of REVIVE routing algorithm and multi-hub. The concept of hub is the centralized fast transaction under the chain. But the hub does not have a centralized function.

2, Loom Network, focus on sidechain technology, make the game application and Dapp on the blockchain highly scalable.

3. The Bitcoin code core development team uses the Liquid sidechain for blockstream to achieve high-speed payment.

Https://blockstream.com/liquid/ This also supports Liquid sidechain trading in their lightning network implementation c-lightning. But other lightning network developers don't support it.

4. Celer Network is a layer of protocol layer (without independent public chain) built on the public chain. It is committed to building a blockchain application portal platform that matches the scale of the Internet. The logic is similar to lightning networks and lightning networks. Of course, the implementation of such a generalized Layer 2 protocol layer will be a long-term goal. There are still a long way to go to support payment systems on two different chains.

Of course, there are lightning networks, which I think are good solutions.

5

Questioning: evil, security and privacy

17. Some doubts say that the lightning network is no different from the bank. Because it is a solution under the chain, what do you think? Since it is under the chain, how to ensure security?

I think this statement is somewhat one-sided, or it is not accurate enough to understand the design logic of the lightning network.

In the lightning network design, considering the possibility of doing evil, its rigorous design ensures that no one of the channels will dare to do evil, or it will be severely punished. This clever design ensures that instant payments can be securely implemented without third parties. It can be said that the penalty mechanism is the most critical part of ensuring lightning network security.

Regarding this punishment mechanism, I try to describe it in the most understandable language.

We assume that both sides of the transaction are A and B. The transaction between A and B is equivalent to building a contract. This contract is divided into the following sections:

1. A transaction detail record , such as the balance of A after the transaction is completed, and the balance record of B.

2, a lock . Both A and B will buy a lock, leave the key by themselves, and hand over the lock to the other party. The content of this lock is to give the other party the assets that belong to him.

3. A signature , both A and B will build contracts based on this transaction and sign them separately.

4. A contract , after a certain period of time, usually 1000 blocks, will be the other party's assets to the other party.

After the contract is completed, the parties will send each other a contract to each other. This transaction is completed.

The point is that before the second transaction begins, both parties need to exchange the keys for the lock in the first transaction. This means that the second transaction will void the first transaction. If a bad situation occurs, such as still broadcasting the first transaction, since the second transaction has already had the key to lock in the first transaction, the evil party will be punished, and the result of the punishment is that no assets can be obtained. Of course, the transaction party must always check the chain transaction records to prevent the other party from doing evil. This is why lightning network nodes need to be always online.

Specific analysis of the principle of lightning network can refer to the article "I understand the principle of lightning network analysis" link: https://www.chainnode.com/post/310181

18. Some people say that the lightning network will generate centralization and privacy issues. What do you think?

I think the lightning network will generate super nodes, but there will be no centralization of monopoly. The nodes of the lightning network are likely to be a multi-centered form of existence.

It has also been said that the lightning network will die from centralization and super nodes, I don't think so. We can assume a situation where the game of the node operator is passed, and finally there is only one node operator and the super node of the lightning network deployed by the node operator. The entire lightning network is monopolized by this node operator. This situation has actually become a centralized exchange, and if there are only super large nodes, the pressure on the entire network will be challenged and it is very likely that it will not work. This situation is difficult to happen in a freely competitive environment.

More realistically, for the payment, every individual, enterprise, etc. has a demand. As the threshold for the deployment of lightning network nodes is gradually reduced, they will easily and quickly establish their own lightning network nodes.

I don't think the lightning network will bring privacy issues. On the contrary, the lightning network may protect the privacy of users to a certain extent . In fact, we now have no privacy in trading Bitcoin. Almost all exchanges, including OTC, will do KYC. Transactions in Lightning Networks, which may flow through multiple nodes, enable anonymous high-speed payment scenarios.

Here I would like to share that after the paper cash is gradually replaced, all user transactions are recorded by real name, which is terrible, which will pose a challenge to the most basic human privacy. It’s as if your neighbors know all your consumption behavior. We need and, if necessary, reserve such a portion of privacy for humanity.

About BitTribeLab

BitTribe Lab is a global network of innovation laboratories (nodes) with a vision to build a decentralized future information infrastructure and decentralized finance (Defi) new world. Yuandao is the chief evangelist and invites thinkers and science fiction. Novel lovers, technical geeks, open source software developers, etc. joined.