muun / falcon

Muun iOS wallet
https://muun.com
MIT License
195 stars 31 forks source link

lightning double spend #14

Closed igorkost-ibm closed 2 years ago

igorkost-ibm commented 2 years ago

Muun wallet app v2.4.1 on iPhone 12 mini iOS 15.1 (turbo channels off).

Successfully received transaction from bluewallet lightning wallet which was reported as failed on the sender's side. 19400 sats arrived to muun wallet without leaving the bluewallet.

Payment hash: cbf4213fa35896c5ad4ab373605abd6445d7c259e67fb75a434ef8e080325951
Payment preimage: Ofaa676fd8fbe34c6cdbc9bddd64438fb2d70493f6c78f1ea390c5636aea35c2

The scenario and analysis by bluewallet team is fully described in: https://github.com/BlueWallet/BlueWallet/issues/4195

champo commented 2 years ago

Hi! Thanks for reporting this! We'll look into it ASAP.

igorkost-ibm commented 2 years ago

I will be happy to return the 19400 sats to the missing side once the problem is found and resolved.

champo commented 2 years ago

We've found and fixed the issue. Thanks a lot for the report!

We had some issues with our node when your payment was pending. As a result, both halfs of the payment were dissociated. The incoming part (from Blue) and the outgoing part (to Muun). Due to that, our node decided to fail the incoming payment but the happily accepted the preimage for the outgoing part. Luckily it was easy to fix so it won't happen again.

igorkost-ibm commented 2 years ago

Thanks for fixing this! Is it a common issue in Lightning network? Who lost the money in this case? Where can I return those 19400 sats?

champo commented 2 years ago

Is it a common issue in Lightning network?

It shouldn't be. We run an LND as a routing node, but we have quite a few patches on top of it and one of them introduced this issue.

Who lost the money in this case?

Our routing node did.

Where can I return those 19400 sats?

No need! If you'd like to give back, you can donate them to the Human Rights Foundation dev fund.