What is the Lightning Network? {Diagramatic Explanation}

Shivendra Misra
May 20, 2018 · 5 min read

This was originally written on shivendramisra.com/blog

It has almost been a decade since the inception of Bitcoin, however, as the cryptocurrency marks its presence in the market, it faces criticism pertaining to its scalability.

The main reason why it is hard to scale Bitcoin is that it is programmed to handle around 3–7 transactions per second (TPS) with a block size of 1 MB.

Image for post
Image for post

Now this is not very feasible when we compare it with other payment gateway services like Visa and Mastercard, which can handle thousands of transactions per second (the Visa network can scale upto almost 65,000 TPS).

Problems begin to rise as Bitcoin becomes much more mainstream and individuals and institutions begin to give it worldwide acceptance.

This will directly have an impact on the number of transactions executed each second on the Bitcoin blockchain network, which in turn is directly proportional to the memory required to store all the transactions in a block.

One of the solutions could be to increase the block size but that would require the users to wait for a hard fork consensus.

Image for post
Image for post
Average Block Size

Though increasing the block size may seem correct initially, however, in the long-term we would have to increase the block size again and again to cater to the increase in transactions.

Image for post
Image for post
Total Number of Transactions

Apparently, it would not help us solve the root cause of the problem.

This is where Lightning Network comes into picture

It takes the off-chain approach as a way to handle transactions and solve the scalability issues concerning Bitcoin.

According to proponents of off-chain approaches, not all small transactions need to be broadcasted on to the main blockchain.

Regular day-to-day transactions such as paying a retailer for purchase of clothes or buying grocery from your local grocery store with Bitcoin do not really need to be uploaded on the network every time a transaction takes place.

Image for post
Image for post

The answer is, that we record it off of the main chain.

The working of the Lightning Network is based on Payment Channels which are opened on the Blockchain.

In the Lightning Network, the main chain comes into picture only two times:

  • While opening a payment channel and,
  • While closing the payment channel by Broadcasting it to the main chain.
Image for post
Image for post

So, let us assume a simple payment channel between you and your local dairy shop from where you buy your dairy on a daily basis.

In non-technical terms, Lightning Network in this case will be a situation wherein you deposit let’s say 1000 bucks with the shop and every time you make a purchase, the balance keeps on reducing. When it becomes 0, you either deposit more money or stop buying from the shop.

In technical terms, you would open a payment channel with the Diary Shop wherein you make deposits in terms of Bitcoin, say 0.5 BTC, in what is known as the “Multi Signature address” (see image for reference).

The Multi Signature address is just like a locker, which opens on the agreement of both the parties. This locker contains a Balance Sheet-like statement, which has a record of the balances of both the parties.

Let us assume that you buy items from the shop worth 0.005 BTC. When the transaction is complete, the balance from your account gets reduced and that of the dairy shop increases by the same amount. All of the funds are stored in the Multi Signature Address itself.

After every transaction you and the shop will sign the Balance Sheet with your respective private keys.

The transaction goes on for as long as the parties want or until you have a balance in the payment channel.

One thing to be noted here is that although the balance sheet has to be signed by both the parties with their private keys, the broadcasting of the payment channel to the main blockchain is not dependent on the approval of both the parties.

If this would have been the case then, you would not have the freedom to get your deposits released and your bitcoins will be at the mercy of the Diary Shop.

What is the way out then?

Since both the parties have a copy of the latest signed Balance Sheet, any one of them can broadcast the payment channel to the main blockchain at any point of time.

When any one of the parties decide to broadcast the payment channel to the main blockchain, miners verify the transaction and check for valid signatures (private keys) of both the parties on the main blockchain.

After successful verification, the funds are released as per the latest signed Balance Sheet to both the parties and this gets recorded as a single transaction on the main blockchain.

This saves a lot of time and requires very less fees as compared to the traditional way of doing transactions on the blockchain, since each and every transaction is not required to be uploaded on the blockchain.

There is definitely much more to be said and explained about the Lightning Network and I will come up with easier explanations for further concepts like Onion Routing, Segregated Witness etc.

About Me

I am a Blockchain and Cryptocurrency enthusiast and am highly interested in solving real world problems through technology and Entrepreneurship. Apart from writing, coding and reading books I am also passionate about fitness and sports. Here’s a link to my website and my LinkedIn Profile!

CryptoX

Making learning about cryptocurrency fun and rewarding

Shivendra Misra

Written by

Get my new book, Bend Reality: Timeless Tools to Shift the Illusion of Reality, Reinvent Yourself and Master Life: bit.ly/30shivam

CryptoX

CryptoX

Making learning about cryptocurrency fun and rewarding

Shivendra Misra

Written by

Get my new book, Bend Reality: Timeless Tools to Shift the Illusion of Reality, Reinvent Yourself and Master Life: bit.ly/30shivam

CryptoX

CryptoX

Making learning about cryptocurrency fun and rewarding

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store