Table of Contents

What is lightning network?

Bitcoin is slow and expensive

Bitcoin is designed to do one thing and one thing only – be decentralized.

All the attempts to increase Bitcoin blocksize to accommodate more transactions have failed in the past, for example, Bitcoin Cash, Bitcoin Satoshi vision etc.

Lightning network is a second-layer solution that has the capability to support billions of bitcoin transactions per second.

What is lightning network?

Lightning network is not a layer 2 sidechain or blockchain. It is a network of computers that can share IOU(I Owe You) contracts that other party can redeem at any time on the main Bitcoin blockchain.

Lightning network is fast as the recipient of IOU does not have to redeem the transaction on Bitcoin blockchain immediately which costs large fee and requires long wait time.

The IOU is as good as bitcoin in the account till the time recipient does not lose IOU.

Transmitting IOU can be done as fast as your internet speed – in fractions of a second.

Analogy

Consider an example to understand lightning network better. Imagine you go out to have drinks at your favorite bar.

You give your credit card to the barman and order your first drink. The barman gives you your first beer and notes it down.

After some time you order your second beer. The barman gives you the beer and updates his record.

You are feeling happy and you order third beer. The barman gives you third beer and updates his record.

Finally, it’s time to go home. You tell barman to charge and hand over the credit card.

The barman charges your credit card and returns the credit card.

See that the barman did not charge the credit card after every order which would have wasted time and effort.

Lightning network works on a similar concept.

How does lightning network work ?

Now let us consider a similar scenario with lightning network.

Imagine you go to your favorite bar to have drinks. Instead of giving the barman your credit card you open a lightning payment channel and load it with 5 bitcoins.

You order your first drink which costs 1 bitcoin. The barman gives you your drink and you give him IOU that he can use to redeem 1 bitcoin on the Bitcoin blockchain.

Thereby transferring 1 bitcoin to the barman.

You order second beer. The barman gives you second beer and you give him a new IOU for 2 bitcoins.

Effectively transferring 2 bitcoin to the barman.

You order your third beer.

Finally, it’s time to go home. The barman broadcasts the IOU for 3 bitcoins on the Bitcoin blockchain. He receives 3 bitcoins and you get 2 unspent bitcoin.

Routing

You do not have to open a lightning payment channel with everyone you want to trade with. You can jump through connected lightning channels to reach the final recipient if you are not directly connected.

Imagine you want to pay 1 bitcoin to your friend Sam but you do not have an open lightning channel with him

Then you can route the payment through other connected lightning channels to pay your friend.

Note that you paid 1.0001 bitcoin to John, while John only gave Sam 1 bitcoin keeping .0001 bitcoin as fee for letting you use his lightning channel.

Now imagine hundreds of thousands of lightning payment channels connected to each other so that anyone can transact with anyone instantaneously. That is lightning network.

El Salvador made Bitcoin a legal tender in their country in Sep 2021. Most transactions in El Salvador are conducted using lightning network instead of card or cash in the market.

Conclusion

Lightning scaling solution is a much better option than increasing Bitcoin block size.

Bitcoin core blockchain should remain small in size so that even a raspberry pie can run a validator node. Whereas layer 2 solutions like lightning scale Bitcoin for millions of transactions.