The Lightning Network is a secondary layer of payments processing built on top of the Bitcoin blockchain.
It is known as a “layer-2 solution” because it is not a part of the main network (mainnet) and solves the scalability problem.
The scalability problem is the inherent inability of the Bitcoin network to process large numbers of transactions quickly and cheaply.
Cryptocurrencies suffer from a problem known as the “Blockchain Trilemma”, in which one of three characteristics must be sacrificed
These characteristics are:
- Decentralisation – How many points of failure there are in the network
- Security – How easy the network is to attack
- Scalability – How many transactions the network can handle within a given period
Bitcoin prioritises decentralisation and security because they guarantee the integrity of the network.
This leaves the network unable to handle large numbers of transactions, making Bitcoin poorly suited as a processor for everyday payments.
The Lightning Network solves this problem by processing payments on a separate layer almost instantly (at the speed of light) and cheaply, without the on-chain transaction fees.
Payments are settled on the Bitcoin mainnet once the Lightning payment channels are closed.
Therefore, it benefits from the decentralisation and security of the primary Bitcoin layer whilst adding a layer of scalability.
How does the Lightning Network work?
The Lightning Network works by opening up payment channels between participants.
It uses smart contracts to facilitate payments without the need for a third party.
Smart contracts work automatically depending on predetermined rules, much like how a vending machine will give out snacks automatically if it receives the correct amount of money.
The smart contract holds Lightning funds in the form of bitcoin. In this way, it essentially acts like a kind of online wallet, holding funds that have been deposited into the channel.
Funds can be sent back and forth in transactions between the channel participants.
However, these transactions are not recorded on the Bitcoin network; only the Lightning balances are updated.
This prevents congestion on the mainnet and reduces transaction fees whilst increasing speed.
A transaction is only recorded on the Bitcoin network when the Lightning payment channel is closed. The final balances of the participants are then settled on the mainnet.
In this way, potentially unlimited transactions can be processed on the Lightning Network quickly and cheaply and then finalised as one single transaction on the Bitcoin mainnet.
To add to the efficiency, the Lightning Network also allows connections between participants connected by mutual channels.
For example, if Bob has a connection with Sarah, and Sarah has a connection with John, then Bob and John can transact with each other despite not opening up a separate channel.
This greatly increases the connectivity between network members.
How did the Lightning Network begin?
The idea for the Lightning Network originated in February 2015, when Joseph Poon and Thaddeus Dryja teamed up to find a solution to Bitcoin’s scalability issue.
They published a white paper in 2016, with the test network launching in May of the same year.
It was first used, in what was called “Lightning First Strike”, in October. The Alpha officially launched in January 2017.
The Alpha closed in February 2018, with the Beta launching in March.
Since then, the network has continued to grow, with new programs and apps making use of it.
At present, it is a bonafide payment system, particularly in places like El Salvador, where Bitcoin is legal tender.
There, the Lightning Network is used to make transactions from buying groceries to eating at restaurants.
The Lightning Network is a layer-2 solution to Bitcoin’s scalability issues.
It allows people to transact in bitcoin without using the main network.
This makes transactions almost instantaneous and dramatically reduces transaction fees.
This makes bitcoin a viable currency for small transactions that people make in their day-to-day lives.
It works by opening up payment channels between participants and linking channels through mutual connections.
By settling final transactions on the Bitcoin mainnet, it still benefits from the decentralisation and security of the Bitcoin network.