Crypto 101: Lightning Network

in #bitcoin6 years ago (edited)

We’ve all heard about the lighting network and how it is supposed to improve on bitcoin and cryptocurrency in general. I had a basic understanding of it, but wanted to know more which is why I created my initial video on the topic. Since then I've decided to post my write up about it to share.

What is the lightning network?

Lightning is an overlay network built on top of an existing blockchain protocol. Similar to how the Internet is built in layers. Lightning creates an entirely new layer, offering instant, high-volume payments that are denominated in the blockchain’s native currency.

How does it work?

The idea behind the LN is that not all transactions are required to be recorded on the Blockchain and because of that it should increase the speed of those that are, and decrease fees because there is less direct traffic on the blockchain.

Step 1: Funding

Let’s consider a case where two parties, Xan and Yelena, plan to conduct a lot of trades with each other. Rather than making numerous payments over the blockchain, they decide to save fees and time by setting up a payment channel.
Traditionally, as they’re making Bitcoin payments back and forth, each transaction would be settled on the blockchain. With the introduction of Lightning Network, they could utilize a bidirectional (two-way) payment channel. Let’s say that Xan and Yelena wish to establish a channel with a total value of 2 BTC. In other words, they don’t think that the overall transactions they’ll conduct will surpass a total of 2 BTC. So both people send an amount of 1 BTC over the blockchain to a multi-signature wallet.

This is a bitcoin address which is controlled collectively by two or more people. The funds can be released from the address only when the agreed number of signatures is reached. In this case, both signatures (derived from the private keys of both Xan and Yelena) are required to spend any BTC from this address. A total of 2 BTC is now locked up in this special multisig address, and the funding process is complete.

Step 2: Transactions

Alright, now Xan and Yelena can send money back and forth thousands of times, with almost instant effect without adding a single transaction to the Bitcoin blockchain. (Of course this is also depending only on how fast we can communicate with each other, as in approving these transactions). The only stipulation is they can not exceed the amount the channel is funded, which is 2 btc. These channel transactions aren’t recorded on the Bitcoin blockchain, though—instead, the changes are recorded in a micro-ledger shared between Xan and Yelena.

For as long as the channel is open, the transactions between Xan and Yelena are instant, since they don't have to wait to be included in a block of Bitcoin data. Creating a new payment channel for every transaction would be just as wasteful as requiring the blockchain to compute every little message. This is where the Lightning Network gets the “network” part of its name. Payment channels are linked together, and new transactions can be routed through existing payment channels instead of creating a new one every time.

Not only are Xan and Yelena's transactions happening in their payment channel but other people’s transactions as well. This isn't free though: routing a Lightning Network transaction incurs a fee paid to the channel owners, but it's predicted to be extremely small. The end result is a network of payment channels that can process potentially huge amounts of Bitcoin transactions without needlessly stressing the blockchain. If the Lightning Network becomes large enough, the effect could be less congestion on the Bitcoin blockchain and lower fees. Many (or even most) Bitcoin transactions would be happening on the Lightning Network, and only finalized on the blockchain.

Step 4 Consensual channel closing

One individual in the channel can request the other to consensually close a channel. When they agree, they create a final payout transaction together that doesn't lock any funds and allows immediate spending after confirmation. Many transactions may have taken place between Xan and Yelena in the time the channel was open, but the Bitcoin blockchain only records two: the creation of the payment channel, and its closing. If Xan is closing the channel with Yelena but need to open a new one with Zeke, he can use his existing balance, if there is any, from his channel with Yelena to fund the new one with Zeke.

Trade-offs

You cannot receive more money through Lightning in one transaction than the sum of your payment channels' values. Your transactions don't get stored on the blockchain for eternity, which gives you better payment privacy. But on the other hand you keep using the same address allowing users that know who the address belongs to to monitor your balance (less personal privacy).

Instant transactions!

But your money is locked up in a payment channel, which you first need to execute on the blockchain if you want to do a regular Bitcoin transaction with the money.

Less fees!

Transactions on Lightning don't require a full blockchain transaction fee, but if you route through others' payment channels, they might want something for the liquidity they provide to you. However, as other Lightning nodes are competing to transfer your payment for you, this is likely to be much lower than a full transaction fee on the blockchain. The reserve amount needs to be set aside and can’t be used until the channel is settled.

Due to the high cost of creating channels with each person you tend to transact with, centralized settlement hubs are inevitable. This will recreate the bank model on the blockchain. There are even theories that Blockstream purposely didn’t solve scaling issue to create a problem that would need Lightning Network as a solution so that they can setup hubs and collect fees.

Can I use it?!

Not quite. On march 15th 2018 Lightning Lab announced their 0.4 release of the beta. Note that this release is intended for developers of future Lightning applications (Lapps) along with technical users and prospective routing node operators. You can run a wallet on the testnet if you’d like to use testnet coins for fun, but as of right now it’s not fully launched.

My thoughts on the topic:

It's definitely an interesting resolution to an issue that’s caused bitcoin a lot of grief. That being said there's still a lot of kinks to be worked out and I'm curious if adoption will catch on, or if people will continue to use other cryptos which are extremely fast like Nano. I suppose only time will tell. If you're interested in watching my video about it, you can check it out here:

Sources

http://bit.ly/2lyNY1H
http://bit.ly/2K8Qbj3
http://bit.ly/2tGfqya
http://bit.ly/2lDTbVX
http://bit.ly/2KmrX17
http://bit.ly/2tuB9tB
https://en.wikipedia.org/wiki/Lightning_Network


|


My cold wallet
Sign up with Coinbase

DISCLAIMER:

The information provided is not to be considered as a recommendation to buy or invest in certain assets or currencies and is provided solely as an educational and information resource to help traders make their own decisions. Past performance is no guarantee of future success.
It is important to note that no system or methodology has ever been developed that can guarantee profits or ensure freedom from losses. No representation or implication is being made that using the attached material will guarantee profits or ensures freedom from losses.
CryptoCandor shall not be liable to the participant for any damages, claims, expenses or losses of any kind (whether direct or indirect) suffered by the participant arising from or in connection with the information obtained this website or directly from the website owner.

Sort:  

cryptocandor , What is the effect of lightning network on Bitcoin Price?

There shouldn't be a direct effect to price.. just the cost of using bitcoin itself.

Congratulations @cryptocandor! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of posts published

Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word STOP

To support your work, I also upvoted your post!

Do not miss the last post from @steemitboard!


Participate in the SteemitBoard World Cup Contest!
Collect World Cup badges and win free SBD
Support the Gold Sponsors of the contest: @good-karma and @lukestokes


Do you like SteemitBoard's project? Then Vote for its witness and get one more award!

Coin Marketplace

STEEM 0.20
TRX 0.15
JST 0.030
BTC 65531.60
ETH 2644.26
USDT 1.00
SBD 2.81