WhiteSwap Christmas logo
Go to blog main

What is Lighting Network

Articles
25.08.2023
5min.
1003
news thumbnail

What is the Lightning Network, and how does it affect Bitcoin?

In this article, we explain what the Lightning Network is and why the bitcoin fees can exceed the transfer amount several times.

At the very beginning of the history of Bitcoin, only a few enthusiasts, led by its anonymous creator Satoshi Nakamoto, used cryptocurrency. But everything has changed dramatically over the years. Today, digital assets are a part of life as contactless payment at the supermarket checkout.

But the growing popularity of Bitcoin has become a problem for the network: the world's first blockchain was designed for a smaller number of active users. This has led to what's called a scalability trilemma.

The scalability trilemma describes the main drawback of the blockchain: it is quite challenging to create a secure, decentralized, and fast network simultaneously. Therefore, the Bitcoin development team presented a second-layer solution called Lightning Network.

What is the Bitcoin Lightning Network?

  • Lightning Network (LN) is a second-layer solution (L2) for Bitcoin, where the first level (L1) is the blockchain itself.

  • LN solves the problem of network scalability by increasing the speed of transfers and reducing their cost. The fee for the transfer in Lightning Network is one-thousandth of a BTC.

  • Second-layer solutions do not affect the original blockchain architecture and source - code, so they can effectively conduct first-layer transactions.

Why does Bitcoin need a second-layer solution?

Bitcoin's fees are sometimes as high as $100 per transfer. Unlike banks, which charge a fixed percentage of the transaction amount, the Bitcoin blockchain fee depends on the size of the transfer and the overall load on the network.

The fact is that miners run the process. Each is rewarded for the block and for confirming transactions on the blockchain. Therefore, transfers with the best size-to-fee ratio are prioritized.

But the main reason for creating the Lightning Network is the low bandwidth of the Bitcoin network. For example, Visa processes 65,000 transactions per second (TPS), Solana blockchain up to 400,000, and Bitcoin only 7 TPS. This prevents the first cryptocurrency from competing with more modern blockchains and centralized payment systems. Lightning Network is a technology that provides unlimited bandwidth, which can theoretically reach a million TPS. Therefore, LN effectively solves the scalability trilemma and significantly reduces fees.

How does the Lightning Network work?

The Lightning Network is a decentralized payment channel that allows transfers between two parties without a blockchain record. It uses a special crypto wallet with a multisig function and smart contract technology.

A bitcoin transaction, which is recorded on the blockchain, is required to open an LN channel. The amount transferred sets a channel limit and is locked. After that, all Lightning Network members can exchange cryptocurrency within the set limit without waiting for the blockchain to confirm. The result is a reduction in the cost of transfers. So what does this look like in the real world?

How to use Lightning Network?

Imagine that a pizza costs 0.0006 BTC (~$13 at the time of writing). The average bitcoin transaction fee in 2022 was $5. A buyer is unlikely to choose to pay in bitcoin and risk overpaying for the goods. The Lightning Network comes to the rescue.

First, the merchant and the customer must install a wallet that supports Lightning Network. The buyer opens an LN channel between himself and the pizzeria and locks 0.002 BTC on it, which is displayed on his balance. After payment, the pizzeria's balance is 0.0006 BTC. The customer's balance is 0.0014 BTC. So, the buyer can transfer cryptocurrency within the Lightning Network channel until it runs out. For example, the customer can buy two more pizzas with the remaining 0.0014 BTC.

These transactions are not recorded on the blockchain. Instead, a smart contract is created and signed for each conversion within the Lightning Network. This contract defines how much cryptocurrency each participant owns. The seller receives the payment after the Lightning Network channel is closed, and the final state of cryptocurrency wallet balances is recorded on the bitcoin blockchain.

Let's imagine that the buyer and the pizzeria owner don't have a direct LN channel. But both of them have a common channel with a user X. In this case, the X can become an intermediary between the customer and the pizzeria and charge a fee for the execution of the payments. Lightning Network uses hashed time-locked contract (HTLC) routing for these transfers. This makes it possible to carry out secure transactions between network participants that are not directly related to each other.

Lightning Network history

The Lightning Network we use today was proposed in 2015 by bitcoin developers Joseph Poon and Thaddeus Drye. The white paper "The Bitcoin Lightning Network: Scalable Off-Chain Instant Payments" offered a way to increase the speed and efficiency of bitcoin transactions without intermediaries.

However, Satoshi Nakamoto also envisioned creating such a network of payment channels between users. In 2009, he showed the community a code draft, and in 2013, one of the Bitcoin developers, Mike Hearn, published Satoshi's letter describing the technology.

The final white paper was published in 2016, followed by a Lightning Network developer summit in Milan. The purpose of the meeting was to establish standards for the operation of the network. A test version of the Lightning Network was launched by the Lightning Labs team in 2018, with 1,000 nodes and 1,863 channels.

Who controls Lightning Network?

LN, like Bitcoin, is a decentralized network where all participants are equal. Each Lightning Network node can conduct transactions based on the rules of the protocol but cannot interfere with other nodes' transactions. So no one can take complete control of Lightning Network.

Lightning Network benefits

  • Instant payments. In Lightning Network, transaction confirmation occurs in a fraction of a second.

  • Increased anonymity. The blockchain only stores data on two transactions: when the channel opens and closes. Members within the Lightning Network channel can make unlimited transfers, which are not recorded on the blockchain.

  • Low fees. On Lightning Network, transfer fees are much lower than on the Bitcoin blockchain.

  • Availability. To start using Lightning Network, it's enough to install a wallet with this feature.

  • Ability to make micropayments. The fees for an LN transaction are calculated in thousandths of a bitcoin, making it possible to transfer small amounts of cryptocurrency.

  • Increased security. The Lightning Network protocol includes multiple levels of protection so that scammers cannot steal the cryptocurrency locked in the channel.

  • Ability to earn passive income. By operating an LN node, the user increases the liquidity and capacity of the Lightning Network. Node operators charge network fees for transactions that pass through their channels. This is especially useful for those who want to know how to invest in Lightning Network.

Lightning Network disadvantages

  • Dependence on Bitcoin. If the first cryptocurrency collapses, Lightning Network will cease to function.

  • Lack of economic incentives. It is unprofitable to create new nodes because the commissions are too low.

  • It is not possible to pay offline. A transaction can only take place when all channel members are online.

  • Failure of intermediaries and counterparties. If one of the channel members does not respond to the request, this may delay payment. In this case, a user must cancel the transaction independently.

  • Pre-configuration required. To use Lightning Network, you need to pre-configure payment channels, which may be too complicated for beginners.

Prospects

Lightning Network is an early-stage technology, and the project's potential is still being explored. Despite this, LN transactions are supported by many centralized crypto exchanges as the technology reduces the cost of payments on the Bitcoin blockchain. Lightning Network could make it easier for entrepreneurs to integrate cryptocurrencies into their businesses.

What is the lightning network for DeFi? Some projects offer the ability to create tokens and stablecoins and then use them in LN-based applications. For example, in September 2022, the Lightning Labs development team presented the Taro protocol designed for this purpose. It is safe to assume that Lightning Network will be widely used to transfer cryptocurrencies in the future.

Related News