Lightning Network — A Second Layer Payment Protocol humanjets Follow Apr 3 · 7 min read

What Is The Lightning Network?

The Lightning Network is a decentralised protocol for instant (low-latency), high-volume micropayments down to 0.00000001 BTC (1 sat), without needing trusted intermediaries, dramatically reducing transaction fees and counterparty risk. It achieves this via smart contracts through a network of multi-signature transactions and scripts, so that any participant on the Lightning Network can pay any other participant.

It is a second layer payment protocol that can operate on top of a blockchain base layer (similar to how the internet is built in layers) and one of the first implementations of a multi-party smart contract (programmable money) using Bitcoin’s built-in scripting. [1]

History

The Bitcoin Lightning Network white paper was published by Joseph Poon and Thaddeus Dryja on January 14, 2016, and described as “scalable off-chain instant payments” designed for the transaction of the future: [2]

Instant Payments

Scalability

Low Cost

Cross-Chain Atomic Swaps

During 2017, a number of test transactions were carried out on Bitcoin Core implementations before Blockstream (a blockchain technology company led by Adam Back who have also developed the c-lightning implementation of the Lightning Network protocol), announced in January 2018 that Lightning was live on main net with 60 nodes, coinciding with the launch of their Blockstream Store that allowed payment via Lightning.

This was still considered a testing phase and high-risk, leading participants at the time to become branded with the social media hashtag “#reckless”.

Lightning Labs (another business developing Lightning), initially founded in 2016 with support from the likes of entrepreneur Jack Dorsey (CEO of Twitter and Square).

In March 2018, CEO Elizabeth Stark announces the release of lnd 0.4-beta. lnd (Lightning Network Daemon) is an advanced and developer-friendly implementation of the Lightning Network protocol, providing reliability, interoperability, and security for global-scale financial applications. [3]

Elizabeth Stark

ACINQ has also developed the eclair implementation and the MIT Digital Currency Initiative a non-commercial one.

The Lightning Network gained significant traction through the remainder of 2018 and into 2019, with initiatives like the Lightning Torch that utilised social media to stress test transactions passed through the network, and the Case Node that provides an off the shelf Bitcoin and Lightning Node solution, helping see the network grow to 4,526 nodes, 32,945 channels and 90,908,607,607 sats network capacity at the time of writing. [4]

How Does Lightning Network Work?

By using real Bitcoin transactions and smart contract functionality, the Lightning Network creates a secure network of participants who can then transact at high volume and speed at a low cost. It should be noted that a transaction malleability solution, like SegWit, was also required to make it viable, which is why development has advanced significantly since SegWit implementation.

It provides a peer-to-peer system of micropayments through a mesh network of bidirectional payment channels (local two-party consensus), enabling instant transactions at near-zero fees with other network participants. It requires the opening of a payment channel by funding a two-party multi-signature transaction on the Bitcoin public ledger, with local consensus on the balance between the two participants. The current balance is stored as the most recent transaction signed by both parties, spending from the channel address. To make a payment, both parties sign a new exit transaction spending from the channel address. All old exit transactions are invalidated by doing so.

Therefore, once funded, multiple Lightning transactions can be made to distribute funds without broadcasting to the main chain. In that sense, it resembles opening a tab at a bar without having to process a transaction for every round of drinks. A Bitcoin transaction fee would only be payable again upon the closing of a channel, with the remaining funds being redistributed according to the balance allocation, which can be done by either party unilaterally.

By embedding the payment conditional upon knowledge of a secure cryptographic hash, payments can be made across a network of channels without the need for any party to have unilateral custodial ownership of funds. The Lightning Network enables what was previously not possible with trusted financial systems vulnerable to monopolies — without the need for custodial trust and ownership, participation on the network can be dynamic and open for all. [1]

There is a penalty system to ensure only the latest balance state is broadcast. If either party falsely broadcasts an old state, the other party may take all the channel funds. This ensures an economic incentive to only broadcast the correct balance state, achieved through an on-chain dispute window before funds are redistributed. The Bitcoin blockchain itself, therefore, becomes the dispute resolution system enforcer for the Lightning Network.

No other nodes on the network can seize funds traveling via their channels due to time-locks that only permit the routing nodes to accept funds if they pass it along to the next participant in the path to its destination (for a small routing fee), therefore ensuring these nodes operate without custody of funds. This all happens off-chain between cooperative parties, and is enforced on-chain if a counterparty becomes uncooperative.

Since all parties have multiple multisignature channels with many different users, these interconnected payment channels form the Lightning Network, providing scalable, low cost and decentralised micropayment transactions to any other participant on the network, all on top of the security of the Bitcoin blockchain.

Benefits

The Lightning Network provides a scalable solution (by reducing the number of transactions that need to be stored) for Bitcoin to handle increasing demand, whilst retaining the security and decentralisation of the base layer.

Lightning also allows for faster and cheaper transactions without needing to wait for confirmations — particularly important to fully enable Bitcoin to be used as a form of payment in shops, cafes, bars, etc, and also for traders and exchanges, improving margins and lowering custodial risk by enabling constant deposit and withdrawal of funds.

It enables micropayments over the Bitcoin blockchain, opening up an array of use cases and business models, particularly in the realm of streaming and content monetisation, demonstrated by the increasing number of Lightning Applications (LApps) being developed.

A high volume of transactions can be supported, with faster than VISA and MasterCard transaction throughput (potential of at least 1 million transactions per second), without needing significant and expensive infrastructure.

Lightning also provides a privacy enhancement for Bitcoin, as LN transactions are not recorded on the blockchain and are shared using onion routing.

Though principally used as a Bitcoin-based scaling solution, cross-chain atomic swaps are also technically feasible to use it with other blockchains that share the same cryptographic hash function, like Litecoin for example.

Limitations

If any party drops the channel at any point, it will close and be settled back to the Bitcoin blockchain out of the other party’s control.

Lightning requires participants to be online at all times in order to send and receive payments, increasing potential vulnerabilities.

As the network develops, there is a danger of increased centralisation around prominent hubs, with too great a reliance on these nodes to route payments, causing capacity issues with any failure of these hubs.

Despite low fees in general, the complexity of routing required for particular transactions could well add up to something more substantial.

Current payment channels are capped in terms of capacity (16m sats at the time of writing), limiting the maximum amount of funds you can transact with. This is a short-term security feature however, and continues to be raised over time as the network expands.

All users were previously required to monitor the blockchain for fraud. The “watchtower” concept has since been developed however, so that this can now be outsourced to watchtower nodes to monitor instead.

Prospects

Lightning is still a risky, nascent network with significant further development and participation required. Its growth rate has been impressive however, with thousands of nodes now online, tens of thousands of channels opened and nearing 100bn in sats capacity, all in the space of around 18 months.

It provides a long-term scalable solution for the blockchain, whilst retaining small blocks, the corresponding lower equipment requirements and, therefore, the decentralized nature of Bitcoin, where it remains feasible for as many people as possible to run full nodes. This is in stark contrast to the big block base layer scalability preferences of Bitcoin Cash and Bitcoin SV.

Indeed, further to reports of a 210MB block causing BSV nodes to crash under the requirements, and its advocates now saying it’s too expensive to maintain BSV nodes that will likely cost thousands of dollars per month to operate (according to Money Button), it demonstrates how this preference only provides a very short-term solution to scalability at the expense of destroying decentralization.

Lightning shows us a vision for the future. A future where you can securely store your wealth on the Bitcoin blockchain, run a full node as easily as setting up a router at home, whilst having the freedom to transact frequently through something as simple to use as a mobile phone app.

Provided the Lightning Network continues to live up to its expectations and potential, instant micropayments, improved privacy and near-zero fees offer incredible benefits for Bitcoin scalability and mass adoption.