Hello guys. Welcome to another educative post.
In this post, I will be explaining in full detail what the lightning network is, how it works and whether or not it is the solution to the many problems troubling Bitcoin at the moment.
At the end of this post, you will be able to explain to someone else exactly what the lightning network is in your won words, without looking up anything! Sound good? Let's get started.
Ps: I recently entered into the Publish0x writing contest, and thanks to you guys, I won some money! Check out my winning entry here, and thanks so much for your support.
I will divide this post into the following sections:
- What is the Lightning network?
- How does it work?
- Top cryptocurrencies implementing the lightning network technology
- Pros and cons of the lightning network
WHAT IS THE LIGHTNING NETWORK?
Before I explain that, let me give you a brief history on why the lightning network was created.
The lightning network was created to fix the scalability issues of Bitcoin.
"The what issues of bitcoin?" You're probably asking.
Well, scalability is defined in simple terms as the ability of a product or service to continue to function optimally with increasing demand for it or it's use.
A blockchain can then be described as not having scalability problems when it is capable of handling an increased number of users without experiencing a dip in it's transaction per second time.
Bitcoin however isn't that cryptocurrency.
Bitcoin was founded by Satoshi nakamoto in 2008 as the first decentralised peer to peer payment solution. At that time, about 5 transactions per second were being processed. This was great back then, as not many people were interested in bitcoin anyway.
Fast forward to today, when bitcoin can do 7 transactions per second. A tiny increase over 2008, but now with millions of users worldwide. It takes hours now to complete transactions, and back in 2017, it took me 28 hours to send 1BTC from my cold wallet to my exchange, because the miner fee I chose what's very tiny. This isn't very great for anything that wishes to scale.
If bitcoin is to replace traditional fiat as a P2P transaction system at any time, it must surpass Vida's current record of 65000TPS. Things aren't looking very good for Bitcoin if that is the case.
Enter the lightning network.
The lightning network in itself is capable of doing up to 1 million transactions per second, which is insane.
Which leads us to the sub topic that we are under: What is the lightning network?
The lightning network is simply defined as a set of rules and regulations that have been layered over the bitcoin protocol.
There are three major teams working on the Lightning network project currently:
- Lightning Labs
These companies all have a different vision for what the lightning network should be, and they all have their implementations in different programming languages.
This is supposed to be a simple guide, so all of their technical stuff is beyond the scope of this post.
But to fully understand how the lightning network works, we have to use an analogy. Because those always work.
Say you and I went out for a drink in the bar. There are two ways I can pay for out drink, if I decide to pay.
Assuming we both have 64 drinks each(too much, but I had to make this interesting), I can decide to pay for each drink as we finish each drink.(this is how the current bitcoin network works)
Or I can decide to tell the waiter to open a tab for both of us, and make a record of each drink that we take. So I can pay for all of them at once at the end of our "session".
This is how the lightning network works.
But how exactly? It can't be that simple. And it isn't. Which is a great Segway to my next section:
HOW DOES IT WORK?
imagine if we were in a competition to see who could send who the most amount of money.
We would initiate sends and receives each minute.
Using the regular bitcoin blockchain, our transactions will be put into the public blockchain along with every one else.
This will take so much time, because someone else could have initiated an order before we initiated ours. So the miners will have to decrypt his own transaction before ours.
With the lightning network however, there will be a private channel created for both of us exclusively. Therefore, our sends and receives will be encrypted between us. Since there are only two of us, the miners won't have to verify anything, and our transactions go through completely free and instantly. These our sends and receives won't go through the blockchain.
But this is assuming we are friends. What if we're total strangers to each other, and have never met in real life? Would the lightning network trust you to send your part back?
Well, thankfully there's a solution for that.
Whenever two parties initiate a transaction, both parties input an amount that is greater than the transaction amount into a secure enclave of some sorts.
This way, if I decide to run off with your money, these funds are released to you. So you're never in risk of losing any money. Ever.
That's how the lightning network works in a nutshell.
Which leads us to our next topic:
TOP CRYPTOCURRENCIES IMPLEMENTING THE LIGHTNING NETWORK
All these cryptocurrencies have been announced for development by the start ups I listed previously. In fact, many of them have stable lightning networks already running off their blockchain
PROS AND CONS OF THE LIGHTNING NETWORK
- Instantaneous transactions with basically no waiting time
- Onion style routing
- Trustless design of transactions
- Reduces the load on the blockchain
- Availability of multi signature
- Very beginner unfriendly
- Does not have the support of the giant blockchain, so there are security issues
So that's it for a basic understanding of the lightning network. I hope you enjoyed the post and learnt something new.
Thanks for reading and enjoy the rest of your day.