Lightning network solves a big part of the scaling problem that Bitcoin and other blockchain technology is struggling with. While the Bitcoin blockchain itself is currently limited to 5 - 10 transactions per second and impossible to use for microtransactions the Lightning network can handle many thousands of transcations per second.

What is great is also that this is done without compromising the security and decentralization that Bitcoin offers. The Lightning network provides an excellent oppurtunity to make it possible to use Bitcoin in stores, for small transactions between friends etc.

Notice: Lightning network is still a very young technology and can't safely be recommended for commercial use yet.

How it works

Payment channels

The first piece of the puzzle in order to make Lightning network a reality is something called payment channels that, in a simple form, was suggested by Satoshi in the very early days of Bitcoin. Payment channels enable two people to create and update transactions between each other without publishing them on the blockchain (until they're done transacting). Imagine, for example, that you want to pay for a service by the minute. Using payment channels this is possible by continuously updating the amount of a transaction but only publish the transaction when you're done using the service.

The first versions of payment channels had some security issues but they were improved over the years and in the article introducing Lightning network a new variant that allowed for duplex channels (payments back and forth in the same channel) had been developed by Joseph Poon and Thaddeus Dryja.

Hashed Timelocked Contracts

Lightning network extends the concept of payment channels by creating a network of channels so that one can pay anyone in the network, as long as a path can be found between the sender and the receiver. Imagine that Alice has a payment channel set up with Bob and that Bob has a similar channel with Carol. Alice is then able to send a payment to Carol, through Bob.

To make this possible we of course need to make sure that Bob actually forwards the money to Carol instead of keeping it. Hashed Timelocked Contracts is a combinration of a "time lock" and a "hash lock" that requires the recipient of a transaction to approve it within a certain time frame (or the money will be returned to the sender). This is what a payment of 0.1 bitcoin from Alice to Carol would look like:

  1. Alice creates a payment channel with and Bob creates a payment channel with Carol.
  2. Carol generates a random, secret number and hashes it. Carol then gives this hash to Alice.
  3. Alice sends 0.1 bitcoin to Bob through their payment channel but with a condition that Bob needs to provide the secret number to be able to claim the money.
  4. Bob sends 0.1 bitcoin to Carol using the same condition as in (3).
  5. Carol is able to complete the transaction from Bob since she knows the secret. But, in doing so she is forced to reveal the secret, which means that Bob, now that he knows the secret, is also able complete the transaction from Alice.


This might sound complicated and so far there aren't a lot of apps targeted at regular users that allow you to use the Lightning network, but it is getting better all the time.

Lightning network should be thought of as technical infrastructure that the user doesn't need to know much about. It is a network that routes payments on top of the Bitcoin blockchain but only the geeks need to worry about what that actually means. Just as simply as you send e-mails every day without worrying about how SMTP or TCP/IP works you will be able to use the Lightning network to send payments.

Further reading

Latest articles:

More articles