7

If multiple Lightning nodes attempt to pay the same invoice (using the same payment request), is it absolutely necessary that no more than one of the attempts will succeed (that is, only one payer will learn the preimage)?

I'd expect that clients try to not make multiple payments happen. What I'm willing to learn is whether it's actually impossible by protocol design.

1 Answer 1

5

As far as I know It can and did happen.

On a protocol level, 2 separate nodes (or the same node) can construct two different (or the same) onions and initiate the routing process.

On a protocol level I am not aware of any mechanics to prevent two htlcs on the same channel with the same payment hash, and on different channels, this is obviously not encoded to the protocol. In particular, while there might be a rule that the recipient SHOULD NOT release the preimage more than once, I don't see any way to detect or prevent such a behavior without drastic protocol changes.

The situation becomes worse once we implement base AMP in which a recipient node expects several htlcs anyway and overpayment is also part of the expected protocol behavior.

A little off topic: AMP also allows a denial of service attack vector by just denying the second onion with the same payment hash to be forwarded.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.