Author: F.F from LBank Labs Research team
TL;DR
Welcome to the third article in our “Renaissance of Bitcoin Scaling” series. In this article, we will explore the Lightning Network, the earliest payment protocol built on top of Bitcoin. The Lightning Network has been developed to address the scalability issues and limited transaction capacity of the Bitcoin network.
Unlike other scaling solutions that aim to compress transactions and blocks, and post them on the Bitcoin network, such as rollups on Ethereum, the Lightning Network enables off-chain transactions. “The best way to improve throughput is to let transactions disappear on Bitcoin network”. By reducing the number of transactions that need to be processed on blockchain, Lightning Network allows for faster and cheaper transactions with extremely low fees. This makes micropayments, which are not feasible on the Bitcoin network due to high fees, an ideal use case for the Lightning Network.
While it may seem like the Lightning Network is solely focused on improving payment throughput, it is actually one of the first implementations of a multi-party Smart Contract, using Bitcoin’s built-in scripting. It is leading technological development in multiparty financial computations with Bitcoin. With community efforts, the Lightning Network could make Bitcoin greater again, create more possibilities, such as adding native functionality to Bitcoin, upgrading the capital efficiency of BTC, and implementing smart contract capabilities on Bitcoin.
In this article, we will delve into the history and cornerstone of the Lightning Network and show the steady growth of the network. And how it gets recognized by the Bitcoin community. Then, we will explore the vision of the Lightning Network upon Bitcoin, including the settlement layer for asset issuance and the original goal of Satoshi Nakamoto, a global peer-to-peer electronic cash system.
Long-Standing Cornerstone
Elegant Combination of Script and Game Theory
The Lightning Network is a network of channels where all parties have multiple multisignature channels with many direct users. This network allows one to send a payment to any other party across the network. However, the real cornerstone of the Lightning Network is its script contract and game theory design. It showcases the best scaling combination and principle of Bitcoin scaling. Further details and specific reflections will be provided in the following sections.
Due to the conservative nature of the Bitcoin community, Bitcoin tends to keep itself simple and pure. Even the script contract upgrade has to be discussed over and over again and finally adopted through BIPs. From the early days of the Lightning Network, we can see that it took nearly a year to achieve consensus on the specification and another two years to finally launch the product-ready version.
Here are some important milestones in the development of the Lightning Network:
- In 2015, Joseph Poon & Thaddeus Dryja published “The Bitcoin Lightning Network: Scalable Off-Chain Instant Payment” whitepaper
- In 2015, Gregory Maxwell (Blockstream CTO) developed the C-Lightning (C Language implementation).
- In January 2016, Lightning Labs (Joseph Poon, Thaddeus Dryja, Elizabeth Stark, Olaoluwa Osuntokun) developed Ind (Go Language implementation).
- In late 2016, MIT’s Thaddeus Dryja created Lit (Another Go Language implementation).
- In late 2016, “BOLT” (Basis of Lightning Technology (Lightning Network Specifications)) was presented at Scaling Bitcoin Milan, with a focus on product minimization.
- In 2017, SegWit launched.
- In January 2017, Lightning Labs released the alpha version of lnd.
- In December 2017, Blockstream and Lightning Labs conducted interoperability tests.
- In 2018, Lightning Labs released the beta version of lnd.
However, thanks to the efforts of the Lightning community and other core upgrades like Taproot, they pave the way to build other alternative solutions.
Core Components
In short, Funds are placed into a two-party, multisignature “channel” bitcoin address, which is represented as an entry on the bitcoin public ledger. To spend funds from the channel, both parties must agree on the new balance. The current balance is stored as the most recent transaction signed by both parties, spending from the channel address. To make a payment, both parties sign a new exit transaction spending from the channel address. This invalidates all old exit transactions.
The Lightning Network allows for unilateral channel closure by either party, so cooperation from the counterparty is not necessary. Since all parties have multiple multisignature channels with many different users on the network, payments can be made to any other party across it. By embedding payment conditions upon knowledge of a secure cryptographic hash, payments can be made across a network of channels without any party having unilateral custodial ownership of funds.
The Lightning Network enables what was previously impossible with trusted financial systems vulnerable to monopolies. Participation on the network can be dynamic and open for all, without the need for custodial trust and ownership.
The protocol comprises two essential components, with game theory design integrated into its architecture. About the mechanism of these two components, there are lots of existing materials, we won’t dwell on it.
Revocable Sequence Maturity Contract (RSMC)
The Revocable Sequence Maturity Contract (RSMC) ensures secure off-chain transactions. Unlike previous micro payment channels, RSMC supports payments in both directions and protects against counterparty risk.
To help clarify and simplify the workflow and mechanism of RSMC, let’s consider an example. Imagine two people, Alice and Bob.
- Open the channel: funding transaction
The funding transaction is in P2WSH format, for example, 2 <pubkey1> <pubkey2> 2 OP_CHECKMULTISIG. Both parties must sign to spend the output.
2. On the channel: commitment transaction
When Alice and Bob are on the channel, they both keep a ledger of their balance. The protocol ensures that it’s economically beneficial for them to agree on this ledger, as there is a counterbalance between Alice and Bob.
In every transfer, Alice creates a commitment transaction that acts as a refund transaction, allowing Bob to immediately retrieve the funds if broadcast on the mainnet, while Alice has to wait for a time window. Bob has the same arrangement. The game theory here is that Alice would prefer to complete the transaction off-chain on channels. This way, Lightning Network incentivizes peers to keep the channel alive.
RSMC is at the core of this, where both parties have the handhold of the opposite. In every transfer, Alice embeds the hash of a key that is only known to Bob, and Bob hands over the key whose hash has been embedded in the last transaction, same from Bob’s side. Alice can use the key to revoke previous transactions if Bob cheats to post the previous transaction to Bitcoin. In this case, Alice can take all the funds of the channel as a penalty. The most recent transaction’s revoke keys are not revealed, which finalizes the state of the channel.
3. Close the channel: closing transaction, penalty transaction, commitment transaction
With numerous “double spends” from an on-blockchain transaction, they have elected not to broadcast the spend until either party wants to redeem their funds on-chain. Either party may broadcast the most recent transaction, the current local consensus state, to the global blockchain at any time to redeem their current balance of funds. There are three cases for closing the channel:
- Mutual close: Alice and Bob both sign the closing transaction to Bitcoin, specifying two outputs spendable by each other, without pending payments, and post the latest both signed commitment output.
- Unilateral close: Alice or Bob posts the latest commitment transaction to close the channel unilaterally, if the counterparty has no responses.
- Revoke to close: Alice or Bob broadcasts an old transaction state, and the counterparty could revoke it to take all the funds on the channel as a penalty.
Hashed Timelock Contract (HTLC)
The Hashed Timelock Contract (HTLC) is a mechanism that enables atomic transfer in the network and supports multi-hop transfer. The two main requirements for lock contracts are:
- The signers must submit the pre-image of the hash that meets the criteria, along with a valid signature.
- The transaction must be submitted within the specified time window.
In order to explain multi-hop transfer, we will introduce Charlie. Let’s say Alice wants to transfer 1 BTC to Charlie, but she doesn’t direct channel with Charlie
- Charlie generates a secret, and sends the hash to Alice
- Alice creates HTLC contract with Bob using the hash, and sets the longer time window
- Bob creates HTLC contract with Charlie using the hash, and sets the shorter time window
- Charlie reveals secret and gets BTC, then Bob knows the secret and gets BTC
By using this method, we make sure that Charlie receives the BTC first and there is no significant risk of corrupting the transfer. However, there are new challenges, such as reducing the exposure of the transfer route. The Lightning Network uses onion routing to solve this problem. The routing is easy to understand by looking at the name. The secret is wrapped layer by layer and hidden inside. Each layer only knows the outer and inner layers, and cannot tell what the global onion looks like.
For instance, let’s say another person named Dave is added to the scenario. Alice intends to transfer 1 BTC to Dave, and she selects the route (Alice -> Bob -> Charlie -> Dave) via gossip protocol. She then proceeds to create the onion. Initially, Dave and Alice are aware of the payment secret. Alice wraps the secret and other payment details into a small onion using the shared secret known only by Alice and Dave. Subsequently, Alice wraps the small onion, channel ID, and other payment details into a larger onion using the shared secret only known by Alice and Charlie, and so forth. The shared secret is generated by combining the one-time session private key of Alice and the public key of the corresponding node. Alice adds a blinding factor to each of the private keys used in onion wrapping, thereby preventing others from determining the sequence of these onions. To prevent leakage of onion size information, Alice generates some junk bytes to maintain uniformity in size. Consequently, these disguised onions appear identical to the outside. Alice transmits these onions to Bob and Charlie, who construct the HLTC using unlocked information.
Steady Growth of the NetworkCurrently, there are 16,241 nodes, 68,135 channels existing on Lightning Network. And Lightning Network holds 4,690 BTC. That’s 117M TVL if we assume BTC is $25,000. If we are looking back at the whole history, blue line is the TVL counting in USD, we don’t see significant drops like EVM ecosystem, the solid background of Bitcoin supports the Network’s value. From another perspective, orange line is the capacity counting in BTC. It’s a much more steady growth trend even in the bear market. In some well-known retracement of the whole market, Lightning Network seems not to be affected.
Currently, there are 16,241 nodes and 68,135 channels in the Lightning Network, holding 4,690 BTC. Assuming a BTC value of $25,000, this equates to a total value locked (TVL) of $117 million. When looking at the historical trend, the blue line represents TVL in USD, which shows a steady growth without significant drops, unlike the EVM ecosystem. The solid foundation of Bitcoin supports the network’s value. On the other hand, the orange line represents capacity in BTC, which demonstrates a more consistent growth trend, even in bear markets. Despite market retracements, Lightning Network appears to remain unaffected.
From the nodes and channels side, we also come to the same conclusion. In the recent halving cycle, we have witnessed extraordinary growth in Lightning Network, and it’s also the first cycle in Lighting history. We may have a much bigger movement in the next mass adoption wave.
Looking at the nodes and channels, we can draw the same conclusion. During the most recent halving cycle, we saw an impressive surge in the Lightning Network, marking the first cycle in its history to experience such growth. With the next wave of mass adoption on the horizon, we can expect an even greater expansion in the future.
Ultimate Settlement Layer
The Ultimate Settlement Layer was initially proposed by the Ethereum community because Ethereum’s capacity was unable to handle intensive computing tasks. Therefore, it turned itself into a settlement layer for web3. However, the most valuable and secure layer has always been Bitcoin, which took a simple design at the beginning. The spirit of modular blockchain is ingrained in Bitcoin, which is why Bitcoin remains the ideal settlement layer. We have seen many innovations in this area.
OminiLayer & OmniBOLT
OmniLayer was the earliest protocol that attempted to issue tokens on Bitcoin. In one word, OmniLayer leverages OP_RETURN followed by the token transaction specification, limited to 80 bytes. The token protocol scans the entire Bitcoin transactions and processes the remaining logic.
The advantages and disadvantages of the OmniLayer are apparent throughout history. It is non-intrusive for Bitcoin as it is only a new transaction format. The OP_RETURN part will be ignored by Bitcoin nodes, meaning no additional storage and computing burden for the Bitcoin network. However, its security relies on the token protocol nodes, and the token protocol nodes requirement grows as the Bitcoin network expands. Most importantly, transactions are slow on the Bitcoin network, so there is no improvement in throughput.
We can see the rise and fall of Omni-USDT, which was the first asset on Bitcoin using OmniLayer, also the first USDT token in 2014. As of now, Omni-USDT is still the fourth biggest issuance. While the total authorized amount is 888M, 629M among them are not issued. The liquid amount is only 227M. For comparison, Tron has 42B, Ethereum has 39B USDT. Therefore, we may see the slow retreat of Omni-USDT in the near future.
That’s why Omin Foundation turned to OmniBOLT, which is a variant of BOLT, the Basis of Lightning Technology. The key difference is that OmniBOLT supports token transfer other than BTC and atomic swaps between the tokens. At first glance, it may sound promising. However, when we dig into the details, we realize that the tokens are actually issued on OmniLayer and circulated via a lightning channel. Here come two unavoidable challenges. First, there are limited ceilings when the assets are actually issued on OmniLayer. Second, OmniBOLT is a new token standard and upgraded version of BOLT, which needs to achieve consensus across the Bitcoin and Lightning Network communities, making it a time-consuming and tough process. That’s why we didn’t see the move of Tether on OmniBOLT but turned to RGB. We will cover RGB in detail in our future article.
BRC20
When referring to BRC20, it is important to discuss Ordinals. Ordinals utilize SegWit (Segregated Witness) and P2TR (Pay-to-Taproot) to encode data on sats. This is an innovation that is not often seen, but it also utilizes OP_RETURN similar to Omnilayer. While Ordinals provide more flexibility in storing data, whether it be an image, text, or something else, the key innovation here opens up space for NFTs. The sats themselves are BTC and have a core value, making them suitable for expensive digital art collections. If BTC is considered digital gold, then Ordinal is the digital form of gold ornaments.
However, when it comes to BRC, it simply specifies the format of simple token metadata as shown below. It is more of a regression than an innovation. While Ordinals are great, BRC20 is not.
{
"p": "brc-20",
"op": "deploy",
"tick": "ordi",
"max": "21000000",
"lim": "1000"
}
While the enthusiasm around building on Bitcoin is encouraging when BRC20 is popular, the response from the fee market indicates that these protocols are not designed for scalability. Therefore, a native, scalable token standard on Bitcoin is necessary.
Taproot Assets
Previously, Taproot was referred to as the Taro (Taproot Asset Representation Overlay) proposal by Lightning Labs for the Bitcoin upgrade proposal (BIP). Lightning Labs, being the dominator from the beginning, with both authors of the whitepaper being co-founders, has a significant influence on pushing Taproot Assets to become standard harmonization.
The Taproot Assets Protocol was designed to operate maximally off-chain via the Lightning network to avoid the blockchain congestion seen recently. The protocol is light-client friendly, making assets issued with the protocol more accessible worldwide. This functionality differs from existing protocols in the asset issuance space, which require developers to run a full node and maintain a multi-gigabyte indexer to track all the additional assets.
In essence, Taproot Assets draws on the Taproot and the rollup idea. Developers can embed arbitrary asset metadata within an existing output using Taproot, while Taproot Assets only store the root of MS-SMT (merkle-sum sparse merkle tree) on Bitcoin using the rollup idea.
- MS (Merkle-Sum) is a type of merkle tree that contains numeric values at each leaf, with each node carrying the sum of the values below it. It can be used to prove both the existence of a file and its size while proving valid conservation/non-inflation.
- SMT (Sparse Merkle Tree) is an authenticated key-value store, with the key or location of a leaf and the content of the leaf bound to each other. It can be used in non-existing proof, the sequence of the leaves, enabling fast, efficient, private retrieval, and updates to the witness/transaction data.
The root of this tree is added to a taproot tapscript, and together, a taproot address is created. Taproot Asset issuers store sparse Merkle sum trees off-chain and issue proofs to asset holders out of band instead of its blockchain. Asset owners can independently verify that their account is included in the tree, filled with the appropriate amount, and the corresponding taproot transaction exists and is confirmed on the Bitcoin blockchain. Taproot Assets is a flexible protocol, which doesn’t prescribe how individual account holders interact with each other. It only specifies the asset proof format and script format. They can also be transferred on-chain or used to open Lightning Network channels. There is a service like Data Avaliability Layer called Universe to retrieve data, providing information about assets as well as proofs for asset holders.
For Bitcoin, it allows assets other than BTC to be represented on the Bitcoin blockchain, both FT and NFT. For Lightning Network, it enables moving to a multi-asset network with Bitcoin at its core.
Lightning Labs is proposing BIPs to achieve consensus. The latest version of Taproot Assets is v0.2, with mainly three upgrades.
- Virtual Partially Signed Bitcoin Transactions (vPSBTs): a community standard defining how developers can allow their users to build, sign, and verify Bitcoin transactions easily.
- Universe APIs: Discovering and publishing assets with the initial Universe APIs
- Multi-asset mints, sends, and receives: a single transaction for maximum chain-space efficiency
Aside from these upgrades, we may see Lightning Labs keep pushing the boundary of Lightning Networks. More assets settle on Bitcoin, more transfer and swap demand arise, Lightning network circulates BTC, BTC may be the route fees, and given new functionality.
Original Global Payment Vision
Satoshi’s original intent for Bitcoin is a global peer-to-peer electronic cash system. But reality is Bitcoin itself can’t satisfy the demand of global settlement. That’s why we are counting on Lightning Network to achieve this vision.
One of the key benefits of the Lightning Network is its ability to enable instant payments between users. Transactions can be processed in real-time, without having to wait for confirmation on the blockchain, making it an attractive option for merchants who can receive payments instantly. According to the stats of Blockstream, Lightning Network can realize 40M tps, far beyond other competitors on the market, including the fast Solana, not to mention Ethereum. And the common global payments right now, Visa is 24K tps, and Paypal is 193 tps. Lightning Network can fully meet the requirements.
Satoshi’s original goal for Bitcoin was to create a global peer-to-peer electronic cash system. However, Bitcoin itself is unable to meet the demand for global settlement. That’s where the Lightning Network comes in to achieve this vision.
One of the main benefits of the Lightning Network is its ability to facilitate instant payments between users. Transactions can be processed in real-time, without waiting for confirmation on the blockchain, making it an appealing option for merchants who can receive payments instantly. According to Blockstream’s statistics, Lightning Network can process 40M transactions per second, surpassing other competitors on the market, including the fast Solana, not to mention Ethereum. In comparison, the current global payment systems are Visa at 24K transactions per second and Paypal at 193 transactions per second. Therefore, Lightning Network can meet the requirements for fast transactions.
Although the Lightning Network has gained traction in recent years, with more users and merchants adopting technology, we should expect much greater growth driven by user-friendly Lightning wallets and tools, making it easier for users to transact on the Lightning Network. Currently, the Lightning Network’s capacity is only 4.6K Bitcoin, which is only 0.02% of BTC circulating on the Lightning Network.
We should expect more adoption in the real world, especially in developing countries. Many people say that what blockchain can do is a global payment system that sounds like a single purpose. However, global payment systems can meet the needs of a vast number of people, especially in countries where the financial infrastructure is not well-established. They can not build a global support system by themselves, so they really need a payment tool first. And the Lightning Network is born to solve that problem.
Web2 payment giants may adopt the Lightning network as a defense, but they won’t be replaced by Lightning Network to revolutionize themselves. Therefore, we would expect a web3 payment giant to be born to promote the Lightning Network. After all, many new L1s are competing to be the next computing network, but few of them focus on solving the basic global payment solution, which is an underestimated track. It’s a business needed everywhere and anytime.
Here comes Lightspark, another big player in the Lightning Network ecosystem. Lightspark was founded in 2022, raising $175M in Series A funding on May 12, 2022, valued at around 1B. Like Aptos, Sui, and Linea, Lightspark also derives from Meta. But Lightspark is a much purer team of Meta, focusing on the payment system.
- David Marcus, co-founder, and CEO of Lightspark. In 2018, David started Diem (formerly known as Libra). He joined Meta in 2014 to lead Messenger, which he took from under 200M monthly users to over 1.5B. Previously, he was PayPal’s President. Marcus launched two companies in Europe, then founded the mobile payments company Zong in Silicon Valley, which was acquired by PayPal in 2011.
- Christian Catalini, co-founder, and Chief Strategy Officer. He previously co-created Diem (formerly known as Libra). He is the founder of the MIT Crypto Economics Lab and designed the MIT Bitcoin experiment in 2013.
- Kevin Hurley, co-founder, and Chief Technology Officer. He has extensive experience in the payments ecosystem, including roles at Meta/Facebook and worked on Diem (formerly known as Libra), Novi, Messenger, and WhatsApp payments.
- James Everingham, co-founder, and SVP of Engineering. He held leadership roles at Meta/Facebook, Instagram, Yahoo, and Netscape.
- Christina Smedley, co-founder, and Chief Marketing & Communications Officer. She has led the marketing, communications, content, and brand teams at Amazon, Edelman, Facebook/Meta, PayPal, and Robinhood.
- Tomer Barel, co-founder, and Operating Partner at Lightspark. He has executive leadership roles at Meta/Facebook (Novi) and PayPal.
- Jai Massari, co-founder, and Chief Legal Officer. She was a partner at Davis Polk & Wardwell LLP and a leader of the firm’s fintech and cryptocurrency practice.
The 7 co-founders have a strong background in Meta/Facebook and PayPal, with 6 and 3 of them respectively having worked there. This experience has given them the expertise needed to build a robust payment system. While Aptos and Sui are more interested in Move Language and building a smart contract platform, Linea is using Fastpay tech to quietly build the system behind it. However, building payments from scratch and promoting them to the market is not an easy task.
Lightspark has made a smart move by building upon the most robust blockchain, Bitcoin, and leveraging the existing infrastructure of Lightning Network. They focus on what they are good at, building excellent products, shipping them, and promoting them. Thaddeus Dryja, the co-author of Lightning Network whitepaper, has also joined the team, giving them an in-depth understanding of Lightning Network and the user-intent product experience.
While Lightning Labs is focused on the revolution of Lightning Network itself and building the bottom protocol, Lightspark is pushing boundaries to achieve mass adoption of Lightning Network. They are not building the user-faced product but rather lowering the barrier for both users and developers.
Their philosophy is to build the harmonization of standards at the enterprise product service level, handling complicated routing and node operation behind the scenes. They are currently building 4 product lines, each of them complementary to others. Lightning Connect lets users instantly connect to the Lightning Network, then Lightspark Predict discovers the best-performing nodes and predicts their ability to successfully route transactions. Lightspark Wallet SDK and Lightspark SDKs make it easy for other products to integrate Lightning Network into their own services and provide additional payment services.
The Lightspark website wallet offers a user experience that is similar to traditional products. Users can log in with their email addresses, enable 2FA (Two-factor authentication), and use hardware keys. The service targets high frequency users and enterprises, allowing for the assignment of administrator, operator, and viewer roles for different users under a single account.
Regarding the business model, Lightspark charges subscription fees from high frequency users and enterprises. The three tiers are 0.5%, 0.3%, and 0.15%, respectively. The fee rate will be slightly higher if users do not fully utilize the subscription plan capacity. According to Lightning Network statistics, the transaction rate is almost negligible, at 0.0029% plus a base fee of 0.5 sat per transaction. These services provide considerable profit margins for Lightspark.
In addition to payment giant promotion, another trend may help Lightning Network achieve mass adoption. In the web2 era, every application wants to integrate their own payment system, especially social applications. We have seen many payment systems integrated into various social applications, such as Stripe in X (Former Twitter), and WeChat Pay in WeChat.
While in web3, every blockchain embeds a payment system, but few of them were born to solve payment issues except for Lightning Network. Fragmented liquidity and cross-bridge issues make user experience difficult. If we imagine a world where Bitcoin is the global payment system, then every smart contract application would focus only on their own product service and leverage Lightning Network to handle payment issues.
Nostr, “Notes and Other Content Transmitted by Relay,” is a new communication protocol developed by Lightning Network developer fiatjaf in 2021. It was developed in an attempt by LNBits developer Ben Arc to fully decentralize the market called Diagon Alley. Unlike other communication solutions, which mostly operate via dumb clients and smart servers, Nostr provides smart clients and dumb servers, improving user resistance to censorship. In December 2022, the Nostr community received funding from Twitter founder Jack Dorsey for 14 BTC, bringing unprecedented attention to the agreement. Jack Dorsey is also a fan of Bitcoin.
Nostr essentially matches the core of Bitcoin. The phenomenal Damus bloom this year is just one implementation of Nostr. For minimalist social applications, Lightning Network integration is the best choice. For crypto-native applications, Bitcoin is the best complement.
Never forget why you started, and your mission can be accomplished. Satoshi proposed Bitcoin about 14 years ago, and we have come out more than what it proposed, like smart contracts and other innovations, but we also have a long way to achieve the original global payment vision. Lightning Network has taken up the mantle and is the most promising way to accomplish the unfinished vision.
Reference
- Welcome to the Builder’s Guide to the LND Galaxy!
- lightning.network
- Amboss Space — Lightning Network Explorer and Analytics Tools
- BTC | OKLink
- Top Performing Nodes — Lightning Terminal
- Mint the Future with Taproot Assets v0.2
- 1ML
- docs.google.com
- What is Onion Routing & How does it work?
- Transparency
- Bitcoin Lightning Network Capacity Chart — Bitcoin Visuals
Original Link