Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed swap after Alice payment #536

Closed
jdmarlow86 opened this issue Sep 27, 2018 · 5 comments
Closed

Failed swap after Alice payment #536

jdmarlow86 opened this issue Sep 27, 2018 · 5 comments

Comments

@jdmarlow86
Copy link

I created a failed swap after 3/5 Alice payment causing lost of funds.

Version: 0.1.3
OS: Win 10
Errors: below
Severity: High

image

@sindresorhus
Copy link
Contributor

According to https://docs.komodoplatform.com/barterDEX/MarketmakerErrors.html, error -1007 means:

"error waiting for bobpayment” - Swap failed at 4/7. Bob failed to send bobpayment.

The funds are most likely not lost. You just need to wait until the timelock expires.

From internal notes by @lukechilds:

there are three possible outcomes:

  • if you quit after bobpayment has been sent but before you claim it and you weren’t offline for long you should claim bobpayment with an alicespend tx. This is a normal atomic swap and has recovered as if you were never offline
  • If Bob never sends bobpayment you will need to wait for the 2 hour timelock to expire on bobdeposit then you should claim that with an aliceclaim tx. This gives you a 12.5% bonus at Bobs expense to punish him for not sending bobpayment
  • If Bob never sends any payment but you already sent alicepayment, you need to wait 4 hours for the alicepayment timelock to expire. The you should be able to reclaim your funds with an alicereclaim tx. You don’t get the funds you wanted and you lose the dexfee but you get your original funds back (edited)
    so every scenario should result in you either getting the funds you wanted, getting the funds you wanted + 12.5%, or reclaiming your original funds
    you don’t need to do anything to claim, it checks in a loop on the background once an hour. mm is supposed to do this automatically, but I’ve never actually seen this work so I’ve reimplemented it in the GUI. (edited)
    so obvs due to timing, if the timelock is 2 hours it could be up to ~3 hours before it’s automatically reclaimed because we only check once an hour
    but it checks straight away on startup, so if the swap can be resumed as soon as you open the app it will be

@jdmarlow86
Copy link
Author

jdmarlow86 commented Sep 29, 2018

Left open for approx 4 hrs yesterday and 6 today. In the Trade history the swap remains in the same state. Screenshot below (coins haven't returned)

image

@lukechilds
Copy link
Member

@jdmarlow86 Sorry about this, I know it's frustrating, good news is your funds are almost definitely not lost. marketmaker should have all the keys necessary to unlock the funds, either the alicepayment or bobdeposit tx, depending on where the swap failed.

However, for whatever reason, markermaker isn't automatically reclaiming these funds like it's supposed to. We had a lot of trouble with this before so now we even kickstart these swaps on startup and then again once every hour to try and force marketmaker to notice them but it seems like it's just not seeing yours. marketmakershould still have a copy of the keys required to do so, so you are still technically in full custody of the funds and they are not lost, they're just not easily at your disposal right now.


Unfortunately this is a bug with marketmaker, unrelated to HyperDEX, there's not much we can do to assist you with this. You may need to manually contact @jl777 and he can talk you through how to access the marketmaker DB files, access the keys and manually claim the "stuck" funds. He's done this with me successfully before.

Slight silver lining, if this trade did fail due to Bob not sending bobpayment, that means you get to claim bobdeposit which means you get an extra 12.5% KMD to punish Bob for not sending the payment.

@jl777 are you able to assist @jdmarlow86 in claiming his stuck funds or cc someone here who can help him?

@lukechilds
Copy link
Member

@jdmarlow86 did you get this resolved?

@jorian
Copy link

jorian commented Feb 26, 2020

mm1.0 related

@jorian jorian closed this as completed Feb 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants