About

Year 2017–2018 has been all about scalability in blockchain. There have been many solutions proposed under Layer 1 and Layer 2. Layer 1 solutions will involve change in the core blockchain code. Layer 2 protocols involve solutions that are positioned on top of the main chains. Lightning network is one of the popular Layer 2 solutions.

History

Lightning network was first proposed as a whitepaper in 2015 by Joseph Poon and Thaddeus Dryja. The protocol specification was released in December 2017. Initial implementations where from 3 organizations —

ACINQ — Eclair (Scala implementation of the lightning network) Blockstream — c-lightning (C implementation) Lightning Labs—Lightning network daemon (lnd)

Many new teams are working towards establishing their clients. Even though these are the current popular ones in beta release on the bitcoin mainnet. Also, all three teams are working towards a inter-operable LN (Lightning Network), making it much consumer friendly.

LN was initially targeted towards Bitcoin. There are other cryptocurrencies launching the protocol as well like Litecoin, Stellar, Zcash, Ether and Ripple.

How it works ?

Basically, lightning network relies on concept of payment channels. Lets say two people, our famous Alice and Bob want to use LN for playing a game of chess. They set a prize for the winner which will be 10 BTC. Below are steps that goes in setting up a LN channel.

Alice and Bob setup a multi-sig wallet by putting in 5BTC each. This transaction will be recorded on the main bitcoin blockchain along with the wallet address. A payment channel gets created between both the nodes. There is a small fee whenever a channel is created. Also, if Alice and Bob do not want to setup a channel for themselves, they could even use connecting nodes for making the transactions. Only thing here is the nodes facilitating the transaction might charge some fees again. Now, Alice and Bob can make any number of transactions. These are also instantaneous, they dont have to wait for confirmation like main chain. All of the transactions, updates to the balances are committed to a balance sheet thats located in each node. When they are done with the game and they are ready to close the channel, Alice and Bob can submit the balance sheet to the main chain. Note that, main chain doesn’t have to execute all the intermediate transactions made by Alice and Bob. Only, the final one with ending balances. Closing a channel will confirm the balance for Alice and Bob on the main chain as well. If any discrepancies, there is a challenge period during which any of the channel members can fight by submitting a transaction history from their node. If identified as the victim, all the 10BTC will go to the victim.

Benefits

Good for micro transactions.

Fast instant transactions. LN quotes 1 million tps.

Very minimal amount of transaction fees.

More privacy.

Both Desktop and Mobile clients available, which means u can use LN for payments even with mobile.

Problems.. Problems..Problems.

LN is still in beta testing phase.

It needs more people adopting to achieve the scalability mentioned.

Large payments is difficult. Currently, with 7800 channels only 20$ max is possible. High failure rate for anything above 5$.

Very less liquidity.

Major capacity held by 10 nodes as of today. Scope for centralization. Currently, 0.4 % nodes control 51% capacity.

Nodes need to be online in order for channel to work. Very hard for mobile clients.

Not all LN clients available right now are user friendly.

Closing a payment channel takes hours sometime.

No offline payments available.

There was a DDOS attack executed on LN network, causing lot many nodes to go down, which is a big risk.

Future prospects

Watchtowers and backups — These facilitate for protecting light client nodes like mobiles.

Atomic multiparty payments (AMP) — Allow large transactions to be split into series of smaller transactions.

More user friendly and light clients.

Better routing protocols.

Cross-chain atomic swaps — Instant exchange of assets in separate blockchains.

Conclusion

As all things in blockchain, LN is still not completely mature. Though its available in beta for public use, there is a certain amount of risk you will be taking. We will have to wait and see where this goes .. :)

References