Bitcoin has been around for so long that people have started to think about it as more than a “pyramid,” created to fool people into spending their money. We’re still far from the introduction of cryptocurrencies in everyday transactions, but people now believe that it’s possible.
However, grave problems are standing before Bitcoin on its way to replace fiat money and offer an alternative to those who want to avoid hefty fees and intermediaries. Concerning this, you might have heard recently about the beta launch of something called the Bitcoin’s Lightning Network. It’s the solution to one of the biggest issues, which plagues the Bitcoin blockchain.
Since you’re probably wondering what the fuss is about, today we’re going to discuss what Bitcoin’s Lightning Network is and how it works.
#1 What’s Bitcoin problem?
One of the main issues of Bitcoin’s network is that it’s not very scalable. For those of you wondering what “scalability” means, it relates to the ability of a network to accommodate a growing amount of work. For example, a cryptocurrency should be able to enlarge its system to process a lot of transactions per second (tps).
Currently, Bitcoin can handle up to 7 transactions per second. What’s wrong with that? For comparison, PayPal does 192 on average, while Visa – 4000 per second, but has the capacity to reach more than 60,000 tps. There are small exceptions among the cryptocurrencies, which can boast the same scalability as Visa.
Bitcoin with its seven transactions can’t really compete with the rest or hope to replace tradition payment methods like Visa or PayPal. Fortunately, that’s what where the Lightning Network comes into the picture.
#2 What is the Lightning Network?
Imagine that you want to order breakfast and pay with Bitcoin for your meal. Would you wait 10-15 minutes until your transaction is validated? No, you wouldn’t. Would you pay $5-10 in transaction fees to buy something as cheap as coffee? Of course, you wouldn’t. Just to mention it, Bitcoin’s fees reached an all-time high of $37 in January.
To solve Bitcoin’s scalability problems, the developers propose a new technique called the Lightning Network. At its core, the Lightning Network’s idea is that small transactions, for example, ordering meals or drinks, don’t have to be stored on Bitcoin’s main blockchain. This off-chain approach would avoid the seven tps limit and reduce the transaction fees.
You can think of the Lightning Network as a system built on top of Bitcoin, which will allow you to make transactions between parties without miners having to validate all of them. As a result, fees would be much lower, and you’ll be able to process a lot of transactions per minute.
#3 How does the Lightning Network work?
To understand the main concept of the Lightning Network, I’m going to illustrate it with an example. Let’s say that you buy a donut from your local pastry shop every day. You want to pay with bitcoins, but you know that you might end up paying more in fees than the price of your donut. Following this logic, you might decide to stick to cash.
However, thanks to the Lighting Network you can create a payment channel between you and the pastry shop. To do that, you need a multi-signature wallet, in which you and the shop will deposit bitcoins. Think about it as a safe, which you can open only if the two parties use their respective key, e.g., they agree to open it. For example, you’ll put 0,08 BTC in and the shop – 0,00 BTC, because it doesn’t offer refunds.
By setting up the multi-signature wallet, you also create a balance sheet which shows how the funds are distributed. In simple words, it shows that you have 0,08 BTC and the pastry shop – 0,00 BTC.
To open the payment channel, you save the wallet address to the main blockchain so that it will be transparent to all interested parties. The pastry shop knows that you have deposited bitcoins into the wallet and that it will receive them once the channel is closed.
Now that you’ve established the payment channel between you and the pastry shop, you can order your donut. Let’s say that it costs 0,002 BTC. You’ll subtract the cost from your balance and add it to the pastry shop’s balance. The balance sheet will say that you have 0,078 BTC and the shop – 0,002 BTC.
Both parties sign the updated sheet with their private keys, but they don’t announce their deal to the main blockchain to be validated. Each keeps a copy of the sheet, which will be updated every time a transaction occurs. So, in a sense, these transactions are “hypothetical” or “potential,” and they would remain so until you close the channel.
You can keep making more transactions with the shop as often as you’d like. Since everything happens away from the main blockchain, you avoid the seven tps limit.
However, what happens when you decide that you don’t want to buy donuts anymore? Or the pastry shop closes doors? Well, either one of the interested parties can close the payment channel by broadcasting the last signed balance sheet to the blockchain, which makes the deal “official.”
After that, the miners would do their job - make sure that the signatures are valid and release the funds to both parties. For example, if you’ve bought ten donuts, you’ll get 0,06 BTC back from the deposited amount and the pastry shop – 0,02 BTC. It’s as simple as that.
So, no matter how much transactions you make inside the payment channel, you’ll make only two transactions on the main blockchain:
#4 Is the Lightning Network safe?
Some of you might wonder what happens if you try to release an old balance sheet, e.g., pay less to the pastry shop? The lightning network requires the latest updated balance sheet to unlock the money. What’s more, since either party owns a copy, you can get your money even if the other side doesn’t want to pay you.
So, you can’t refuse to pay once the pastry shop broadcasts the balance sheet, and vice versa - the pastry shop can’t keep all your money hostage.
In addition to this, it’s not necessary to open a direct payment channel with every person or a business, which you want to send money. The lightning network tries to find the shortest possible route for your payment from person A to person B.
For example, your friend also wants to buy donuts, and you have a payment channel open between you two. Your friend doesn’t need to open her own channel with the pastry shop. She can transfer the money to you, and you’ll send them to the pastry shop.
# 5 Lightning network cons
Like every good idea, the Lightning Network has a few shortcomings, which we are bound to mentions:
The Lighting Network certainly looks like an excellent way to unload the main blockchain and make transactions cheaper and faster. Currently, it’s in beta mode, and we will see if it will find its place in the crypto community or if it will fail, as some predict.
What do you think about Bitcoin’s Lightning Network? Do you think it’s a good idea? Share your thoughts in the comment section.