Topics BlockchainCurrent Page

Lightning Network: The Scalable Solution for Bitcoin

Advanced
Blockchain
Bitcoin
Oct 23, 2023
13 min read

AI Summary

Show More

Detailed Summary

Bitcoin (BTC) is a type of digital currency whose peer-to-peer (P2P) technology allows users to engage in transactions with greater speed and efficiency. The gradual adoption of Bitcoin and cryptocurrency in general by financial institutions — and payment giants like PayPal and Square — signals a broader acceptance within financial services, pushing crypto’s evolution to better support its networks.

Essentially, this brings us to the Lightning Network, a second-layer protocol that operates alongside Bitcoin to enhance speed, versatility and privacy and reduce cost.

Key Takeaways:

  • Launched in 2018, the Lightning Network is a Layer 2 protocol that reduces costs and traffic congestion on the Bitcoin network, facilitating scalability.

  • Lightning Network boasts lightning-fast processing speeds without going through intermediaries, enabling low-cost and fast decentralized micropayment transactions worldwide.

  • Lightning Network’s latest upgrade, Taproot Assets, elevates Bitcoin into a multi-asset network by allowing developers to issue stablecoins and real-world assets such as fiat currencies and gold on the Bitcoin blockchain.

What Is the Lightning Network?

The Lightning Network is a second-layer protocol that runs on top of the Bitcoin blockchain to scale transaction verification. It alleviates expenses and mitigates traffic congestion on the Bitcoin network’s base layer. With instantaneous processing speed, Lightning Network can facilitate decentralized micropayment transactions at a global scale, eliminating the need for intermediaries.

First proposed in 2015, the Lightning Network was the brainchild of Thaddeus Dryja and Joseph Poon. The two researchers described the off-chain protocol, designed to operate using payment channels, in their paper entitled The Bitcoin Lightning Network. Using these channels, untrusted parties could make small transactions indefinitely without adding traffic to the mainnet. A year later, Dryja and Poon, along with others, founded Lightning Labs, which further developed the concept and eventually unveiled the Lightning Network in January 2018 after the SegWit soft fork in August 2017. 

As its name suggests, the Lightning Network is designed for processing transactions in a nearly free and instant manner by taking them off-chain. It exists separately from Bitcoin’s primary network, using its software and nodes to communicate with the network and exchanges as it finalizes transactions. 

The Lightning Network was designed to reduce traffic on a blockchain network’s base layer, lower the blockchain’s costs, and allow for private payment channels between parties. Since its establishment, the Lightning Network has experienced steady growth and is recognized for its ability to lower fees and speed processing times. The Lightning Network has also expanded to other blockchain networks, including Litecoin.

Even in the current bear market conditions, data from River, a company specializing in Bitcoin technology and finance services, has revealed a remarkable surge in the Lightning Network’s popularity. Its capacity has registered an astonishing growth of 1,200% since August 2021. As of September 2023, there are a reported 279,000 and 1.116 million monthly active Lightning users.

Lightning Network has recently released a new upgrade, the Taproot Assets protocol, which not only enhances the scalability of the network but also transforms Bitcoin into a multi-asset network. 

Essentially, Taproot Assets enables the issuance of stablecoins and real-world assets, such as fiat currencies, gold and government bonds directly on the Bitcoin blockchain. Since these transactions occur off-chain via the Lightning Network, Bitcoin is shielded from any potential congestion resulting from these activities.

Lightning Network Taproot Assets mainnet releases announcement on X.

Source: Lightning Labs | X

How Does the Lightning Network Work?

Similar to the Bitcoin network, the Lightning Network is made up of nodes. However, it uses smart contracts to process a transaction without being recorded on the blockchain. Each transaction is accessible privately, only to the transacting parties, and each node uses Lightning Payment Channels to execute payments. The Lightning Payment Channel is opened by creating multisignature addresses between the two parties conducting a transaction. The built-in features help prevent either user from cheating or altering any data contained in the channel, and the speed of payments is limited only by that of their Internet connections. 

Suppose Alex wants to pay Kim in BTC via the Lightning Network. They could first lock up their BTC in a unique 2-of-2 multisig address, opening a direct Lightning channel and enabling them to initiate the transaction by keeping a private ledger off the mainchain. At the off-chain Lightning channel, the funds in the pool are divided into two parties — Alex’s and Kim’s funds. 

The initial balance of the pool is 2 BTC (1 BTC each). Alex pays Kim 0.5 BTC on the Lightning Network and is left with 0.5 BTC. Kim then receives 0.5 BTC and her current balance is 1.5 BTC. Once the channel is closed, the microtransactions are consolidated into a single transaction, which is then verified, processed and added to the on-chain blockchain, and their balances will be updated accordingly.

