Lightning Network isĀ one of the solutions for one of the problems of bitcoin.
Lightning Network is a system created on top of the Bitcoin blockchain, with specific rules, to have fast and fee-free transactions.
We all know Bitcoin is cool but it’s not perfect. Bitcoin has limitations such as the speed and cost of transactions.
In a particularly dense period of transactions, not high enough fees and blocks every 10 minutes, can make your purchase or move from one wallet to another really slow and expensive.
Lightining network should solve all these problems. The concept of this system has been developed since 2015 and we have to imagine that it works as if it were a layer cake.
On layer 1 we have Bitcoin with the blockchain while on layer 2 we have the lightning network system.
This feature is created specifically for micropayments, so that all micro transactions are not written on the bitcoin blockchain. At least not immediately.
The payment channels are created so if I want to send funds to a friend of mine or to a shopkeeper we can open a payment channel between the two of us, with our payments not involving the main blockchain. the transaction will take place at the speed with which the two wallets are able to communicate with each other.
When the transactions between the two wallets are complete, a main transaction will be created and written to the main Blockchain.
Now, if we thought of a series of regular, small-scale transactions, such as coffee at the bar every morning, each transaction sent to the main bitcoin blockchain would cost us more in lost time and fees than the transaction itself. Does it make sense to spend 10 dollars of coffee and 20 on commissions?
NO
Now let’s imagine opening a payment channel for my entire CY Mood team with my favorite bartender. Upon opening the payment channel, both parties deposit a certain amount of money to guarantee the total transactions. If I know my team drinks 100 coffees a week I will deposit an equal or greater amount.
On the main Bitcoin BlockChain there will be only 2 transactions, namely the first transaction to open the payment channel and deposit the coin and a second to “close” or complete the payment
Now if we go back to our second layer, thousands millions of transactions can take place within the payment channel without these being written to the main blockchain. My team will be able to drink thousands of coffees and every time they buy, they will write an X BTC transaction to the barista
Weekly, monthly or every time my barista friend wants to cash out the coffee bitcoins, he will decide to write the transaction on the main BlockChain.
The system works best for small repeating transactions, we can think of our baker or the barber. There is obviously a system against scams, for those who want to close the payment channel in advance and not pay anything. In this case, the total of the initial deposit would be sent to the scammer. This greatly discourages scams.
Another interesting ability of the Lightning network is the ability to make payments to people with whom we do not have an open channel, but using other people’s channels.