A Dive into Lightning Network (Part Two)

Huobi Research
Aug 7, 2020 · 13 min read

Note:The Link of “A Dive into Lightning Network (Part One)”

The Link of “A Dive into Lightning Network (Part Three)”

3. Ecosystem of Lightning Network

3.1 Develop teams

Since the initial version of Lightning Network whitepaper was published by Joseph Poon and Thaddeus Dryja in 2015, an increasing number of research teams have been starting working on Lightning Network. More details are shown in Table 2. Three of the leading teams (or companies) working on the Lightning Network protocol were Lightning Labs, ACINQ and Blockstream. They introduced optimizations on related technologies based on different programming languages. Apart from the three teams above, Nayuta joined later as a leading player. General introductions to these four teams are as follows.

Lightning Labs, founded in 2016, is an international team that delivers techniques and products based on Lightning Network. Its products (e.g.,Loop, LND, Neutrino) aim at providing secure, efficient and scalable lightning payment system. In addition, they have provided verifiable and non-custodial derivate financial services based on Lightning Network. For open-source developers, Lightning Labs has practically opened up the next-generation ecosystem of Bitcoin financial software.

ACINQ, founded in 2014, is a start-up team from Paris that concentrates on the optimization of Bitcoin scalability. ACINQ developed Éclair (which means lightning in French) based on Scala, which is considered to be one of the most mainstream implementations of the Lightning Network protocol. In addition, ACINQ developed a collection of products based on Éclair, including Phoenix, ACINQ Node and Strike.

Table 2 Main products and team in lightning network

Resource: Public information, Huobi Research

Blockstream, founded in 2014, is a leading lightning service provider in Bitcoin ecosystem, focusing on cryptography and distributed system. C-lightning is one of the most mainstream implementations of Lightning work developed by Blockstream. Other products including Elements, Blockstream Satellite and Liquid Network are built to create an encrypted financial infrastructure framework based on Bitcoin blockchain. Utilizing cutting-edge cryptography and security engineering technology, Blockstream aims to greatly improve transaction efficiency via reducing the cost of trust. Moreover, the team has accumulated valuable experience in building financial transaction protocols in a peer-to-peer open network.

Nayuta is a technical team from Japan, established in 2015, mainly focusing on the development of both software and hardware systems for the Bitcoin ecosystem. In terms of Lightning Network, Nayuta has launched different products including protocol implementation and applications, such as Ptarmigan and Nayuta Wallet. The core product Ptarmigan is compatible with different hardware platforms, so that it can meet emerging payment requirements based on IoT devices. In addition, Nayuta is working on a lightning network based on a permissioned blockchain enterprise users to perform efficient payment and settlement.

3.1 Application

Lightning Network Apps (LApps) having been attracting an increasing level of attention among developers due to its instantaneity and low transaction fee. Nowadays, applications on Lightning Network have covered a wide range of use cases, such as wallet, games, shopping, cryptocurrency exchange, restaurant and instant communication.

Cryptocurrency wallet. According to statistics from Lightning Network Stores, about 30 cryptocurrency wallets emerged from lightning network, compared to 6 in early 2019. They are divided into custodian and non-custodian wallets. The supported platforms are mainly Android and iOS. A few wallets also support Window, Mac, Linux and browser plug-in. Particularly, the veteran wallet Electrum released a new version in early July, 2020, which was equipped with various capabilities, such as lightning network, watchtower and submarine.

Figure 9 Some cryptocurrency wallets supporting lightning network.

Resource: Lightning Network Stores, Huobi research

Instant communication. Some developers created instant communication software based on the features of lightning network, such as Whatsat developed by Lightning Labs. Whatsat enables users to send messages anonymously through indirect connections. On one hand, onion routing enhances anonymity by making the source information untraceable. On the other hand, without a centralized server, it is difficult to trace the conversations between users. Similar applications include LnSMS.world, Receive SMS, Paypercall, etc.