However, if either Kim or Alex does not have a direct channel, the transaction is routed to Jack using a type of smart contract — hashed time-locked contracts (HTLCs). The contract is used to promise Kim that she’ll receive her BTC and Jack has to prove that he paid the agreed amount to Kim. In return, Jack will receive a small fee for executing the order. 

Bitcoin’s Limitations

While Bitcoin is convenient and easy to use, its limitations have led to some wariness regarding its adoption as a currency. Consequently, BTC isn’t accepted everywhere, and its value tends to fluctuate according to demand, with built-in deflation. If a file is lost or a hard drive crashes, the wallet contained therein disappears, too, with no way to recover the lost funds. There’s also no buyer protection when goods are purchased with BTC. 

Perhaps the biggest limitations of Bitcoin, however, are linked to its speed, cost and scalability. 

Speed

Bitcoin transactions are verified and recorded in blocks. A new Bitcoin block is created every ten minutes, and each block contains a specific number of transactions. Miners prioritize transactions based on fees, which means that you might find yourself bidding against other users to ensure your transactions are processed promptly. That means, the higher the fee rate, the faster the transaction will be processed.

During slower periods you can expect your transaction to be processed on time, but during busier days or hours, you may be waiting a long time — or facing high fees as miners race to get through multiple transactions in the mempool

Cost

The transaction fees associated with Bitcoin are necessary to support the network, but they tend to be high, especially for smaller transactions. Anyone who wants their transactions to be processed needs to expect to pay a higher fee during the network congestion since only a limited number of transactions can be included in each block. Traditionally on the Bitcoin network, miners would receive a subsidy when a new bitcoin is minted and transaction fees for adding the transactions into a block.

However, the fees incurred for using the Bitcoin Lightning Network are only required for the following:

  • Opening the payment channel

  • Closing the payment channel

As long as the channel is open, you can make multiple transactions, and the only fees you pay are those due when you open and close the channel. The Lightning Network uses block space more efficiently, improving Bitcoin’s capacity and lowering transaction costs.

Overall Scalability

The capacity for Bitcoin growth is limited, in other words, it has a scalability problem. Bitcoin’s blocks have a size limit of about 1 MB, and they’re generated only about every 10 minutes with a processing speed of about seven transactions per second (TPS). Compare this to Ethereum, which processes almost double that number (before its upcoming ETH 2.0 transition to PoS consensus), while VisaNet can process up to 24,000 TPS. 

This means that the capped capacity limits the number of transactions to be processed on-chain, thus limiting the database to grow. Whenever the number of transactions outgrown the limit, the nodes will not be able to keep up. Essentially, the network is clogged with pending transactions that could drive a fee bidding war. 

The scalability problem first became apparent in 2015, with a variety of solutions being offered, including increasing block size. The Bitcoin Cash (BCH) hard fork occurred in August 2017, and that same year, segregated witness (SegWit) was also implemented as a potential solution to the overall Bitcoin capacity issue.

Understanding Layer 2 Protocols

The Bitcoin network’s base layer is characterized by the technological framework that supports the network, as well as the monetary application. It’s used to verify and complete transactions, but as has already been discussed, it has limitations, particularly Bitcoin’s capacity and cost. The second layer protocol is designed to address these limitations. 

A second-layer (or Layer 2) protocol is also known as an off-chain solution. It’s decentralized, much like the main blockchain, and offers the same security protocols, but its primary purpose is to solve the scalability issues of conventional blockchain technology.

On a decentralized network, global consensus is essential, and all participating nodes carry a complete copy of transactions for verification purposes. This prevents double-spending, without having to rely on a central authority or regulatory body. 

The base layer is the primary (or Layer 1) security layer, which creates an immutable record of the data. The blockchain acts as the base layer. The second layer protocol decreases the amount of data on the blockchain by allowing for off-chain transactions. 

With a second layer protocol, basic computations can be run off-chain while the transactions are still anchored to the blockchain. This minimizes the amount of data stored on the base layer, freeing up critical resources without compromising security. In other words, blockchains with second layer protocols are more usable and scalable, and thus capable of competing with larger and more centralized systems.

Bitcoin vs. Ethereum: Layer 2 Protocols

Both Bitcoin and Ethereum have unveiled second-layer protocols to improve speed and scalability. While Bitcoin uses the Lightning Network, Ethereum offers multiple Layer 2 scaling solutions, such as optimistic rollups, zero-knowledge rollups and Plasma chains. Ethereum’s Layer 2 protocols, which include Polygon and Arbitrum, are designed to address scalability and cost concerns by enabling off-chain computation. 

Bitcoin’s Layer 2 solution lies in the Lightning Network, which uses smart contracts to enable near-immediate and low-cost transactions, along with cross-platform “atomic swaps” in which users can trade one coin for another without using an exchange.

SegWit vs. Second Layer Solution

