Author

Topic: What is the Lightning Network? (Read 245 times)

legendary
Activity: 2604
Merit: 2353
April 20, 2019, 10:57:39 PM
#5
Quote
What is the Lightning Network?

The Lightning Network is a "second layer" payment protocol that operates on top of a blockchain (most commonly Bitcoin). It enables instant transactions between participating nodes and has been touted as a solution to the bitcoin scalability problem. It features a peer-to-peer system for making micropayments of digital cryptocurrency through a network of bidirectional payment channels without delegating custody of funds and minimizing trust of third parties.

Normal use of the Lightning Network consists of opening a payment channel by committing a funding transaction to the relevant blockchain, followed by making any number of Lightning transactions that update the tentative distribution of the channel's funds without broadcasting to the blockchain, followed by closing the payment channel by broadcasting the final version of the transaction to distribute the channel's funds.

The Lightning network was originally created by Joseph Poon and Thaddeus Dryja

How the Lightning Network Works

To perform fast and cheap transactions, following steps must be followed:

* A multi-signature wallet which holds some amount of bitcoin (provided by at least one of both parties) is set up
* The wallet address is then saved to the public Bitcoin blockchain including a balance sheet (smart contract) that proves how much of this bitcoin deposits belongs to whom
* After this payment channel is set up once, it is possible for these two parties to conduct an unlimited amount of transactions without ever touching the information stored on the blockchain
* With each transaction, both parties sign an updated balance sheet in order to always reflect how much of the bitcoin stored in the multi-sig wallet belongs to whom
* The updated balance sheet is not uploaded to the blockchain but rather both parties keep a copy of it
* Whenever there is a dispute or the payment channel is closed, both parties can use the most recent mutually signed balance sheet to pay out their share of the multi-sig wallet

Log-in into the Lightning network is performed through the opening of the payment channel. This requires a transaction in the blockroom (the one in which transactions are always written). The payment channel allows you to send bitcoins between two parties (this is not a new development). LN can be compared with a crypto exchange - on the exchange you deposit some amount of money and can transfer to another account within the system without commissions. Commission fees are for depositing money only on the exchange. Similarly, for Lightning - to open or close the payment channel, you need to perform a bitcoin transaction.

Hash contracts for temporary blocking (HTLC) are the smart contracts that ensure that the recipient is remitted when certain cryptographic conditions are met. This is done for safety.

The Lightning network uses a series of HTLC with the same secret hash. This process can be repeated as many times as necessary.

Limitations
The Lightning Network is made up of bi-directional payment channels between two nodes which combined create smart contracts. If at anytime either party drops the channel, the channel will close and be settled on the blockchain. Also, due to the burdensome nature of the Lightning Network's dispute mechanism which requires all users to watch their full nodes constantly for fraud, a new concept has been introduced called "watchtowers" where trust is outsourced to watchtower nodes to monitor their channel payments for fraud

Example:

We assume that Mickey Mouse constantly buys from Goofy coconuts. This is how it look like in a blockchain of bitcoins:



Here, each transaction will occur in one of the blocks, each transaction price is $ 5 and we must wait each time this transaction is confirmed.
For 9 batches of coconuts I will have to pay $ 45 and Goofy will pay for 8 only 40 $ - if we take into account that we bought rather large pieces, this commission will not be very noticeable, but if we bought less or the bitcoin rate would be low, then the transaction could would get away more than was our order Lightning Network.

Same situations using Lightning Network:



Participants are all the same Donald, Mickey Mouse, Goofy.
And Donald and Mickey open by payment channel with Goofy and we throw there on 8 and 9 BTC respectively - for the opening of the channel we are taken 5 $ and the information is transferred to the blockchain.
The channel is opened for a certain period, say for a week, and all operations made in it are fixed in Lightning Network and not transferred to the blockchain.
Mickey spent his balance completely and Lightning Network closed the channel - writing in the blockade information that all 9 bits of ears to Goofy and Mickey stayed with the goods and without money.
After the numerous purchases Mickey doubted the quality of the goods and decided to take the rest of the money and sent to Lightning Network a request - after which the payment channel was torn and the unspent money returned to it.

If during these operations Mickey or Donald would like to buy something from each other then this would not require the creation of a new payment channel and, accordingly, commission fees in the block.
In this case, our intermediary would be Goofy.

Let's say Donald want to buy from Mickey 6-pac of beer which costs about 0.004 BTC (~$ 40) - this money is reserved by the Goofy. In our Goofy payment channel, I have a payment obligation in 0.004 BTC and in the channel between "Mickey and Goofy" Mickey receives this money. In the case of the block, the commission would be 25% of the amount and in Lightning Network it will be almost zero.

p.s. I'm not the original author of the text, but drawings are mine ))
Sources:
https://bitcointalksearch.org/topic/lighting-networkfaq-3080181
https://forklog.com/tag/lightning-network/
https://en.wikipedia.org/wiki/Lightning_Network


