Bitcoin’s greatest strength is also its greatest weakness. The distributed ledger technology (DLT) on which its Blockchain Protocol relies also hinders the system’s scalability, currently capping it at about 2-7 transactions per second (Tx).
In 2015 Joseph Poon and Thaddeus Dryja proposed a solution to this scalability problem in the Lightning whitepaper. This solution was the Bitcoin Lightning Network, which is still piloting on the Bitcoin testnet at the time of publishing.
What Is the Lightning Network
By definition, the Lightning Network is a second layer on the Blockchain protocol that allows parties to transact off-chain in bidirectional payment channels. Transactions in these channels are enforced using smart contracts, and the final tally is then updated on the main blockchain.
The concept behind the Lightning Network is simple. Like having a tab at a friendly bar, you don’t have to make multiple small transactions where one would suffice.
In other words, this Layer 2 protocol takes microtransactions away from the main network where the validation process can be very expensive and time-consuming.
How Does a Bitcoin Transaction Work on the Lightning Network?
Opening a direct payment channel starts with an on-chain transaction. The two parties both deposit an amount of BTC equal to or greater than the value of the transaction in a multi-signature wallet. More about wallets and how to store your Bitcoins here.
Once the transaction is verified, an open channel is opened between the two peers, allowing them to transact with the BTC in the wallet to and from between them. These direct transactions are free and instantaneous.
The parties can have as many transactions between them as they wish, so long as the wallet balance supports it. These peer-to-peer transactions are secured and controlled by smart contracts:
- Any party involved can close the payment channel at any time
- Every time a transaction is made, a new timestamped record is created detailing the new balances of each party. Each party signs this new “balance sheet”.
- The most recent record signed by both parties is always considered the valid one.
- The funds remain in the multi-signature wallet until the channel is closed, at which time the latest record is used to release the wallet balance to the right owner.
- If one party attempts to conduct a fraudulent act, the amount they deposited in the wallet (which acts as an escrow) is lost to the other party.
When the parties are done transacting, they simply send the most recent balance sheet signed by both parties to the main blockchain network. The actual transfer of funds only happens at this time.
This direct payment channel isn’t restricted to the two users. Other people can use the same channel amongst themselves to transfer money in a wide, interconnected network. So long as there is sufficient balance, peers can ask either of these parties to send money on their behalf. The smart contract will automatically choose the shortest route to the recipient.
How to Use Lightning Network
The Lightning Network is not live yet, but when it does, there will be no limit to what you could buy with Bitcoin. What you can do right now, however, is download the Testnet client and the Bitcoin Lightning Wallet app.
With these two tools, you can buy Testnet coins, open a Lightning channel and start transacting. Here is a more detailed explanation of how to get started with the Lightning Network.
Benefits of the Lightning Network
- Instantaneous transactions between peers
- Almost free; the only costs involved are with the two on-chain transactions
- It isn’t restricted to Bitcoin alone. Blockchains with the same cryptographic hash functions could run on the same network
- Safe; Smart Contracts discourage any form of fraudulent behaviour
- Highly scalable. It is estimated that with full adoption, the Lightning Network could enable the rate of Bitcoin transactions to reach 2 million per second
There is a lot of hope for the Bitcoin Lightning Network. If it works as expected, it could be the magic key we need to really scale the Bitcoin blockchain for global adoption as a mainstream payment method and compete with the likes of Visa.