Segregated Witness, or SegWit, is the most prominent Bitcoin protocol upgrade to date. It effectively segregates transaction data from witness data, so that each transaction on the blockchain consists of two parts: 

  • Base data: Refers to the movement of bitcoins and data pertaining to that movement.

  • Witness data: Acts as a signature, essentially proving that a BTC owner has authorized a transaction.

SegWit is a soft fork, or backward-compatible change of code, which splits transactions into two segments. It moves the witness data (or signature) from the original segment to the witness segment. 

The implementation of SegWit essentially doubles block size, upgrading it from 1 MB to 2 MB while requiring no major changes to the existing code. Although SegWit doesn’t necessarily solve the scalability problem, it enables support for Layer 2 solutions such as the Lightning Network.

How the Lightning Network Helps Combat Bitcoin’s Problems

By consolidating numerous microtransactions into a single one, the Lightning Network can reduce network traffic. Taking these microtransactions off the main network ensures ample space for larger, higher priority transactions and enhances processing speed. 

The Lightning Network also improves scalability by transacting and settling off-chain.

How Can a User Benefit from Bitcoin’s Lightning Network?

The biggest pros of the Lightning Network are its speed and affordability. As mentioned above, on the Bitcoin network’s base layer fees and waiting periods can be prohibitive. However, with the Lightning Network, you can send and receive small payments in a way that is simply not feasible on Bitcoin’s network. You can swap payments numerous times before closing the channel and completing a single transaction, all for one fee. 

Because the Lightning Network operates as a secondary layer on top of the main network, it still offers users all of Bitcoin’s standard security protocols. Users can also switch between networks, according to their needs, accessing the Bitcoin network to complete large transactions and switching back to the Lightning Network for microtransactions. Transactions associated with the Lightning Network are private, occurring off the blockchain and recording only the overall results.

Finally, the latest Taproot Assets upgrade expands Bitcoin technology to more mainstream users, as real-world assets like fiat currencies and gold can be issued via the Taproot Assets protocol.

Lightning Network’s Impact on Bitcoin Adoption

Lightning Network nodes from January 2018 to October 2023.

Source: Bitcoin Visuals

The increase of nodes and channels on Bitcoin’s network allows it to increase its capacity for bitcoin transactions. As its capacity continues to expand weekly, and more people are adopting the technology, thus making it a critical asset to the Bitcoin ecosystem. The Lightning Network just might prove to be the pivotal method which solves Bitcoin’s scalability issue. 

Lightning Network's apacity from January 2018 to October 2023.

Source: theblock.co

Compared to the Lightning Network’s capacity of over 1,000 bitcoins in 2021, the capacity has increased to over 5,000 BTC as of Oct 22, 2023. That also translates to the higher scalability of the Bitcoin network as a payment system. 

The Lightning Network and Bitcoin work together seamlessly, encouraging more people to use both technologies. Those who already use Bitcoin will naturally turn to the Lightning Network to make fast, small or inexpensive payments. This flexibility and efficiency granted by Lightning Network will continue to draw more users to using Bitcoin and Lightning. The more people use Lightning Network and Bitcoin, the more both will become recognizable on conventional exchanges and be accepted as more traditional forms of payment.

Cons of the Lightning Network

While the Lightning Network has the potential to solve some of Bitcoin’s issues, it does have some shortcomings. 

First, the Lightning Network may not necessarily be inexpensive to use. This is because before making micropayments between either party, the user must first deposit on-chain. Furthermore, the final amount for the transaction closing must also be recorded on the Bitcoin chain. 

Secondly, as a blockchain, Lightning Network is susceptible to various security risks. One notable risk involves malicious actors creating many channels that expire simultaneously, overwhelming the blockchain's capacity, and then potentially stealing funds from users unable to withdraw due to the congestion.

Lastly, integrating Lightning Network into current payment systems is also a complex process. Merchants may not necessarily be incentivized to adopt Lightning Network, particularly given the volatility of Bitcoin.

The Lightning Network’s Future

Total value locked (TVL) in Lightning Network from April 2022 to October 2023.

Source: DefiLlama

More than $160 million is currently locked into the Lightning Network’s system, with people using the Layer 2 solution to pay for goods, services, apps and more. 

While it does have some limitations, it provides users with more options and versatility. As people increasingly adopt it to make lightning-quick micropayments, developers will continue developing compatible wallets and support systems to build and strengthen the network.

The Bottom Line

Launched in 2018, the Lightning Network is rapidly changing the face of Bitcoin. Developers have worked tirelessly to create the robust technology necessary to support and promote the network and create a user-friendly platform. Anyone can access and use the Lightning Network using nothing more than their smartphone, unlocking a myriad of possibilities for seamless payments. The recent integration of the Taproot Assets protocol has further expanded Lightning’s potential for both Bitcoin and its users. With the growing adoption of Lightning Network, the vision of a faster, more scalable Bitcoin ecosystem is steadily becoming a reality.

#Bybit #TheCryptoArk

Bybit App
Earn the smart way