member
Activity: 154
Merit: 11
MintDice Support
March 24, 2018, 09:36:22 AM
#4
Another simplified way of explaining this would be is if Brittany and Erick transact quite a few times among themselves, they can bypass recording the transactions on the Blockchain and carry them off the chain.
Because they won’t be touching the Blockchain often, the transactions will be happening at lightning speed.
member
Activity: 172
Merit: 10
March 24, 2018, 12:44:07 AM
#3
The lightning network will record a smart agreement on Bitcoin Network that will open a private payment channel with a peer and other colleagues. In addition to all private payment channels, it is a part, a channel for every bitcoin blockchain of peer will be open.
Peers will move on in their own private channels, but the final result of the transaction will be broadcast in Blockchain. For this reason, mining will now be processing till now compared to less transactions. According to the theory, the power network compares peer to more efficient, scale-free and low-cost transactions. The software is running the Litecoin Network trial.
legendary
Activity: 2492
Merit: 1215
March 13, 2018, 06:20:24 AM
#2
While LN network is still developing, it has already more than 1000 nods with or without channels.
legendary
Activity: 2492
Merit: 1215
March 12, 2018, 09:56:55 AM
#1
What is the Lightning Network?

The Lightning Network is a "second layer" payment protocol that operates on top of a blockchain (most commonly Bitcoin). It enables instant transactions between participating nodes and has been touted as a solution to the bitcoin scalability problem. It features a peer-to-peer system for making micropayments of digital cryptocurrency through a network of bidirectional payment channels without delegating custody of funds and minimizing trust of third parties.

Normal use of the Lightning Network consists of opening a payment channel by committing a funding transaction to the relevant blockchain, followed by making any number of Lightning transactions that update the tentative distribution of the channel's funds without broadcasting to the blockchain, followed by closing the payment channel by broadcasting the final version of the transaction to distribute the channel's funds.

The Lightning network was originally created by Joseph Poon and Thaddeus Dryja

How the Lightning Network Works

To perform fast and cheap transactions, following steps must be followed:

* A multi-signature wallet which holds some amount of bitcoin (provided by at least one of both parties) is set up
* The wallet address is then saved to the public Bitcoin blockchain including a balance sheet (smart contract) that proves how much of this bitcoin deposits belongs to whom
* After this payment channel is set up once, it is possible for these two parties to conduct an unlimited amount of transactions without ever touching the information stored on the blockchain
* With each transaction, both parties sign an updated balance sheet in order to always reflect how much of the bitcoin stored in the multi-sig wallet belongs to whom
* The updated balance sheet is not uploaded to the blockchain but rather both parties keep a copy of it
* Whenever there is a dispute or the payment channel is closed, both parties can use the most recent mutually signed balance sheet to pay out their share of the multi-sig wallet

Log-in into the Lightning network is performed through the opening of the payment channel. This requires a transaction in the blockroom (the one in which transactions are always written). The payment channel allows you to send bitcoins between two parties (this is not a new development). LN can be compared with a crypto exchange - on the exchange you deposit some amount of money and can transfer to another account within the system without commissions. Commission fees are for depositing money only on the exchange. Similarly, for Lightning - to open or close the payment channel, you need to perform a bitcoin transaction.

Hash contracts for temporary blocking (HTLC) are the smart contracts that ensure that the recipient is remitted when certain cryptographic conditions are met. This is done for safety.

The Lightning network uses a series of HTLC with the same secret hash. This process can be repeated as many times as necessary.

Limitations
The Lightning Network is made up of bi-directional payment channels between two nodes which combined create smart contracts. If at anytime either party drops the channel, the channel will close and be settled on the blockchain. Also, due to the burdensome nature of the Lightning Network's dispute mechanism which requires all users to watch their full nodes constantly for fraud, a new concept has been introduced called "watchtowers" where trust is outsourced to watchtower nodes to monitor their channel payments for fraud

Example:

We assume that Mickey Mouse constantly buys from Goofy coconuts. This is how it look like in a blockchain of bitcoins:



Here, each transaction will occur in one of the blocks, each transaction price is $ 5 and we must wait each time this transaction is confirmed.
For 9 batches of coconuts I will have to pay $ 45 and Goofy will pay for 8 only 40 $ - if we take into account that we bought rather large pieces, this commission will not be very noticeable, but if we bought less or the bitcoin rate would be low, then the transaction could would get away more than was our order Lightning Network.

Same situations using Lightning Network:



Participants are all the same Donald, Mickey Mouse, Goofy.
And Donald and Mickey open by payment channel with Goofy and we throw there on 8 and 9 BTC respectively - for the opening of the channel we are taken 5 $ and the information is transferred to the blockchain.
The channel is opened for a certain period, say for a week, and all operations made in it are fixed in Lightning Network and not transferred to the blockchain.
Mickey spent his balance completely and Lightning Network closed the channel - writing in the blockade information that all 9 bits of ears to Goofy and Mickey stayed with the goods and without money.
After the numerous purchases Mickey doubted the quality of the goods and decided to take the rest of the money and sent to Lightning Network a request - after which the payment channel was torn and the unspent money returned to it.

If during these operations Mickey or Donald would like to buy something from each other then this would not require the creation of a new payment channel and, accordingly, commission fees in the block.
In this case, our intermediary would be Goofy.

Let's say Donald want to buy from Mickey 6-pac of beer which costs about 0.004 BTC (~$ 40) - this money is reserved by the Goofy. In our Goofy payment channel, I have a payment obligation in 0.004 BTC and in the channel between "Mickey and Goofy" Mickey receives this money. In the case of the block, the commission would be 25% of the amount and in Lightning Network it will be almost zero.

p.s. I'm not the original author of the text, but drawings are mine ))
Sources:
https://bitcointalksearch.org/topic/lighting-networkfaq-3080181
https://forklog.com/tag/lightning-network/
https://en.wikipedia.org/wiki/Lightning_Network
Jump to: