27 upvotes, 4 direct replies (showing 4)
View submission: ⚡ Lightning Network Megathread ⚡
Do you have any resources that explain how multi-hop HTLCs work? I just about understand the bi-party case, but I don't see how it can work when you need to hop via an intermediary.
Specifically:
Comment by imatwork2017 at 12/01/2018 at 16:40 UTC
8 upvotes, 0 direct replies
There is no atomicity, it is broken down to one step per channel. Check out this[1] presentation for details on how it works.
1: https://www.youtube.com/watch?v=8zVzw912wPo
Comment by RustyReddit at 14/01/2018 at 11:23 UTC
3 upvotes, 1 direct replies
How do you ensure atomicity - that either the value is transfered A->B->C or not at all.
Economics. In order to get the payment from A, B has to pay C. When C collects the payment, it necessarily provides the info B needs to do that.
How do you prevent intermediaries learning information about the payment - in particular the source, the target and the amount.
They know the amount, but the information itself is encrypted in hops. It knows where it came from, and decrypts to find out where it's going, but that's it (plus some magic so the length is padded no to change).
Is it possible for a malicious intermediary to agree to participate in a transaction and then keep the funds. Or conversely could a malicious end point claim that an intermediary was not co-operating when in fact they were?
They can always go down in the middle of a payment and then you have to wait for the blockchain timeouts to get your money unstuck. But they can't keep the funds, no.
Are there DDOS vectors whereby intermediaries say they are willing to participate in multi-hop transactions and then subsequently refuse to do so?
They can slow things down, to the limit of the payment timeout, but if they don't succeed or fail with time to spare, the node adjacent to them will close the channel.
It's possible to disincentivize this further, but it's subtle and didn't make the 1.0 spec...
Hope that helps!
Comment by codedaway at 12/01/2018 at 21:10 UTC
5 upvotes, 0 direct replies
These are very good deep level questions, I recommend posting them on Bitcoin Stack Exchange[1] to get some highly detailed answers.
1: https://bitcoin.stackexchange.com/questions/tagged/lightning-network?mixed=1
Comment by asoka_maurya at 13/01/2018 at 11:39 UTC
1 upvotes, 0 direct replies
Still a bitcoin learner, but here is what I think:
How do you prevent intermediaries learning information about the payment - in particular the source, the target and the amount.
This is similar in design to the Tor network. Like Tor intermediary nodes know about the ip addresses, the LN nodes will know about btc addresses and/or transaction information. But that alone shouldn't be a problem as long as the people behind the btc addresses are anonymous and behind a proxy/VPN, right?
Is it possible for a malicious intermediary to agree to participate in a transaction and then keep the funds. Or conversely could a malicious end point claim that an intermediary was not co-operating when in fact they were?
I guess the "both end-points agree on a reserve value" he describes should take care of it:
Upon opening a channel, the two endpoints first agree on a reserve value, below which the channel balance may not drop. This is to make sure that both endpoints always have some skin in the game as /u/rustyreddit puts it :-)