6 min. read

May 18, 2021

Lightning Network: What Is It and How Will It Change Bitcoin

Bitcoin might be a big buzzword but most of us know it's not ready to scale to fit into our daily lives. Here's how the Lightning Network can change that.

Gianmarco Guazzo

Gianmarco Guazzo, Web & Blockchain Developer

There’s no doubt that in the past few months you have heard about Bitcoin, the cryptocurrency that recently surpassed $1 trillion in market capitalization. More and more people are trying to understand the world of Cryptocurrencies and Blockchain, how they work and their potential to change the world. Bitcoin and Ethereum in particular are not only the oldest and most well-known protocols but also the first and second cryptocurrency by capitalization. Although these protocols are often considered a very real opportunity for the future of finance, they are also often criticized for their poor technical features (and for good reason).

One of the strongest criticisms about Bitcoin is the difficulty of the cryptocurrency to scale to a per-second transaction regime that would allow it to be used as a modern payment instrument. In other words, it’s not really fast enough to support the speed of our daily lives.

Unfortunately, Bitcoin currently manages to sustain traffic of around 3-5 transactions per second (TPS), making it very difficult to use in a commercial setting. Imagine having to pay for a coffee and waiting for endless hours with the barista as the transaction has to be inserted into the blockchain and confirmed by the network. Or imagine having to pay $1 for a coffee and then having to pay a $20 fee to have the transaction included in the block. In short, both solutions are not very nice.

To combat this, a group of programmers and nerds decided to implement a protocol on top of the Bitcoin Blockchain (often referred to as ‘layer 1’) to dramatically increase the speed of transactions and greatly reduce the cost. It does all this while holding true to Bitcoin's libertarian principles of promoting privacy and security. You may be wondering: does something like this really exist?

How Lightning Network Will Help Bitcoin Grow

Well, the answer is yes. It's called the Lightning Network (or LN) and the implications are  astounding. With LN, we can pay for our coffee with BTC and LN virtually instantaneously and at basically no cost at all.

How is this possible?

Lightning Network, in essence, offers the possibility to create a payment channel between two addresses and exchange BTC securely, instantaneously, with very low fees and without having to rely on the Bitcoin Blockchain. Through these channels there can be many transactions, which remain in the perspective of a fiduciary exchange between two parties. The moment one of the two participants decides to close the channel, the final balance of transactions is recorded on-chain, requiring the storage of two transactions instead of a much larger number. All this, of course, done on a level of abstraction that goes beyond the commonly known Blockchain concept.

Let's try to go into more detail. Nowadays, in order to pay for a coffee with Bitcoin, we have to create a transaction, send it to the network and wait for a miner to insert it into a block on the Bitcoin Blockchain--so that both you and the barista are sure the bill has been paid. As mentioned earlier though, Bitcoin's Blockchain is slow and would not allow 8 billion people to use the cryptocurrency to do this quickly. There’s a lot of waiting involved. If we want Bitcoin to become a payment method and not just a store of value, we have to find a solution to scalability: here's where LN comes in.

With Lightning Network two Bitcoin users can create a payment channel where the included parties can send an infinite number of transactions. To create a ‘channel’, one of the two users makes a particular transaction to the other in order to ‘open’ it. Once opened the two users can make as many transactions as they want without having to directly ‘send’ anything to the miners while still retaining a secure, trusted connection. In short, Lightning Network allows you to exchange BTC in a secure manner despite there being no authority to oversee the process.

Imagine going to your favorite coffee shop every morning for breakfast. By opening a BTC channel with the cafe, we can send money every morning without having to worry about the transaction being placed on a block by some miner. The moment one of the two users decides to ‘close’ the channel, a second transaction will be sent to the Bitcoin Blockchain with the final balance of the transactions that took place in that channel. In this way, only 2 transactions, the first and the last, will be saved in the Bitcoin Blockchain against the seemingly infinite number of transactions previously required between the two users. Don't worry, we'll discuss this in more detail in the next section. There’s one more interesting aspect of LN. Let's say there are 3 users: A, B and C. If A has an open channel with B, and B has an open channel with C, then A can pay C directly via B. In this way, Lightning Network allows users to send BTC to other users even if they don't have a direct channel between them. Instead they’re able to use the shortest path to reach their destination.

Using IP to understand Lightning Networks

To fully understand the importance of Lightning Network for Bitcoin, you’ll need to know the concept of Blockchain and the famous TCP/IP protocol.

Let's start with the Blockchain. Bitcoin, like all existing software today, requires data persistence to allow users to always know who owns what. While normal software requires the centralized use of a Database, Bitcoin uses the so-called DLT, or Digital Ledger Technology, within which we find the Blockchain. This chain of block updates every 10 minutes, producing a block in which we find the transactions made by users in the network. That means, if every 10 min is created a block, there will be approximately between 2000 and 2500 transactions per block. When a block is found, the node that found it communicates, speaking in a sort of jargon, broadcasts the solution to all nodes of the Blockchain.

Lightning Network is similar. Lightning Network is metaphorically identified by insiders as the Routing layer of the network, capable of transferring BTC effectively and efficiently. Under the hood, the operation of this layer is very similar to the IP protocol for the Internet. The IP protocol allows channels to be created between nodes within the network where data can be sent or received. If we want to look at Bitcoin from an engineering point of view, this was created to broadcast data at the time when a block has been closed. IP, and therefore also LN, were invented to allow unicast, i.e. point-to-point, communication. Completing the comparison, Lightning Network allows nodes (i.e. users with an address) to connect through channels and exchange data (i.e. BTC).

So when will you be able to buy coffee using LN?

Just as IP has allowed us to scale globally by building an infrastructure that can host billions of devices, LN will allow Bitcoin to create a global payment system. However, understanding and working LN is no easy task. As mentioned earlier, it assumes knowledge of well-structured technologies in the modern Internet architecture as well as newer technologies.

Despite their pitfalls, Blockchain and Bitcoin remain two very interesting topics that will be making their way into our daily lives in the next few years. Bitcoin, in particular, is and remains the path that will take us to the next chapter of currency and LN is one of the key tools that will get us there. For now, BTC has taken the step from 0 to 1, as Peter Thiel says. Now with LN, it’s time to go from 1 to infinity. And then, maybe, your favourite cafe will be finally ready to get on board! :)