Online shopping. Lightning network introduced great potential for Bitcoin shopping via the characteristics of fast payment and low transaction fee. Some developers provided online shopping malls based on lightning network, such as Bitrefill, Paid.co, CoinMall, Nanopos, etc. Moreover, a few teams managed to allow customers to purchase such goods or services as LN.Pizza and Starblocks on exsisting e-commerce platforms using lightning network wallets. (e.g. Bitcard enables Bitcoin purchase on Amazon)

Games. Thanks to the instantaneity of Lightning Network, a wide range of games in the app stores have attracted much attention. For example, chess game (e.g. Lightning Chess), card game (e.g. Lightning Poker) and gambling game (e.g. BC.game, Luckdice).

Figure 10 Some applications supporting lightning network

Resource: Lightning Network Stores, Huobi research

Cross-chain transaction. Since lightning network is peer-to-peer transmitted, atomic exchange works perfectly on it. As a result, it is convenient for lightning network to enable cross-chain transactions. Related applications such as Sparkswap and ZigZag have appeared on market to provide non-custodial decentralized services for cryptocurrency.

In addition, a large number of applications are active on lightning network. For example, tip payment, advertisement, even applications with specific hardware integrated (e.g. PolloFeed, an application that feeds birds remotely through lightning network).

In summary, the creation of lightning network has injected new vitality into blockchain. Due to the lack of smart contracts, the decentralized application ecosystem of Bitcoin has not been as well developed as Ethereum. Lightning network enables the applications or services we often use to be implemented on Bitcoin network, though the usability and user amount of which is still not comparable to their original version.

3.1 Activity

Enthusiasts devoted boundless energy to blockchain since the birth of lightning network in 2015. On Dec 27th, 2017, the first business transaction where Alex Bosworth used Bitrefill to pay his phone bills came into being. At the beginning of 2018, lightning network was officially launched on the Bitcoin mainnet. In general, the growth trend of lightning network remains flat after a short-term rapid growth.

From October 2018 to March 2019, the number of channels and capacity has witnessed a rapid growth in lightning network. Specifically, channels have recorded a fourfold increase to 40000 and capacity rose tenfold to 1000 bitcoins. On one hand, the growth was attributed to a momentous campaign called “Lightning Torch”. On the other, due to the low-level price of Bitcoin, people were unwilling to cash their bitcoins, resulting in a large deposit in lightning network. Since then, the number of channels and capacity have experienced a slight decline and then an upward trend. Today lightning network, contains 1000 BTC and holds more than 37000 channels in total, which has not yet returned to its peak level in 2019.

Figure 11 Number of lightning network channels

Resource: Bitcoin Visuals,Huobi Research

Note: In this figure, red bar represents multiplexed channel and blue bar represents first established channel

Figure 12 Capacity of lightning network

Resource: Bitcoin Visuals, Huobi Research

Note: In this figure, red line represents the capacity of Bitcoin and blue line represents the dollar value of Bitcoin within channels

Figure 13 Current distribution of lightning network

Resource: Lightning Network Explorer, Huobi Research

Note: Updated on July 13th, 2020

Figure 14 Number of active addresses

Resource: glassnode, Huobi Research

Note: In this figure, red line represents the number of active addresses if bitcoin and blue line represents price (USD)

Currently, the number of nodes on lightning network is approximately 13000. According to statistics from Lightning Network Explorer, most nodes are in Western Europe and the United States, basically the same as Bitcoin’s active areas. In fact, lightning network is a second layer operating on top of a blockchain. That said, users of lightning network mainly come from the conversion of Bitcoin network users. Given that the number of active addresses fluctuates up to 900000 recently, lightning network still has plenty of room for growth. Particularly, we should be aware that the number of addresses and the number of users cannot be equivalent. The improvement of practicality brought by the development of new technologies may be the driving force for lightning network.

4.Key Contributions and Limitations

4.1 Contributions

4.1.1 Increase scalability

