We’re going to go over the Lightning Network: the way it works, the way it makes Bitcoin scalable and the way it suits in with the bigger Bitcoin community.
However earlier than we discuss concerning the Lightning Community, we have to discuss Layer 1: Bitcoin’s blockchain.
The blockchain is a public ledger that retains a report of all the transactions that individuals make with their bitcoin. So, if you happen to ship bitcoin to somebody, that transaction goes to seem on the blockchain.
Now, there are a couple of tradeoffs which can be made when utilizing Bitcoin’s base layer. First off, it will possibly solely course of about seven transactions per second, and it takes about 10 minutes on common for these transactions to substantiate within the subsequent block. There may be additionally a transaction payment that should be paid out to the miners for processing that transaction.
So, it’s fairly apparent that Bitcoin must have sooner transaction throughput and decrease transaction charges if it desires to be scalable to a world viewers.
That is the place a Layer 2 protocol, the Lightning Community, is available in.
How Does The Lightning Community Work?
The Lightning Community is a second layer that operates on prime of the Bitcoin blockchain, and anchors instantly into it. And it will possibly deal with tens of millions of transactions per second cheaply and effectively.
We’re going as an instance the Lightning Networking by evaluating it to opening a tab at your native bar.
As a substitute of swiping your card and settling the stability every time you order a beer…
… it is sensible to avoid wasting time, vitality and charges by tallying your whole drinks collectively on the finish of the evening and making the ultimate settlement in a single fee.
That is much like how the Lightning Community operates.
Now, let’s say that your bar was working on the Lightning Community.
If you need to begin a transaction, you’ll open a fee channel with the bar. This fee channel is much like a operating tab. So, whenever you begin shopping for drinks, these transactions would get recorded on the fee channel, the identical manner that they’d get tallied on a bar tab. Now, it’s essential to keep in mind that it’s not simply IOUs which can be being transferred on the fee channel as they’d be on a bar tab. Bitcoin is being transferred, so you’re paying the bar in actual time in your drinks. These transactions are simply not being recorded on the blockchain. Fairly, Bitcoin is simply bouncing between you and your bar through the fee channel.
And whenever you shut the fee channel, the ultimate settlement of bitcoin every get together has is broadcast to the blockchain, which finalizes your whole transactions.
Now that you know the way the Lightning Community works, how does the Lightning Community slot in with the blockchain?
How Does The Lightning Community Match With The Bitcoin Blockchain?
Properly, as we’ve already mentioned earlier than, the Lightning Community operates individually from the blockchain, however it’s nonetheless anchored to it. Lightning Community is the place transactions occur, and the blockchain is the place these transactions are finalized.
So, throughout your month-long journey on the bar, you solely made two precise transfers on the blockchain. The primary transaction is whenever you funded the fee channel with bitcoin to open it, and the second is whenever you closed the fee channel. However between these two transactions, you would have made an infinite quantity of transfers inside your channel on the Lightning Community.
However by conducting these probably infinite transactions on the Lightning Community somewhat than on the blockchain, we reduce the burden on the blockchain, enhance transaction charges for on a regular basis purchases and maintain transaction charges low.
Now, you might be pondering that establishing a fee channel with the a whole bunch of companies that you just patronize could possibly be tedious. However that is the place the Lightning Community actually shines. You don’t want a direct fee channel with somebody so as to pay them. You’ll be able to pay individuals and companies by way of middleman channels on the community.
Let’s return to our Lightning Community bar instance as an instance this additional.
Say you carry your good friend, Bob, with you to the bar. Bob doesn’t have a fee channel open with the bar, however he does have one with you. Bob can nonetheless pay the bar by way of your fee channel. This might be like Bob shopping for beers in your tab and paying his invoice to your Venmo.
That is what makes the Lightning Community so scalable. It finds the quickest path between two events to report everybody’s transactions and makes certain everybody will get paid accordingly. So, as a substitute of getting a whole bunch of fee channels for each enterprise you patronize, you solely want a couple of, and the community will deal with every little thing else robotically.
So, that’s Bitcoin’s Lightning Community. It combines velocity and safety with minimal charges to make Bitcoin scalable to a world viewers and probably the most environment friendly fee system on the earth.