By design, the amount of transactions that can be performed on the Bitcoin network is limited by what is known as the block size limit . The size of the blocks, which are the sets of transactions added to the blockchain, cannot currently exceed 1 MB .

This is not a problem when network usage remains low: all new transactions are validated and included by miners in the next block, so that a transaction will be confirmed in about 10 minutes.

However, during peak usage of Bitcoin, it regularly happens that the limit is reached and the blocks are full. As miners seek to maximize their profit, they favor payouts with the highest fees, creating an auction mechanism.

We then observe an increase in the transaction costs of the most rushed users and an increase in the confirmation times of the less rushed. This happened in particular in December 2017 when the median costs exceeded ten euros and the confirmation times could be counted in days.

The Bitcoin network therefore has a scalability problem , i.e. it adapts poorly to the growing demand for use. To solve this problem, the easiest solution would be to increase the block size limit, as other cryptocurrencies do. But a large part of the Bitcoin community prefers not to use this solution to preserve maximum decentralization of the network. Bitcoin developers therefore prefer off-chain scaling, which is done through several solutions, including the highly acclaimed Lightning Network .

Are you more of a fan of a video explanation? We have what you need.

How does the Lightning Network work?

The basic idea: payment channels

The Lightning Network is based on what are called two-way payment channels . These use smart contracts programmed using the Bitcoin scripting language. They allow repeated payments to be made between two people without them having to pay transaction fees.

Opening a payment channel consists of placing funds in escrow using a multisignature contract included in an opening transaction carried out on the blockchain. This multisignature contract represents a kind of safe shared between the two people: the release of the funds placed inside requires the signatures of both parties. We can for example consider the case of Alice and Bob who open a channel by placing 10 milli-bitcoins (mBTC) each.

Channel opening

 

Once the channel is open, the two people are free to carry out transactions that will not be written to the channel and this is free of charge. These transactions are however limited by the capacity of the channel: Alice and Bob cannot send more bitcoins than they have.

Off-chain payments

 

At any time, the channel can be closed. The closing is normally done on a consensual basis: if both parties are honest, they will pay each other what they owe in the closing transaction . Here Alice will receive 6 mBTC and Bob 14 mBTC.

Channel closure

 

What guarantees that they do not cheat? Before signing and broadcasting the opening transaction, each of the two parties writes a commit transaction which they transmit to the other. These transactions are not broadcast and are simply guarantee contracts to recover its bitcoins in the event of a dispute. Commitment transactions are updated with each payment made within the channel.

Of course, each of the transactions (opening, closing, committing) requires transaction fees paid to miners.

A network of payment channels

The Lightning Network is a network of two-way payment channels . Participants open two-by-two payment channels and are networked through slightly more complex engagement contracts: Hashed Time-Locked Contracts (often abbreviated as HTLC). These contracts allow a member of the network to send funds to another without requiring the opening of a new channel. To do this, the payment is relayed in a secure and confidential manner by the other members of the network.

Suppose Alice wants to send 4 mBTC to Carol but they haven’t opened a channel together. Fortunately, Bob has a payment channel with each of the two people. The transaction can therefore take place by updating the two channels: Alice sends 4 mBTC to Bob and Bob takes care of sending 4 mBTC to Carole. Again, any cheating is made impossible by pledge transactions. Also note that Bob may charge transaction fees for acting as an intermediary.

Payment via the Lightning Network

 

The way intermediates are selected is called routing . Each payment will take a “route” from participant to participant until it reaches its recipient. Thus, anyone can send funds to anyone, subject to channel capacity.

The Lightning Network today?

The Lightning Network was first featured in February 2015 in its white paper, written by Joseph Poon and Thaddeus Dryja. However, it could not be deployed on the Bitcoin mainnet until after the SegWit update was activated in August 2017, which fixed transaction malleability. As of March 2018, the Lightning Network is still in beta.

Use of the Lightning Network is growing. As of this writing, the Lightning Network has over 86,500 payment channels open by over 20,000 active nodes. Its total capacity is more than 3,350 bitcoins. In October 2018, there were only 12,000 payment channels opened by 3500 nodes, the total network capacity was also much lower, only 115 bitcoins. We can therefore say that the Lightning Network has experienced very strong development in recent years.

Lightning Network Nodes Channels

Visual of the number of nodes and channels open on the Lightning Network – Source: ACINQ

 

These last few months have been marked by two extremely important elements for the network. The first concerns the launch of the cryptocurrency payment service on Twitter. The second relates to El Salvador, which has given Bitcoin legal tender and where the controversial Chivo wallet is also used, which is based precisely on the Lightning Network.

Mass adoption of the Lightning Network

