In the Bitcoin white paper, Satoshi Nakamoto positioned it as "a peer-to-peer electronic cash system". However, after more than a decade of development, Bitcoin has not become "electronic cash" but "electronic gold". People regard it as a medium of value storage (SoV), and the U.S. Commodity Futures Trading Commission (CFTC) classifies it as a commodity. Bitcoin produces one block every 10 minutes on average, with a TPS of only 7, which leads to long transaction confirmation time and frequent chain congestion. Transaction fees (mining fees) are not cheap. In order to become "electronic cash", Bitcoin must solve the problem of "slow and expensive".

Over the past decade, many technical solutions have emerged in the Bitcoin community to help Bitcoin scale: some solutions are implemented through forks, such as SegWit separating witnesses from other transaction data, and Taproot using MAST to expand Bitcoin; some solutions do not change Bitcoin itself, but choose to use space outside the chain, such as sidechain technology that chooses to transfer assets to other blockchains, and payment channel networks that choose to transfer most transactions to off-chain for execution.

The Lightning Network that I will introduce today is a type of payment channel network. In the Bitcoin payment scenario, the Lightning Network can help users save costs and improve efficiency.


What is the Lightning Network?


The Bitcoin Lightning Network is a P2P network superimposed on the Bitcoin blockchain. It is a Layer2 solution for Bitcoin that aims to address the limitations faced by the Bitcoin network in terms of scalability and transaction speed. The Lightning Network enables instant, low-cost and scalable small payments while maintaining decentralization and security. By using off-chain payment channels and smart contracts, users can conduct transactions directly without broadcasting each transaction to the main chain. This approach greatly reduces the load on the Bitcoin network, making transactions faster, cheaper and more private.


We can simply use Mahjong to understand the Bitcoin Lightning Network:

  • Before starting to play mahjong, each player takes out a certain amount of cash (such as 100 yuan) and puts it in the middle of the table, which is equivalent to trading on the Bitcoin main chain and opening a payment channel. At the same time, everyone uses playing cards as a temporary scoring tool, and each playing card represents 5 cents.

  • During the game of Mahjong, the winner takes a corresponding number of playing cards from the loser, and this process is like an off-chain transaction in the Lightning Network - fast, no confirmation required, and does not affect the cash in the middle of the table (the Bitcoin main chain).

  • If a player runs out of cards, he can take out some cash and put it in the middle of the table in exchange for more cards, which is like recharging a channel in the Lightning Network.

  • At the end of the mahjong game, each player counts the cards in his hand and then uses the cash placed in the middle of the table for final settlement. This process corresponds to the channel closing and on-chain settlement in the lightning network. Only the final result is recorded in the "official ledger" (that is, the Bitcoin blockchain), and all the small transactions in the middle (the wins and losses of each mahjong game) do not need to be recorded separately.

The analogy of the Mahjong game can help us better understand the Lightning Network, but the actual Lightning Network is much more complicated, and its engineering implementation is also more complicated. We will explain in detail how the Lightning Network works in a later article, so stay tuned.

What is Lightning Network not?

In order to better understand the concept of Lightning Network, in addition to knowing what it is, you also need to understand what it is not.


1. Lightning Network is not a blockchain

The essence of blockchain is a distributed ledger. All on-chain transactions will be broadcast and recorded in this ledger, so a consensus mechanism is needed to maintain it. Usually, its own tokens will be issued to incentivize miners/nodes to maintain the ledger.

The Lightning Network mainly relies on hash time lock contracts (HTLC) to ensure the security of funds. There is no so-called consensus mechanism, and transactions in the Lightning Network will not be broadcast to the entire network. Only the final settlement will be broadcast to the Bitcoin main chain. In addition, the Lightning Network does not issue its own tokens, nor does it need to do so.


2. Lightning Network is not Rollup

