Introduced in 2015 by Joseph Poon and Thaddeus Dryja, the Lightning Network is one of the most promising innovations on top of the Bitcoin blockchain. It may be the first time you hear about it, but in the nearest future, most of your BTC transactions may be based on this solution. Today, we will deal with the question “What is the Lightning Network and how does it work in real life?” Keep reading if you don’t know the answer!

What Is Lightning Network And What Problems It Solves

The ‘lightning’ part of the term suggests that we deal with something super fast and powerful. In a way, it makes sense: the Lightning Network seeks to make BTC transactions faster and cheaper.



If you read your guides on cryptocurrency and blockchain, you probably know that high transaction speed and low operational fees are two big advantages of Bitcoin over banks. So, why would you want to improve something already good? There are some reasons for it.



The basic structure of the Lightning Network. Image source: Cryptor

What Is Lightning Network: Bitcoin Scalability Issue

Right now, the biggest challenge of the Bitcoin network is scalability. It means the ability of a system to successfully cope with increasing workload or added resources. Say, if you have a factory that can only produce 1,000 units per month, adding just a few more units to your production plan will require a new factory. Thus, your business is not scalable.

Let’s see what scalability means in the case of BTC.

Decreased Transaction Speed

When the cryptocurrency goes mainstream, there will be a huge number of transactions waiting to be processed. Now, when the coin is still far from mass adoption, the average waiting time is between 15 min and 16 hours. Though Bitcoin does better than most banks, especially if you deal with cross-border-transfers, the community is unhappy about delays.





Scalability problems result in increased waiting time and higher fees. Image source: Master The Crypto

Increased Transaction Fees

Another scalability-related problem is transaction costs growing. Say, if you are in a hurry and don’t want to wait for your turn, you may offer a bigger than average transaction fee. As miners add this fee to their reward, they will process your transaction faster. It’s similar to paying for priority boarding when you buy a flight.

Now imagine that the aircraft (the BTC network) was not designed to fit all the passengers who want to take this very flight. It motivates more people to pay for priority boarding; otherwise, the chances are you will never reach your destination. As a result, taking a flight becomes unaffordable for economy-class passengers.



The same thing is happening now to the Bitcoin network. It’s the oldest and most popular platform that many people want to use. The original idea was to make payments easy, fast, and cheap. But the original blockchain architecture cannot fulfill these promises.



Besides, when all the bitcoins will be mined, transaction feel will grow even more. The network depends on miners’ work for its operation, and increased transaction fees will be the new block reward.

Lower processing speed and higher costs call for a solution. And this solution is the Lightning Network.

What is Lightning network for Bitcoin: a simple explanation.

Image source: HackerNoon

What Is Lightning Network for BTC

The Lightning Network solves the BTC scalability problem by providing the users with a special payment channel. Through this channel, you can make transactions that you would otherwise conduct using the main blockchain.

Payment Channel

What is a payment channel? It’s a separate sealed part of the blockchain that operates on a smart contract. The parties pre-agree terms and conditions and use multi-signature to collectively manage their funds.



Here are a few basics to help you understand a payment channel:

The parties can interact with each other (send and receive funds) without the help of miners.



It’s very convenient when you regularly send and receive small amounts to the same person/business. Doing it in a regular way makes no sense: you would pay too much to miners and suffer delays.



After the specified period, the channel closes up automatically. The last set of transactions is added to the main blockchain. It can also happen after the specified number of transactions have taken place.

Alice interacts with Bob using a payment channel with a multi-signature.

Payment Channel: Real-Life Example

To understand how it all applied to real life, let’s see consider an example. The actors are the same — you and your friend Alice. Imagine, that you are going to work together on a small-scale project and move insignificant amounts of money now and then.



Here is what you do:

Each of you guys sets aside a certain amount of money, let is be $50. Together, your contributions make $100, and this sum goes to a special ‘locker’.

The ledger records that each of you has a balance of $50.

You run this locker together, utilizing a multi-signature key. It means you and Alice have only half of the access code, and you need both halves to manage the money.

if you send Alice $20, the ledger corrects your balance immediately. Now, you have $30 and Alice has $70.

Each user can claim his or her share, but no one can take more.

When the channel closes, the system settles the final score.

As you see, the whole process is like settling balance with good friends in real life. But it’s more secure (no one can escape with the other person’s funds), cheap and fast. Especially, if you and Alice use different banks or live in different countries.

Lightning Network And HTLC

Payment channels may come in any of the forms below:

Nakamoto High-Frequency Transactions.

Spillman-Style Payment Channel

CLTV-Style Payment Channels

Poon-Dryja payment channels

Decker-Wattenhofer duplex payment channels

Hashed Timelock Contracts (HTLC)

The Lightning Network is based on the HTLC payment channel. It’s one of the most prominent applications of this technology that makes it possible to manage money more flexibly. For instance, it offers exciting features atomic swaps. It’s a special technique for quick exchange of different cryptocurrencies, running on different blockchains.

Alice and Carol use Bob’s payment channel to interact with each other. Image source: Coin ATM Radar

Lightning Network: How Nodes Communicate

As you see, we are dealing with a network of payment channels that are linked cryptographically. For example, if your friend Alice opens a channel with John, and John has a channel with you, she can interact with you through John.



The wonderful thing is that you don’t have to trust all these people to deal with them. The system guarantees that if you pay money to Alice through John, he cannot get away with it. Thus, you have access to many Lightning users. You can pay them directly or through other people. Now, a new question arises.