Many players have adopted the Lightning Network . Electrum was notably one of the first wallets to take into account the mechanisms of the Lightning Network. After launching Tether (USDT) on the network, exchange BitFinex adopted it as a medium for bitcoin transactions. More recently, she launched Synonym to increase Bitcoin acceptance through the Lightning Network. The Kraken, OkCoin, and OKX platforms have also moved to the second layer of Bitcoin.

The Fold company makes it possible to pay in BTC at Amazon, Starbucks and Uber through the Lightning Network. Bitrefill, a provider of gift cards and phone top-ups, offers its customers the ability to make payments instantly through the Lightning network . A decentralized messaging application, Whatsat , has even been launched on the network architecture.

The interest of users is such that they could be nearly 700 million in 2030 according to a report by Arcane Research. Faced with this enthusiasm, Lightning Labs, the company working on the Lightning Network, released a paid solution: Loop. This allows startups and node operators to send and receive funds on the network in a more efficient way.

The investment firm NYDIG has also acquired the micropayment service Bottlepay, an application that allows small sums to be transferred in Bitcoin through the use of the Lightning Network. A similar application, Cash app, also supports the Lightning Network.

Finally, Chainalysis , the company specializing in blockchain analysis, will add Lightning Network support to its Know Your Transaction (KYT) compliance software in February 2022. The impact of such an initiative is significant. Indeed, many platforms will now be able to support the Lightning Network because they will be much more in compliance with the regulations in force. Thus, the use of the Lightning Network could still grow due to this increased security.

What software to use?

There are various software implementations of the Lightning protocol. The three main ones are:

  • lnd developed by Lightning Labs;
  • c-lightning soutenu par Blockstream ;
  • Éclair developed by the French start-up ACINQ.

A lightweight version of Eclair also exists for Android . This implementation is much more accessible for the average user, the others being rather reserved for developers.

What does the Lightning Network bring?

The Lightning Network is an ingenious solution to Bitcoin’s scalability problem and has certain advantages:

  • Transaction fees are tiny, allowing micro-payments, even allowing their automation;
  • Transactions are almost instantaneous since their validation depends only on the latency of the network. This is where the Lightning Network gets its name: Payments happen at lightning speed;
  • Transactions are much more confidential than transactions on the main chain. This is because transactions occur off-chain, so payments are virtually impossible to track.
  • Scalability : Each network channel can process up to 500 operations per second. And the more channels, the higher the bandwidth;
  • Interoperability with other cryptocurrency projects such as Litecoin (LTC) for example, which the startup ACINQ has greatly contributed to implementing on the Lightning Network by modifying its configuration parameters. Indeed, the company working on this project, Lightning Lab, is working hard to make the network available for any blockchain that would like to implement it.

What are the flaws of the Lightning Network?

Although the Lightning Network is operational on Bitcoin’s mainnet, it is still in the development phase. The network is therefore subject to various problems:

  • The relative centralization of the network around highly connected central hubs ( hubs ), which could lead to a weakening of the network;
  • Nodes must always be online . This means that if a node goes offline, goes offline, another user can close the payment channel, allowing them to take all the funds for themselves;
  • If an intermediate node is disconnected from the network, the transaction can be blocked indefinitely ;
  • Like miners, payment channels can operate like businesses when the people who opened them decide to charge a fee to act as an intermediary . The latter could then begin to favor the transactions with the highest amounts because the commission charged, generally a percentage of the initial transaction, will be mechanically higher. This would disadvantage micro-payments, although it is still possible for parties to choose intermediary channels that do not charge any fees;
  • Mainchain transaction fees : If Bitcoin were widely adopted and block sizes were not increased, there would be a record spike in fees just to open and close a payment channel on the mainchain. Lightning Network, because it is necessary to pass a first transaction on Bitcoin to be able to use the network. This is a pretty serious problem considering that you can be forced to (non-consensually) shut down a channel at any time.

The last negative point may seem ironic in that it is also an advantage of the network, is that it is a protocol whose evolution is constant . This therefore creates risks, so its creators always recommend not to use the Lightning Network for transactions involving large sums of money.

Conclusion

Bitcoin is increasingly tending to become a safe haven . It will certainly experience a massive uptick in adoption in the years to come. The number of blocks being limited like their size, the problem of scalability is therefore inherent to this cryptocurrency which is struggling to cope with its increasingly growing number of users .

The Lightning Network tries to solve this problem by offering almost instantaneous transactions at extremely low fees. This second layer solution of the Bitcoin network could therefore allow automation, in BTC, of ​​all the micro-payments that are made daily on the condition, however, that the entities developing the Lightning Network manage to offer an interface that is more accessible for the average user.

5/5 - (1 vote)

Tagged in:

About the Author

SAKHRI Mohamed

Founder & Editor

Passionate about the web, new technologies and IT, I share on easy-tutorials.com tutorials, tips, advice, online tools and software for Windows, Mac and Linux.

View All Articles