Although both Lightning Network and Rollup execute transactions off-chain, there are significant differences between the two. Rollup performs transactions and calculations off-chain, then packages multiple transactions into a batch, and regularly submits transaction results and proofs to the main chain; while Lightning Network opens payment channels off-chain, and conducts multiple transactions through these channels, only Interacts with the main chain when opening and closing channels.

In terms of data availability, Rollup needs to publish data on Layer 1; while the transaction data of the Lightning Network is mainly stored between participants and not on the chain.

In terms of security model, Rollup mainly uses fraud proofs with a challenge period of about one week, or uses zero-knowledge proofs to provide instant finality; while the Lightning Network relies on Watchtower and timely response to fraud.

In terms of liquidity, Rollup does not require pre-locking funds; while the Lightning Network requires locking funds in the channel.

The development of Lightning Network

The Lightning Network has always been regarded by the Bitcoin community as the orthodox Bitcoin Layer 2 solution, and its orthodoxy is related to Satoshi Nakamoto.

The earliest concept of the Lightning Network was called "payment channel", and its design idea was to use transaction replacement to update the status of unconfirmed transactions until they were broadcast to the Bitcoin network. When Satoshi Nakamoto created Bitcoin in 2009, he had the idea of ​​payment channels and included a draft code for payment channels in Bitcoin 1.0, which allowed users to update transactions before they were confirmed by the network.

Later, in a reply email to developer Mike Hearn, Satoshi Nakamoto further explained the payment channel: "Intermediate transactions do not need to be broadcast, only the final result will be recorded by the network. Just before nLockTime, all parties and some witness nodes broadcast the highest sequence tx they saw." This is the prototype of the Lightning Network and the birth of its legitimacy.

In the following years, payment channel-related solutions emerged one after another, but none of them had much impact. It was not until the beginning of 2015, when the draft white paper "The Bitcoin Lightning Network: Scalable Off-Chain Instant Payment" written by Joseph Poon and Thaddeus Dryja was released, that the development of the Lightning Network gradually became clear. In the same year, a paper from the Zurich Polytechnic Institute, "A Fast and Scalable Payment Network with Bitcoin Duplex Micropayment Channels", proposed relying on time locks as a "countdown device" for channel validity, and a cryptographic technique called "invalidation tree" to invalidate old channel transactions, which later became the technical prototype on which the Lightning Network relied.

At the Scaling Bitcoin Milan conference in October 2016, the Lightning Network protocol specification (BOLT, Basis of Lightning Technology) was born. In the summer of 2017, Segregated Witness (SegWit) was activated on the Bitcoin blockchain, paving the way for the implementation of the Lightning Network. In March 2018, Lightning Labs released a beta version of the Lightning Network implementation, which has the functionality to support early users, marking a milestone in the development of the Lightning Network.

Source: https://cryptoyc.medium.com/A Brief History of Lightning Network-4032bf4c8868

The Lightning Network is an open source project, so anyone can contribute code. Currently, the more representative Bitcoin Lightning Network implementations (clients) include LND (Lightning Network Daemon) developed by Lightning Labs, Eclair developed by ACINQ, and CLN (Core Lightning) developed by Blockstream.

图片

Source: https://www.btcstudy.org/2023/03/27/what-are-the-differences-between-lnd-and-cln/

In addition to the Bitcoin Lightning Network, some other blockchains are also developing their own Lightning Network implementations. For example, Cardano is developing Hydra, and Nervos CKB has launched a test version of the Fiber Network.

The story of the Lightning Network is still going on, and its development will be one of the important directions worth paying attention to in the Bitcoin ecosystem and even the entire cryptocurrency field. We hope that in the near future, the Lightning Network will help us realize Satoshi Nakamoto’s original P2P “electronic cash” vision and provide a more efficient and convenient solution for small, fast payments around the world.

References

1.https://www.chaincatcher.com/article/2108718

2.https://www.chaincatcher.com/article/2087343

3. https://cryptoyc.medium.com/A Brief History of Lightning Network-4032bf4c8868

4.https://www.btcstudy.org/2023/03/27/what-are-the-differences-between-lnd-and-cln/