Payment channels run on smart contracts that determine the conditions of managing your funds. Image source: ChainSide

Lightning Network: How It Manages To Be Safe

With millions of transactions taking place every day, both directly and indirectly, how this labyrinth of rabbit holes will manage to stay stable and secure? Will there be a new scalability problem, this time on the layer 2?



Let’s have a closer look at what prevents a bad guy from pocketing the money in one of these payment channels.

Smart contracts

The Lightning Network runs on smart contracts. (Read our guide to know more about how this technology functions). Long story short, they are self-executing blockchain-based agreements that cannot be changed or canceled. Thus, a smart contract ensures no user can interfere with its terms and conditions. When a pre-agreed event happens, it leads to a specified outcome. No place for manipulation and cheating.

Timelocks

Before opening a channel, the parties agree on when it closes. It may be a specified date and time. Or it may be a certain number of transactions. Therefore, every channel has a lifespan.

Asymmetric Revocation Commitment

This term refers to the method the system uses to punish users for cheating attempts. For example, you can set a condition that if your partner tries to cheat, you can claim the whole balance of the shared locker, as compensation.

Lightning Network: Is It Expensive To Use?

First, you have to pay a fee for opening and closing payment channels. Second, there are special fees for routing the payment info between nodes of the network.



As these nodes are still few, the interconnection charges don’t apply now. When the number of nodes increases, these fees will grow, too. But the developers don’t expect them to be very high — after all, the Lightning Network is here to make things affordable.



In any case, the Lightning Network payments are rather cheap compared to the main BTC blockchain. The reason is clear: the latter depends on the miners’ work. This work is rather difficult and requires a lot of resources, so it must be paid for. As for the Lightning nodes, their work is much easier and therefore cheaper. But in the future, there will be enough payment activity on layer 2 — and enough money to earn.

Lightning Network capacity has been increasing greatly over the last two years.

Image source: Bitcoin Visuals.

Lightning Network Pros

We have already mentioned some of the Lightning network advantages, but let’s sum it up:

High speed

It takes 10 min to solve a BTC block, but normally you have to wait longer. The Lightning network saves your time: your transaction would happen in a few seconds. Very important advantage if you need your money to travel fast!



It takes 10 min to solve a BTC block, but normally you have to wait longer. The Lightning network saves your time: your transaction would happen in a few seconds. Very important advantage if you need your money to travel fast! Lower operational fees

An average BTC transaction now costs up to $4. Again, it’s next to nothing compared to what banks would charge you, but it’s too much if you often send and receive small amounts of money. Using the Lightning Network is much cheaper. It would charge you something between 1 and 10 satoshis. In case you forgot, satoshi is a small fraction of Bitcoin (1 satoshi = 0.00000001 BTC). The difference is immense.



An average BTC transaction now costs up to $4. Again, it’s next to nothing compared to what banks would charge you, but it’s too much if you often send and receive small amounts of money. Using the Lightning Network is much cheaper. It would charge you something between 1 and 10 satoshis. In case you forgot, satoshi is a small fraction of Bitcoin (1 satoshi = 0.00000001 BTC). The difference is immense. Reduced load on the main blockchain

The Lightning Network activity does not happen on the main blockchain, so it reduces its burden significantly.



The Lightning Network activity does not happen on the main blockchain, so it reduces its burden significantly. User-friendliness

Though it all looks complicated, on the user’s side the things are much simpler and easier. To use the Lightning Network, you don’t have to understand the technologies that make it possible. Anyone who knows how to use a banking app would be comfortable with the interface.



Though it all looks complicated, on the user’s side the things are much simpler and easier. To use the Lightning Network, you don’t have to understand the technologies that make it possible. Anyone who knows how to use a banking app would be comfortable with the interface. Atomic swaps

Payment channels make it possible to interconnect different blockchains. Their users will be able to do fast and convenient currency swaps.

Lightning network nodes: some statistical data.

Image source: Crypto News Flash

Lightning Network: Challenges

As usual, good things are balanced with some disadvantages. The Lightning Network is a young technology, so there are still some infant diseases to cure.

‘Centralization’

As everything on blockchain, the Lightning network should be decentralized. But there is a concern that some of its popular nodes with many open connections could become major payment hubs. If such a hub fails, it will disrupt the smooth operation of the whole network. That’s a typical problem of a centralized system.



As everything on blockchain, the Lightning network should be decentralized. But there is a concern that some of its popular nodes with many open connections could become major payment hubs. If such a hub fails, it will disrupt the smooth operation of the whole network. That’s a typical problem of a centralized system. Security concerns

The Lightning Network is potentially more vulnerable to thefts as your funds and private keys are stored online all the time. This ‘locker’ we talked about is a hot storage. As such, it’s less safe by default.



The Lightning Network is potentially more vulnerable to thefts as your funds and private keys are stored online all the time. This ‘locker’ we talked about is a hot storage. As such, it’s less safe by default. There are many things to fix up

As we said, the tech in still is in its early years of adoption. It means the developers are not yet aware of all the vulnerabilities that will come out when lightning networks start being widely used. On the other hand, the main BTC blockchain is more predictable, as it has been around for a while.

Lightning Network: Conclusion

This solution may be one of the major blockchain innovations of recent years. But as always, there are some challenges to face and problems to solve. If it’s done, the lightning networks can contribute to the mainstream adoption of Bitcoin and other cryptos.

