My swap is stuck, what now?

Problem

  • Swap is stuck and showing pending for more than 4 hours.
  • I didn't receive my Alice payment back.
  • I didn't receive Bob payment.


Solution

Don't panic! The atomic swap process can be interrupted if the connection between buyer and seller is broken for long enough to time out. If this happens, funds are safe and will be returned to their source, with the possible exception of the buyer's DEX fee, depending on which step the atomic swap process timed out. The DEX fee is 1/777th of the trade value, which is less than 0.15%


Wait for minimum 4 hours after your swap is stuck. Then, follow the steps below:

  1. Stop HyperDEX
  2. Start HyperDEX
  3. Login using the same passphrase
  4. Check transactions for your account address at a block explorer. A list of Komodo Asset Chain block explorers is available at https://www.atomicexplorer.com/#/explorers


If your funds (minus the DEX fee) have not returned after 4 hours, continue to the steps below.

  • First, get the ID/UUID of the stuck swap. To do this, log in to HyperDEX, and click on the stuck trade.


  • Click on More to expand the information box


  • Your trade ID will be revealed


Using Debug Console

You can use the ID in the debug console with the following command


_swapDB._getSwapData('191879c6d079f4dfbe029f990df416aa66bebd925879e30d3a4dfbf0b54c8259').then(data => data.messages.reduce((ids, msg) => {ids.requestid = msg.requestid || ids.requestid;ids.quoteid = msg.quoteid || ids.quoteid;return ids;}, {})).then(ids => {console.log(ids);_api.debug({method: 'kickstart', ...ids});});

We've used 191879c6d079f4dfbe029f990df416aa66bebd925879e30d3a4dfbf0b54c8259 as an example ID


After a few minutes, your funds should be returned.


Using Command Line Interface (CLI)

Open the stats.log file, found at the following locations depending on your operating system:

Linux: ~/.config/HyperDEX/marketmaker
macOS: ~/Library/Application Support/HyperDEX/marketmaker
Windows: %appdata%\HyperDEX\marketmaker


Find a line where your ID matches with a UUID in the stats.log file, and then find it's corresponding requestid and quoteid. It will look like this:


{
  "gui": "nogui",
  "uuid": "191879c6d079f4dfbe029f990df416aa66bebd925879e30d3a4dfbf0b54c8259",
  "maxprice": 0.0001051,
  "gtc": 1,
  "aliceid": "13221378637459488768",
  "tradeid": 1861464633,
  "base": "PIZZA",
  "etomicsrc": "",
  "rel": "BEER",
  "etomicdest": "",
  "address": "RLo36Q2fk8yTu5cuM9RPWP4mGfV9EtY4jm",
  "timestamp": 1548579714,
  "txid": "38f9417f756e007c4fc325dff7efa84bfc33f1a1483d1d8dc868c9bd95614f5b",
  "vout": 0,
  "srchash": "de11e069deeb47eef4d5ec203a197320adc3c9c91b0fce21be442bd781ec8238",
  "txfee": "1000",
  "quotetime": 1548579720,
  "satoshis": "971442464462",
  "desthash": "364f02563feb95fb4b006e2e9b5b23d2df016f2222e2265c2905d725558a5472",
  "txid2": "b2049362bc0c5f05abd838798170cf6624513a64b61274ee8b77a1755887ebcf",
  "vout2": 0,
  "destaddr": "RFUDVVuF5zhxC6NPTBWweyRkSwtC3Ldtra",
  "desttxid": "7bb79cd8201d507f47eef57ff5eb076c15e94bec348bacb03ded6135305e58ac",
  "destvout": 0,
  "feetxid": "b626d2c541fa7e78cb5ecfdf15d7b785ec69a7a50684a66c6ccc38e6b75060ac",
  "feevout": 0,
  "desttxfee": "1000",
  "destsatoshis": "100010000",
  "price": 0.00010295,
  "requestid": 2238874496,
  "quoteid": 1535913169,
  "pending": 1548579804,
  "method2": "reserved",
  "method": "reserved"
}


Hint: You can use a JSON pretty print formatter to read it more easily


Now we can send the swapstatus command via cURL to unstuck the trade:

curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"ENTER_YOUR_RPC_PASSWORD_HERE\",\"method\":\"swapstatus\",\"requestid\":2238874496,\"quoteid\":1535913169}"


After 10 minutes or so, your funds should be returned.


Verify Funds Have Returned

Check your address on the explorer for the coins. List of Komodo and Assetchain Explorers.


Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.