Understanding the Lightning Network
The Lightning Network (LN) has been gaining public attention due to the large number of publications it has been receiving lately. The Lightning Torch movement has just started recently. This time, though, the public seems to be more attracted to the news surrounding its adoption and updates that would solve the network’s drawbacks, as some people have said.
In the previous post in Lightning Series, we talked about the significant effort the Lightning Network community made to develop the technology.
Read more: The Lightning Network Tour: An Overview
Still, as a new technology, LN can be quite challenging to understand, especially from those without a technical background. We created this piece of content to help people get used to LN, the terms used, its features, as well as how to use the Lightning Network. Hopefully it will also encourage them to explore the technology further and get the most out of it.
First, we need to understand the technical challenges of Bitcoin blockchain that have inspired the creation of LN. The size of Bitcoin blockchain is variable; it is, on average, about 1.2 Megabyte. With an average creation time of 10 minutes per block, the number of transactions the network can process is between 3.3 and 7 transactions per second.
As more people use Bitcoin, which is expected, the number of transactions also increases. It is alleged that the limited size of the block – 1.2 Megabyte – has become “bottlenecks”, resulting in a high fee to include and process a transaction inside the block.
These limitations, namely the low number of transactions per second and the high fee are what the public refer to as Bitcoin rating issues. They are thought to be the obstacles for Bitcoin to see the expected mass adoption and significant obstacles to the largest crypto becoming a widely used general currency.
The Lightning Network: Solving Bitcoin Technical Constraints on Scalability
LN offers a solution to the technical limitations of Bitcoin blockchain. The nascent technology works on a second tier to process transactions, excluding the Bitcoin blockchain and only used for the initial creation and final fund settlement.
By moving the transactions away from the main blockchain, LN will disconnect the Bitcoin network. As a result, the transaction processing fee will become lower than Bitcoin’s on-chain transaction fee.
In more detail, here’s what LN has to offer:
Since the transaction takes place on the Lightning Network and not on the Bitcoin blockchain or off-chain briefly, it does not have to wait for block confirmation. As a result, all transactions can happen almost instantly.
Another benefit of having the transactions off-chain is that it does not have to compete with other transactions to succeed, thus keeping the fees very low.
Without a block size restriction, more transactions are possible. The Lightning Network’s ability to process transactions can reach almost unlimited.
- Cross-chain transaction
Called the Atomic Exchange, the feature has been successfully tested and performed for two different blockchain that share the same cryptographic hash function. That means users can negotiate with different cryptocurrencies on the Lightning Network, without having 3rd party mediator. The feature is under continuous development, so more capabilities can be expected in the future.
How Does the Lightning Network Work?
Here is a picture to better understand how the Lightning Network works:
Annie and John are good friends, and they are looking for a quick and cheap way to send Bitcoin between them, so they decided to try LN. As first time users, they must:
- Create a multi-signature wallet (multi-sig)
To create one, both sides must provide their public addresses and private keys. Both parties can then access the wallet using their respective private keys.
- Deposit a certain amount of Bitcoin to the multi-sig wallet
The Financing Transaction both or one of the participating parties may do so. In this photo, Annie deposits 0.01 BTC into the wallet and John 0.05 BTC.
After the multi-sig wallet setup was done, Annie and John lightning goals can start sending money together. Transactions made on the channel are called Lightning Commitment Transactions. The total amount of Commitment Transactions cannot exceed the amount of the deposit, which in this case is 0.01 BTC to Annie, and 0.05 BTC to John.
The channel can stay open for as long as Annie and John want. The Commitment Transactions will not affect their actual Bitcoin balances, until the channel is closed, which will trigger the Settlement Transaction and pay the transaction fee. When a Settlement Transaction occurs, the amount of Bitcoin owned by each containing nodes on the Lightning Network wallet will be “synced” with the balance recorded on the Bitcoin mainnet.
Let’s say, Annie wants to send 0.001 BTC to Ryan. It doesn’t have an open channel with it, but John has. If the channel between Annie and John is still open, he can send the fund to Ryan, without having to open a multi-sig wallet with him first. Annie’s Lightning goal can lead the payment to Ryan through John’s goal. But if the Annie-John Lightning channel is already closed, the goal will be to find an alternate route to send the fund to Ryan through any existing connections. Annie is only required to open a multi-sig wallet and go through the above steps again with Ryan only when there are no possible links between them.
Bitcoin Lightning Network Adoption and Use Cases
Apparently the first commercial use of LN occurred on December 27th, 2017. This is when Alex Bosworth, a developer, paid his smartphone with Bitcoin using Bitrefill, a platform that allows people to buy various products and services, such as prepaid mobile gift cards and refills using crypto.
Ever since more use cases have been discovered and reported as more businesses have adopted the Lightning Network as a payment option. Consumers can use LN for online gaming and gambling, shopping online for various items, from pizza, smoothies, to t-shirts, buying technology products and services, such as register / domain maintenance and cold wallet.
In the crypto trading business, Bitfinex is the first major exchange to integrate LN. The development process was challenging, yet exciting and led to the successful integration of Lightning Network on the Bitfinex platform.
Read more: The challenge of integrating the Lightning Network
Users can now easily extract and deposit Bitcoin to their account by connecting to the Bitfinex Lightning node; more capabilities are on the way.
So, what’s the catch?
Being a new technology, LN still needs more time and effort to reach its full potential. The good news is, it has a community that is actively building the technology. As a result, at a very young age, the network has already gone through major developments and seen significant improvements.
Different Lightning Network Protocol implementations for the Tech-savvy
For users with technical capabilities, there are a number of Lightning Network protocol implementations according to the programming languages used to choose from. Here are some of them:
- C-Lightning in C is developed by Blockstream.
- Lightning Network Daemons (LND) in Golang are developed by Lightning Labs.
- Éclair in Scala is developed by ACINQ.
Although LN was initially offered to overcome Bitcoin’s rating problems, the technology itself is applicable to other cryptocurrencies, especially those that support multi-sig wallets and smart contracts. Following its predecessor, Litecoin Lightning Network was launched in April 2018. Meanwhile, Stellar started their own version of the Lightning Torch movement in June 2019.
The status of the Lightning Network is always undergoing rigorous development, which is why the crypto community can expect more features and capabilities in the future. Backed by the Lightning Network, it may well be a matter of time before we see Bitcoin as the ultimate P2P payment system as Satoshi Nakamoto predicted back in 2008.