Many people believe that Bitcoin is the future for our financial system. But there is a big issue standing in the way of this goal, and that is scalability. Let me give an example: the payment provider VISA processes on average around 4000 transactions per second and can scale up to a maximum of 65,000. Bitcoin, on the other hand, can handle up to 7 transactions per second with the current block size of 1MB. Not tens of thousands, but just 7! Clearly the main blockchain isn't very scalable. But it doesn't have to be! The community has come up with a new technique called the Lightning Network to solve the scalability issues. The key idea is that small, everyday transactions don't have to be stored on the main blockchain. This avoids the 7 transactions per second limit and is also called the off-chain approach.
So how does it work? Let's take a look at an example. Let's say that every morning Bob buys a cup of coffee on his way to work. Creating a transaction on the blockchain for a simple coffee is really overkill. He might end up paying more in fees than the actual price of his coffee. However, with the Lightning Network, Bob can set up a payment channel with the coffee shop. To do that, both the coffee shop and Bob deposit a certain amount of Bitcoin in what is called a multi-signature address. Let's assume that Bob deposits 0.05 BTC and the coffee shop deposits nothing, because they don't offer refunds. This multi-signature address is basically like a safe that can only be opened when both parties agree.
When we open the payment channel, we also make a balance sheet that says how the funds in the address should be distributed. So right now it says: "Bob will get 0.05 BTC and the coffee shop will get 0 BTC," the same as they deposited. Opening the payment channel happens on the main blockchain so that there is full transparency. The coffee shop owner can see that Bob has deposited 0.05 BTC, and they can rest assured that they will get their money once the channel closes.
Now that the channel is open, Bob can order his morning coffee! Let's say that a coffee costs 0.001 BTC. To pay for it, Bob simply changes the balance sheet. He subtracts the cost of the coffee from his balance and adds it to the coffee shop's balance. So now it says that "Bob gets 0.045 BTC and the coffee shop gets 0.005 BTC." Bob and the coffee shop now sign the updated balance sheet with their private keys, and they each keep a copy of it, but they don't do anything else with it. Bob can keep ordering coffees for as long as he has a balance in the payment channel. Both of them can make hundreds of thousands of transactions between them. There is really no limit, because this happens away from the main blockchain.
But all good stories come to an end. The payment channel can be closed at any time by either Bob or the coffee shop. All they have to do is take the latest balance sheet, which was signed by both parties, and broadcast it to the Bitcoin network. Miners will then validate the signatures on the balance sheet and, if everything checks out, release the funds according to the balance sheet. This will create a single transaction on the Bitcoin blockchain. So the Lightning Network can significantly reduce the load on the main blockchain. It only requires two transactions on the blockchain: one to open the payment channel and another one to close it.
It's also very safe. The system ensures that only the latest signed balance sheet can be used to unlock the money. And because both parties have a signed copy of the balance sheets, they can release the funds at any time, even if the other doesn't want to cooperate anymore. For example, Bob cannot hold the money hostage that belongs to the coffee shop, and vice versa.
It doesn't end there. You don't need to open a direct payment channel with everyone you want to send bitcoins to. You can simply use the network to pass your coins around. Here is Alice, a friend of Bob. They've exchanged money on the Lightning Network before, so they have an active payment channel. Now let's say that Alice wants to buy a coffee. Instead of opening a direct channel to the coffee shop, she can transfer the money to Bob, who will then transfer it to the coffee shop. No need to create a payment channel with everyone! In the Lightning Network, your payment tries to find a route from person A to person B. It tries to do this with the least amount of intermediaries and the least amount of fees. This further reduces the strain on the blockchain, but it requires the intermediaries to have enough money in the payment channels.
So, now you know what the Lightning Network is and how it works, but when will it actually go live? Right now there is a proof-of-concept implementation running on the Bitcoin testnet. We don't know yet when it will go live for everyone, but chances are it will happen in 2018!
That was it for this video. If you liked it, hit the thumbs up button and subscribe. Thank you very much for watching, and I'll see you in the next video!
