Intro to Lightning

The Lightning Network is a currency agnostic protocol that allows people to send money instantly on the internet. It is currency agnostic, and is currently implimented and running on the Bitcoin and Litecoin networks. This solution allows Blockchain ( & DLT) networks to scale to many thousands of transactions per second, without sacraficing security or accesibility. It is an open source project. This is a short intro on how lightning works under-the-hood at a high level. The intro assumes you know the basics of Bitcoin, if you don't, have a quick recap: Intro to Bitcoin

How it works

Lightning uses network of "payment channels" to route payments from one user to another. A payment channel is a type of multi-sig wallet with the addition that the corresponding key holders can only spend a portion of the total balance that belongs to them. The important aspect of this relationship is that Party A can sign a transaction that allows party B to have a share of A's coins. In a payment channel, the instant you have recieved the signed transaction from the other party, you have safely, trustlessly recived those coins. Usually to move a bitcoin balance from one user to another you must move coins from one adress to another on the bitcoin network, incuring a cost plus a wait for blocks. It's fairly similar to having a Bitcoin private key printed on a piece of paper, and handing it to another person. The private key can be handed back and forth many times without needing to update the blockchain. The problem with a raw private key, is either party could copy / or spend the balance of the private key making the note valueless. The multi-sig wallet gives the same tradeability, but in a trustless way. The "payment channel" is extended in a lightning network by users creating channels with multiple parties. If person A wants to pay person C, as long as A is connected to someone who is connected to C, then A can pay C.



If A wants to pay C 1p, then The balance of A in channel AB is reduced by 1p, and the balance of C in BC is increased by 1p. This leaves B's balance the same as before the transaction happened. B can participate in 1000's of transactions between many parties without their own balance being effected. A can succesffully pay C through B, and this method can be extended to many "hops". The protocol is limited to 20 hops, but following the idea that you are connected to every other person on earth within 6 degrees, 20 will be plenty. 10 Channels to 10 hops gives you 10 billion connections.

Drawbacks

Here are the drawbacks of using the Lightning network:

1) You need to have created a channel with at least one person to start participate on the network.

2) To spend or recieve funds you most have at least that ammount available on the opposite end of your channel.

3) There must be a route between you and the person you are transacting with.

4) You can't send money to a wallet without that wallet giving you the invoice first

5) Both parties need an active internet connection while transacting.