The lightning network is a second-layer scaling solution built on top of the bitcoin network. It enables instant, low-cost transactions that build on the trust and security of the bitcoin network.

Why do we need lightning?

The bitcoin network produces blocks every 10 minutes and records all confirmed transactions on the blockchain. Each block can only hold a limited number of transactions. It’s estimated that bitcoin can process somewhere around 7-10 transactions per second on the blockchain. As you can imagine, this is nowhere near enough to handle the thousands or tens of thousands of transactions that occur per second worldwide.

There is an inherent trade-off between decentralisation, security and scalability. No monetary system that has ever been devised can prioritise all three. The bitcoin base layer rightly focuses on security and decentralisation. So how does bitcoin deal with the issue of scalability? Enter the lightning network. ⚡

What is the lightning network?

The lightning network allows users to settle large numbers of payments cheaply and nearly instantly, thereby helping to address the scalability issue.

Lightning transactions are bitcoin transactions; they are connected to the blockchain and build on the security and decentralisation of bitcoin. But importantly, they also enable rapid settlement of a near-infinite number of transactions. Sound too good to. be true? Then read on...

How does the lightning network work?

Lightning channels are opened and closed on the blockchain just like regular bitcoin transactions. This means we know the funds have been committed to the channel and are secured by the bitcoin network. Each participant can then send money back and forth in this channel, signing a ‘contract’ after each payment to record the updated balance. This means that once a channel has been opened, an infinite number of lightning transactions can be passed back and forth in this channel without needing to be written to the blockchain.

As an example, let's imagine that Alice and Bob want to send lots of bitcoin payments back and forth to each other. Instead of sending each transaction on-chain, they could instead opt to use lightning by committing funds to a channel between them and recording this transaction on the blockchain. Alice and Bob can now send bitcoin transactions back and forth for as long as they want and keep track of the balance. Eventually, they can choose to close the channel via a transaction which will be recorded on the blockchain. Alice and Bob will both receive their portion of the updated balance as recorded in the channel.

🥃 It might help to think of it as a bar tab. Alice goes into Bob's bar and instead of buying lots of drinks one by one, together they open a tab (commit a transaction to the blockchain). Alice then orders drink after drink from Bob (sending lightning payments) and only at the end of the night do they settle the tab (closing the channel and writing the final state to the blockchain).

That's all very well for payments between two people however, the real beauty of lightning is that it is a network of channels. Since the channels can be linked together, participants who do not have direct channels with each other can route payments over the network to participants with whom they do not have a direct channel. This facilitates global payments that are nearly instant, extremely low cost and trustless, all secured by the bitcoin blockchain which prioritises security and decentralisation. 🤯

What does this mean for the future?

The lightning network will break down barriers in ways we can’t even imagine yet. Examples of this have already started to emerge and we believe this will have huge impacts on future business models in a huge number of industries.

One example is micropayments, which make streaming payments a reality and can change the game for content creators such as podcasters. Another use case is international payments. Lightning transactions can drastically improve the current friction and costs of worldwide remittances with instantly settled, cheap, cross-border payments.

The possibilities are endless... Welcome to the future. 🚀

📚 Want to find out more about using lightning with Bottlpeay? We've got you covered. 👇

Did this answer your question?