Welcome to my Lightning Network lesson!
This tutorial will explain what the Lightning network is, how it works, and what you can use it for. You won’t need to go anyplace else to learn about the Lightning network.
By the conclusion of this overview, you’ll understand what’s good, what’s bad, and what’s crucial about the Bitcoin Lightning network. I’ll start with a look at how it all began…
‘Satoshi Nakamoto‘ invented Bitcoin in 2009. They had vanished by 2011, never to be seen again! Nobody knows who Nakamoto is or how they want to develop the platform in the future.
This is a concern because, while Bitcoin is an outstanding piece of technology, it is not without flaws. If it is to remain the world’s largest cryptocurrency, it must develop and improve. This is where the Bitcoin community enters the picture.
There are many brilliant and motivated developers, engineers, and computer scientists in the Bitcoin community. They are all thinking of ways to improve the Bitcoin network. Some of these ideas are so modest that they go unnoticed, while others are so enormous that they generate entire cryptocurrencies!
The advancement I’m about to tell you about today is one of the most significant. It’s known as the Lightning Network, and it has the potential to forever alter the way we use cryptocurrencies.
What is the Lightning Network?
Thaddeus Dryja and Joseph Poon initially suggested the Lightning Network in 2015. Scalability is one of the most pressing issues confronting cryptocurrencies, and it should address it.
Scalability refers to how well a platform can handle a significant rise in the number of users. Let’s take a brief look at how Bitcoin works to have a better understanding of the issue.
Bitcoin is a decentralized peer-to-peer payment platform. It is decentralized since a corporation does not administer it such as Visa and does not have a leader. Its users manage bitcoin through a network of thousands of computers known as nodes.
Nodes keep a complete record of every Bitcoin transaction ever done. We refer this to as a blockchain. Before we can put a new transaction on the blockchain, over 50% of all nodes must agree that it is genuine. We refer this to as an agreement.
It takes around 10 minutes to process and add a fresh block of transactions to the blockchain. We know the nodes that do most of the work of processing transactions as miners, and we compensate them for their efforts. This implies that transferring Bitcoin is not just sluggish, but also costly.
You might deduce the rest from this! Let’s return to scalability.
The Scalability Issue
As Bitcoin develops in popularity, so does its network of nodes. The greater the number of nodes, the longer it takes for them to agree on new transactions. As the network grows in size, the average transaction speed decreases.
Bitcoin can now process 3-7 transactions per second (Tx/s). Now consider two of Bitcoin’s real-world opponents. PayPal can handle 150 transactions per second, but Visa can process up to 56,000 transactions per second when things get hectic. Users have waited 6 days for transactions to be completed while Bitcoin is busy! Transaction costs also rise during peak periods, forcing customers to pay more for less.
That is the scalability issue that Bitcoin and many other cryptocurrencies are facing. What will the Lightning network do about it? Let’s see what happens!
What is the Lightning Network and how does it work?
You may have heard the Lightning network referred to as a second-layer solution. This suggests that the Lightning network is attempting to address the scalability issue by adding a layer to the Bitcoin network. This is how it works.
Users can configure their payment channels using the Lightning Network. This implies that hundreds of small and medium-sized transactions can occur outside of the main network.
Assume Jimmy works for Tommy. Thad pays Joe 1BTC every day for the duration of the contract, which is 30 days. The couple established a payment channel on the Bitcoin Lightning network. The data adds to the main blockchain and we refer to it as the anchor transaction.
Every day, Tommy transfers 1BTC to Jimmy via their new payment channel. We know these transactions as micro-payments, and they take place in real-time. The pair must agree on each transaction via their payment channel.
The contract expires after 30 days, and the couple closes the payment channel. The channel’s final balance will transfer to the network, where it will process and added to the main blockchain. We refer this to as the settlement transaction. So, while Tommy and Jimmy made 30 micro-payments through their payment channel, only two transactions need to be posted to the main blockchain.
Tommy could transmit Bitcoin to Jimmy rapidly by leveraging the Lightning network, freeing up the main blockchain to execute larger transactions. Everyone comes out on top!
Next, I’ll inspect how Tommy and Jimmy put up their payment channel and how the system may expand to become a full network…
Tommy and Jimmy will require a multi-signature wallet to set up a payment channel on the Lightning network. This is like having a shared bank account. A deposit of funds creates a multi-signature wallet. Tommy would deposit 1-30BTC in our scenario. This is the anchor transaction, which is put to the main blockchain.
For transactions to take place in a multi-signature wallet, each user must give two types of information. They are:
- Public Address: Bitcoin’s public address is its digital location. Consider it as an email address; you can send and receive information from it.
- Private keys: These serve as a kind of password for the public address. Each user has his or her private lines of code that they use to “sign” transactions to and from the public address.
If either user cannot submit this information, no transactions will take place through the payment channel. So, how can a single payment channel develop into a lightning-fast payment network?
What makes Lightning network payment channels unique is that they link to form payment networks with hundreds or even millions of users.
Jimmy and Tommy do not need to establish payment channels with every Lightning network member to conduct transactions with them. Assume Jimmy and Lou are married and have a payment channel for home costs. This payment channel connects Tommy and Lou via Jimmy, therefore Tommy and Lou may now transmit Bitcoin to each other without having to set up another payment channel.
Assume Tommy, Lou, and Jimmy each have ten distinct payment channels with other users, and that each of those users has ten distinct payment channels as well. Soon, you’ll be staring at a network of millions of nodes capable of quickly transmitting Bitcoin to one another. A single payment might flow through thousands of nodes in less than a second to reach its recipient!
I understand what you’re thinking. What prevents another user from taking my money if it passes through hundreds of different nodes to get to where I want it to go? Continue reading to discover out…
Lightning Network: Pros and Cons
- The Lightning Network is not yet operational. It’s difficult to predict how effective it will be until hundreds of thousands of people use it. Unfortunately, there are enough difficulties with the Lightning network to keep the development community busy for quite some time.
- To catch cheaters, you must be online. Some of the security precautions I discussed before are only effective when users are online. Developers have proposed employing a fee-based service to protect smart contracts when users are offline. These Watchtower services are still in their infancy at locations like Lightning Labs.
- The network may become overly centralized. Some members of the cryptocurrency community are concerned that the formation of payment networks would lead the platform to become more centralized. This means that well-funded nodes with thousands of payment channels have the potential to become strong central hubs through which most network traffic flows. Consider a blockchain version of a large corporation such as Amazon on the Bitcoin Lightning network! Cryptocurrencies eliminate middlemen rather than increase them!
- It is a long-term answer to the problem of scalability. Other systems, such as Bitcoin Cash, have made tweaks to Bitcoin that they believe will fix the scalability issue. Their remedies, however, are typically short-term. If the network is ever genuinely scalable, it will take the shape of a project like the Lightning network. A few additional recommended solutions are large enough to entirely solve the problem.
- Micro-payments are synonymous with micro-fees. The Lightning Network has the potential to tackle Bitcoin’s second-biggest issue, which is exorbitant fees. When it was first introduced, Bitcoin promised lightning-fast transactions with little or no fees.
- Users have more control over the Lightning network. Miners control most of the Bitcoin blockchain. Miners need extremely powerful and costly equipment to fulfill the duties required in transaction processing. Anybody may run nodes on the Lightning network, including laptops, home PCs, and (soon) mobile phones. Bitcoin accommodated everyone, and the Lightning network intends to do the same.
Stripe, a prominent payment processing provider, said on January 23, 2018, that it was discontinuing support for Bitcoin payments. According to Tom Karlo, Product Manager, Bitcoin has “become more suited to becoming an asset than a method of trade.” This shows that Bitcoin is valuable, but it is no longer useful as money!
Bitcoin is years ahead of traditional banking in terms of technology, but it still has a long way to go as a money system. I want you to consider all the tiny purchases you make throughout the day. Can you imagine paying for a bus ticket or a cup of coffee using Bitcoin? By the time they post the transaction on the blockchain, the bus would be late and your coffee would be cold!
Using the main Bitcoin network for minor purchases is like paying for a cup of coffee using a wire transfer or a check. You’d never do something like that.
Credit and debit cards account for 72 percent of all non-cash expenditures in the United States, yet they account for just 3 percent of overall spending in dollars. This is the type of micro-payment that should take place on the Lightning network. Consider how much quicker the Bitcoin network would operate if the main blockchain was only used to process the 28% of transactions that account for 97% of all spending.
If Bitcoin is to flourish as a digital currency, it must improve as a “medium of exchange.” The Lightning Network is the finest option. It is not yet complete, but when it is, we may witness the type of Bitcoin network that Satoshi Nakamoto envisioned in 2009.