Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: adamstgBit on March 28, 2016, 03:17:00 PM



Title: understanding the second layer
Post by: adamstgBit on March 28, 2016, 03:17:00 PM
how will the second layer prevent double spending?

what's stopping me from opening 2 payment channels using the same BTCs?


Title: Re: understanding the second layer
Post by: achow101 on March 28, 2016, 08:28:30 PM
What do you mean "second layer"? Are you talking about the lightning network or something else?


Title: Re: understanding the second layer
Post by: pawel7777 on March 28, 2016, 09:21:08 PM
how will the second layer prevent double spending?

what's stopping me from opening 2 payment channels using the same BTCs?

If you're talking about LN, you need to perform normal on-chain transaction to open the channel (funding transaction). And then another one to close it.


Title: Re: understanding the second layer
Post by: adamstgBit on March 29, 2016, 01:07:41 AM
lol 2 TX fees for the price of 1  8)


Title: Re: understanding the second layer
Post by: achow101 on March 29, 2016, 01:32:13 AM
lol 2 TX fees for the price of 1  8)
No. You use (or should use) payment channels for multiple payments to the same entity. So instead of paying the fees for, say, 10 transactions, you only need to pay the fees for 2.

Edit: If you are asking about the Lightning Network, I highly suggest that you read the whitepaper: https://lightning.network/lightning-network-paper.pdf. It goes in depth into how it is all supposed to work and how it prevents people from committing fraud.


Title: Re: understanding the second layer
Post by: AgentofCoin on March 29, 2016, 01:33:45 AM
how will the second layer prevent double spending?

what's stopping me from opening 2 payment channels using the same BTCs?

My understanding, which may be incorrect, is that when btc is placed into the "channel",
it is locked until certain criteria is met. So since it is locked, it can not be used to "double-spend".

Lightning Network is basically an escrow system that provides for faster confirmations
times and more transactions per second than what Bitcoin/bitcoin can allow for.


Title: Re: understanding the second layer
Post by: adamstgBit on March 29, 2016, 05:35:39 AM
lol 2 TX fees for the price of 1  8)
No. You use (or should use) payment channels for multiple payments to the same entity. So instead of paying the fees for, say, 10 transactions, you only need to pay the fees for 2.

Edit: If you are asking about the Lightning Network, I highly suggest that you read the whitepaper: https://lightning.network/lightning-network-paper.pdf. It goes in depth into how it is all supposed to work and how it prevents people from committing fraud.
yes i am talking about LN.

let's say I want to pay Alice  0.1BTC for a service she frequently renders ( weekly )
will LN be useful to  us?
of course Alice needs to be able to spend the funds i give her weekly...
so my question is, when the channel is opened and a 0.1BTC signed and handed off, will Alice be able to use those funds or does she have to wait until the channel is closed to make use of the money i give her?

edit:
it seems possible... page 44..47 appear to talk about how this would be done, sounds kinda nuts, and i dont know how reliable/practical this would be in a long chain of  Lighting "payments".

its going to be very interesting to try and use this Lighting Network when it is made available to end users.


Title: Re: understanding the second layer
Post by: pawel7777 on March 29, 2016, 09:34:42 AM
lol 2 TX fees for the price of 1  8)
No. You use (or should use) payment channels for multiple payments to the same entity. So instead of paying the fees for, say, 10 transactions, you only need to pay the fees for 2.


Yup. Except those 10 channel txs are not going to be free (although must be cheaper than on-chain ones).

So in conclusion, LN is useless for any non-recurring (or not very frequent) transactions. And the 'fee market' will have to be kept under control (central planning?) either directly by devs or by implementing some sort of flexible max block size, in order to make on-chain txs high enough to provide sufficient reward for miners (and push people toward 2nd layer solutions) but low enough to make opening/closing channels and perform non-recurring txs affordable.




Title: Re: understanding the second layer
Post by: achow101 on March 29, 2016, 12:44:01 PM
yes i am talking about LN.

let's say I want to pay Alice  0.1BTC for a service she frequently renders ( weekly )
will LN be useful to  us?
of course Alice needs to be able to spend the funds i give her weekly...
so my question is, when the channel is opened and a 0.1BTC signed and handed off, will Alice be able to use those funds or does she have to wait until the channel is closed to make use of the money i give her?
Unless the payment to another person can be routed through you (by being a hop), I think that Alice would need to close the channel in order to pay someone else.

