<p>The reason why preimages must not be reused, is because it allows anyone along the routing path that has previously already seen (and stored) the preimage to claim those funds without forwarding the payment to the intended destination. See also <a href="https://bitcoin.stackexchange.com/questions/96352/reuse-of-payment-hash-in-lightning-network">Reuse of payment hash in Lightning Network</a></p>
<blockquote>
<p>How would the receiver be able to distinguish between those two payments?</p>
</blockquote>
<p>I'm not sure about how the Lightning Node implementations handle this in practice, but in theory, they don't need to. Anytime your node receives an HTLC for which you know the preimage of the hash (either because you generated the preimage, or because the sender included the preimage in the HTLC as per the keysend spec), you can claim the funds committed to by that HTLC.</p>
<p>See also <a href="https://bitcoin.stackexchange.com/questions/83600/how-do-sphinx-invoice-less-payments-on-the-lightning-network-work/83602#83602">How do &#39;Sphinx&#39; invoice-less payments on the Lightning Network work?</a></p>

CC BY-SA 4.0
2023-02-10T12:30:51.067Z
2023-02-10T12:30:51.067Z
stickies-v
<p>The <a href="https://github.com/lightning/blips/blob/6e5493832e92c78ddde2959bbe70b942aab95c29/blip-0003.md" rel="nofollow noreferrer">blip-0003</a> specifies that a sender may only use a preimage once, but what would happen if the sender sends the same preimage twice or 2 senders send the same preimage?</p>
<p>How would the receiver be able to distinguish between those two payments?</p>

<lightning-network><ln-keysend-payments>
How do lightning node implementations handle receiving 2 keysend payments with the same preimage?
Alwin
# How do lightning node implementations handle receiving 2 keysend payments with the same preimage?

(Asked by: username_0 on 2023-02-10)

The [blip-0003](https://github.com/lightning/blips/blob/6e5493832e92c78ddde2959bbe70b942aab95c29/blip-0003.md) specifies that a sender may only use a preimage once, but what would happen if the sender sends the same preimage twice or 2 senders send the same preimage?

How would the receiver be able to distinguish between those two payments?

**Tags:** lightning-network, ln-keysend-payments


---

## 1 answers

### Answer by username_1 on 2023-02-10. Score: 1

The reason why preimages must not be reused, is because it allows anyone along the routing path that has previously already seen (and stored) the preimage to claim those funds without forwarding the payment to the intended destination. See also [Reuse of payment hash in Lightning Network](https://bitcoin.stackexchange.com/questions/96352/reuse-of-payment-hash-in-lightning-network)

> How would the receiver be able to distinguish between those two payments?

I'm not sure about how the Lightning Node implementations handle this in practice, but in theory, they don't need to. Anytime your node receives an HTLC for which you know the preimage of the hash (either because you generated the preimage, or because the sender included the preimage in the HTLC as per the keysend spec), you can claim the funds committed to by that HTLC.

See also [How do 'Sphinx' invoice-less payments on the Lightning Network work?](https://bitcoin.stackexchange.com/questions/83600/how-do-sphinx-invoice-less-payments-on-the-lightning-network-work/83602#83602)


---

