Lightning Network is one of the most exciting developments in the blockchain ecosystem, allowing for zero-fee cross-chain payments secured by existing blockchains. In this insight I'll explain how lightning network works, how it facilitates cross-chain payments, and what this means for cryptocurrency adoption. But first, let's start with the basics and remind ourselves how traditional bitcoin transactions work. Notice that I will be using bitcoin as an example, but the same technology can be activated on any bitcoin-like blockchain that has segwit activated, such as litecoin, and I'm sure many others will follow.
Normal bitcoin transfer
Bitcoin's blockchain, technologically speaking, is a distributed database with very strict user permissions. You can only modify the records that can be unlocked with your private key. Bitcoin-the-cryptocurrency uses this technology to allow each user to move coins from their wallets to someone else's, and to prevent others from being able to claim your bitcoins.
The way a bitcoin transfer works is via the owner signing a transaction, where they let the network know that they've moved a portion of their funds into another user's account, and then having a miner include this transaction into a block.
Now remember, every time you interact with the blockchain you need to either mine a block yourself, or pay a fee to another miner to include your transaction.
Lightning network bitcoin transfer
If you plan to transact with a third-party more than once in a short period of time, you will still have to pay miner's fee for each transaction regardless of how much bitcoin you're transferring. The Lightning Network technology was created to allow you to be able to transact with a third party multiple times without having to pay any fees for money transfer. How does it do that? By conducting value transfers off-chain via payment channels, and storing only the start and end wallet snapshots. It looks like this:
- Locate a third party you want to transact with and agree on maximum value trade amount.
- Opening a payment channel creates a multisig wallet for the parties involved (under the hood, you don't need to worry about it), which controls the bitcoins that both parties have staked for opening the payment channel.
- You can transact directly between each other with no fees.
- When you're done - you close your payment channel and the final balance gets stored on the blockchain.
Theoretically, most people can transact with friends and trusted businesses completely off-chain via one opened LN channel for years. The only real reason to close a payment channel once the tech reaches mass adoption would be for settling disputes. Then the blockchain will record the final state of the channel, and you would presumably never have to deal with this person or business ever again.
So, unlike normal bitcoin operation mode, instead of recording every transaction on the blockchain, you can transact with a third party however many times you want, and when you're done you only need to update the final balance. This allows you to only pay the fee once - for the opening/closing of a payment channel, as well as to scale bitcoin's transaction capacity immensely, by only using the blockchain to verify balances instead of processing every single transaction.
One important thing to notice is that in this configuration Alice can transact with Anna with no fees (provided that Bob and Charlie do not want to charge fees themselves), even though they do not have a payment channel open with each other. Hence the network.
Possible lightning network configurations
The technology behind lightning network is as revolutionary as bitcoin itself, allowing for both cheap payments and helping the blockchain scale to effectively hundreds of thousands transactions per second. However, its economical sensibility depends on the real world network configurations.
What pessimists think will happen
In this network layout, all transactions will end up going through node b. The upside is simple: you only need to open one payment channel with b and you can transact with everyone in the world! The downside is that we're back to having centralized money operations.
What optimists think will happen
Optimists believe that the economic pressure is going to force mass adoption of lightning network capable wallets, and every node will be connected with another one via payment channels. The downside of this approach is that you'll need a very reliable and powerful internet connection in order to sustain this many open payment channels, which is unrealistic for real world use scenarios. Not to mention that most of the users will not be able to stake enough bitcoin to open this many useful payment channels in the first place.
What is really going to happen
In my opinion it'll probably be a mixture of both. There will be some centralization, i.e. someone will maintain a well-funded and stable payment channel broker between USA and China. Or, let's say, Coinbase will operate a payment channel node that lets you transact with other coinbase customers for free. However, since creating your own payment channel node is so easy, these centralized hubs will be kept in check. As soon as they want to start charging unreasonable fees someone else will appear that will do the job cheaper.
There is one more crucial aspect of lightning networks. Let's go back to the original example:
If Charlie is operating a lightning network for both bitcoin and litecoin, he can operate a lightning network exchange. It gets real interesting when Bob operates both networks too. In theory, here's what can happen when Anna sends 1 BTC to Alice.
- Anna sends BTC to Charlie via a payment channel.
- Charlie agrees with Bob to exchange value in LTC instead of BTC, so that their commission for transfer is lower.
- Bob receives Charlie's LTC and gives Alice the right amount of BTC that Anna sent her.
This would allow Anna and Alice to transact in Bitcoin without paying fees, while the real value transfer it happening over LTC and is secured on Litecoin's blockchain.
It's still early days for Lightning Network, but we're already seeing optimism in the market. With litecoin being the first major blockchain to adopt segwit and integrate lightning network, and with bitcoin to follow them soon, we're about to usher into a new era of instant and cheap money transfer. Once this technology is operating at full capacity it will drastically improve blockchain contention and will eliminate the problem of scaling the blockchain. And cross-chain payment networks will allow users to seamlessly send money and convert between different denominations, while enabling network providers to reduce costs by securing their transactions on the blockchain with the lowest fees.