Yup. Except those 10 channel txs are not going to be free (although must be cheaper than on-chain ones).
Nope. Transactions between two people that happen in a channel (meaning it doesn't go through hops) won't have any extra fees. The fees only come in if you have to have the payment hop through other nodes.

So in conclusion, LN is useless for any non-recurring (or not very frequent) transactions.
Yes. That's the point. It removes the recurring micro transactions like faucet payouts from the blockchain.


And the 'fee market' will have to be kept under control (central planning?) either directly by devs or by implementing some sort of flexible max block size, in order to make on-chain txs high enough to provide sufficient reward for miners (and push people toward 2nd layer solutions) but low enough to make opening/closing channels and perform non-recurring txs affordable.
Not necessarily. There will be plenty of transactions happening on chain because they are not recurring payments. Opening and closing channels also has to pay fees.


Title: Re: understanding the second layer
Post by: pawel7777 on March 29, 2016, 02:16:03 PM
Nope. Transactions between two people that happen in a channel (meaning it doesn't go through hops) won't have any extra fees. The fees only come in if you have to have the payment hop through other nodes.

If so, I stand corrected.

So in conclusion, LN is useless for any non-recurring (or not very frequent) transactions.
Yes. That's the point. It removes the recurring micro transactions like faucet payouts from the blockchain.

I'm not aware of any faucet that still does direct on-chain payouts. I think all of them expect users to accumulate larger amounts before being even able to withdraw.

It also removes most of other non-recurring payments. Why would you penalise yourself with significant fee just to pay with bitcoins if you could use cheaper or free fiat payments? Even if merchant offers you few % off for BTC (which they may not be able to do if fees are too high), paying few bucks in fees for $10-50 purchase wouldn't make much sense.

And the 'fee market' will have to be kept under control (central planning?) either directly by devs or by implementing some sort of flexible max block size, in order to make on-chain txs high enough to provide sufficient reward for miners (and push people toward 2nd layer solutions) but low enough to make opening/closing channels and perform non-recurring txs affordable.
Not necessarily. There will be plenty of transactions happening on chain because they are not recurring payments. Opening and closing channels also has to pay fees.

You're missing a point. It's not just about having 'plenty' of on-chain txs, but about the right balance (if such thing can exist at all). Highlighted above.




Title: Re: understanding the second layer
Post by: Cryptorials on April 02, 2016, 10:23:39 AM
Has anybody done any kind of analysis of what percentage of transactions are the type of recurring transaction which could use Lightning Network?


Title: Re: understanding the second layer
Post by: gmaxwell on April 03, 2016, 08:42:45 AM
Has anybody done any kind of analysis of what percentage of transactions are the type of recurring transaction which could use Lightning Network?
"100%" of them. The above posts are confusing old single party unidirectional payment channels; more powerful designs have been known for something like 5 years, the most sophisticated with are the bidirectional payment mesh systems we call lightning today. No reoccurring usage is required to make use of them, though they're super efficient for that case.

John Ratcliff wrote a nice informal discussion about what bidirectional payment channel networks are:  https://letstalkbitcoin.com/blog/post/the-lightning-network-elidhdicacs



Title: Re: understanding the second layer
Post by: Cryptorials on April 03, 2016, 08:56:51 AM
Has anybody done any kind of analysis of what percentage of transactions are the type of recurring transaction which could use Lightning Network?
"100%" of them. The above posts are confusing old single party unidirectional payment channels; more powerful designs have been known for something like 5 years, the most sophisticated with are the bidirectional payment mesh systems we call lightning today. No reoccurring usage is required to make use of them, though they're super efficient for that case.

John Ratcliff wrote a nice informal discussion about what bidirectional payment channel networks are:  https://letstalkbitcoin.com/blog/post/the-lightning-network-elidhdicacs



Ah I see. I wondered how I'd managed to miss seeing anything about such a striking limitation. Thanks for the link.


Title: Re: understanding the second layer
Post by: Maxim_Smirnov on April 03, 2016, 12:03:49 PM
How to perform a normal chain, to open a channel??????