It is no doubt that lightning network can greatly increase the scalability of Bitcoin because it is designed to solve the dilemma caused by Bitcoin block size limitations. Not only that, the peak transaction processing throughput is only 7 transactions per second which restricts the development of Bitcoin. However, the combination of RSMC and HTLC enables users to conduct instant small transaction off-chain which not only relieves the pressure on the Bitcoin mainnet, but provides a convenient payment method as well. In summary, it enables a larger expansion of blockchain.

4.1.2 Reduce transaction time and cost

The transaction cost can be saved through two methods. 1. Reduce the waiting time. We know that every transaction takes 10 minutes to commit and 1 hour to confirm on Bitcoin main chain. For peer-to-peer mode in lightning network, it requires an agreement signed by both sides to commit the transaction. Moreover, the duration of channels is not limited, so users are able to update their fund status until the transaction ends, which reduces the waiting times from multiple to once. 2.Reduce transaction fee. Every transaction on the Bitcoin mainnet requires a certain fee, which has fallen back from 55 dollars to 1 dollar recently; nevertheless, not all transactions except opening and closing a payment channel on lightning network need to be synchronized with the mainnet. At present, the main routing nodes in lightning network only earn about 100000 Satoshi (equivalent to 7 dollars) a day. As a result, lightning network provides users with a better choice for medium-frequency and high-frequency small payments.

4.1.3 Support cross-chain transaction

Three main cross-chain mechanisms on blockchain are as follows: 1. Notary schemes 2. Sidechains/Relays 3. Hash-locking. Compared to the other two types, hash-locking is independent so it is more robust against 51% attack and is the most lightweight as well. Due to hash-locking, lightning network naturally supports cross-chain transaction, which enables trustless multiparty cross-chain transactions.

4.1.4 Promote development of Bitcoin ecosystem

As a peer-to-peer electronic cash system, the ecosystem of Bitcoin network is based on fast payment. Undoubtedly, the birth of lightning network is of great significance for breaking the bottleneck of Bitcoin payment. Although a certain gap does exist between Bitcoin and traditional payment solutions such as Alipay and Visa. For Bitcoin, it has taken a big step for instant payment, providing important technical support for penetrating into daily life.

In addition, the Bitcoin ecosystem has always been criticized for failing to develop a decentralized app ecosystem like Ethereum. As a result, it is only applied to payment and investment, even speculation and inevitably restrict the user group. Fortunately, the birth of LApps has paved the way for fully distributed applications in Bitcoin ecosystem. To conclude, the reduction in transaction cost, together with high-performance in micropayment, has attracted more community developers to join, contributing more diversified applications. The more applications are developed, the more users will be attracted. Finally, a positive cycle is formed.

4.2 Limitations

4.2.1 Restricted payment ceiling

Indirectly connected users actually make transactions through payment relays, which might cause the funds of routing node insufficient to complete, leading to difficulty paying with larger funds. The momentous relay campaign called “Lightning Torch” also seemed somewhat non-active due to liquidity problems.

However, Blockstream announced that atomic multi-path payment technology has passed the interoperability test at the end of December 2019. C-lightning also supports larger channel payment in version 0.8.2 released in mid-May 2020, removing the payment limit of 0.16 BTC. Although the two technologies above have not been widely implemented in lightning network, the development of extension techniques is expected to effectively solve the problem of the upper limit of lightning network payment channel. In the coming future, lightning network will penetrate into more aspects in the fields of finance and commerce.

4.2.2 Severe centralization of nodes and funds

The centralization problem has raised many concerns since lightning network went online. Main problems are twofold: 1. Centralization of routing nodes 2. Centralization of funds.

With HTLC, lightning network realized the establishment of payment channels between users who were not directly connected. However, maintaining intermediate routing nodes requires a certain technical threshold. At the same time, low commissions hardly motivate user nodes. Thus, routing nodes are centralized. In fact, centralized nodes not only reduce the path length of the routing to some extent, but improve the stability of the transaction as well. At the same time, it will inevitably introduce new challenges (e.g. single point, data privacy), which violates the idea of decentralization of blockchain. Even worse, it may spawn the centralization of fund.

In order to ensure that the central routing nodes are able to bear more routing load, it will inevitably deposit a large amount of fund on nodes. A paper which analyzed the data of lightning network from January 14th, 2018 to July 13th, 2019indicated that distribution of funds within lightning network has been imbalanced, with a 0.88 Gini index. It showed that only 10% of the nodes hold 80% of the funds and 50% of the nodes hold 99%. To sum up, it is not a healthy development of the ecosystem.

Figure 15 Centralization of lightning network

Resource: Lightning Network: a second path towards centralization of the Bitcoin economy, Huobi Research

4.2.1 Unstable network

In terms of payment systems, stability is the first priority. No one is willing to deposit their funds on a platform that collapses frequently. But the truth is that lightning network is too young to run stably. The most significant problems of stability are as follows: single point problem, liquidity attack problem and payment success rate problem.

Single point problem evolved from the centralization problem which we mentioned ahead. Once the central node or channel is attacked and lost, other nodes will be turned into orphan nodes, which greatly reduces the availability of the entire network. Even worse, it causes a network paralysis. As shown in Figure 16, the number of key channels has reached more than 2200, accounting for about 38% of the total. Particularly, we should mention that if a channel is disconnected, some nodes are not able to form a payment path.

Figure 16 Number and proportion of key channels

Resource: Bitcoin Visuals

Note: Blue bar means number of key channels and red line means proportion of key channels.

Another stability problem to worry about is liquidity attack problem. A paper mentioned that under the existing lightning network technology, an attacker is able to use less than 0.25 BTC to freeze liquidity of more than 650 BTC for 3 days. The main idea of this attack is that the attack nodes transfer a small amount of funds as both a sender and a receiver, while receiver does not provide R for previous nodes after signing HTLC, so that the liquidity of nodes on channel is all locked and the entire chain is in waiting state. As a result, liquidity of the whole network has been constrained.

Figure 17 Principle of Liquidity Attack

Resource: Congestion Attacks in Payment Channel Networks, Huobi Research

Not only that, probability of successfully routing a payment channel is an important criterion to measure the stability. According to a report by Diar at the end of June 2018, the rate was about 70%. As the amount increases, there will be a significant decline. When the transaction amount exceeds 300 USD, the success rate is only 1%, which echoes “payment channel ceiling” mentioned earlier. At the same time, the offline of intermediate routing nodes is also one of the reasons for the transaction failure. Lightning network requires both parties to sign a contract online at the same time. If one of them goes offline, the transaction will be shelved. Once the offline duration exceeds the agreed time of time lock, the transaction fails.

Figure 18 Probability to successfully route a payment between nodes

Resource: Diar,Lightning Strikes, But Select Hubs Dominate Network Funds, Huobi Research

4.2.1 Problem of data privacy

Despite of the increased the difficulty of payment path tracing due to onion routing, most transactions will be completed through intermediate nodes, which greatly increase the risk of exposing data privacy when nodes are centralized. At the same time, it is more likely to expose the identities of node owners nowadays when big data technology is widely used. If the centralization problem can be solved, the privacy problem can be alleviated as well.

4.2.2 Constrained network scalability

The optimization of the scalability of lightning network itself also has also attracted much attention. Since each node in the network needs to maintain a payment path routing table due to the source routing mechanism. When the network scale is expanded, new issues arise as further limitations of lightning network, including the storage and update of connection information and available funds of the whole network, efficient payment routing and arrangement of funds in a highly concurrent context.

4.2.3 High barriers to use

Lowering the user threshold is the first priority for the popularization of applied technologies. It is not easy for Bitcoin users to understand how to use lightning network to initiate a transaction or earn commissions as a routing node, not to mention non-Bitcoin users. Since lightning network is still young, without mature commercial packaging, users have to figure out the technical details when doing business with others. Moreover, the operating system is not friendly so that users are likely to encounter tricky payment failures, which greatly affects their use experience.

Huobi Research

Blockchain industry top think tank, affiliated to Huobi Group.