comit-network / xmr-btc-swap

Bitcoin–Monero Cross-chain Atomic Swap
GNU General Public License v3.0
657 stars 84 forks source link

BTC lost, while XMR never got locked (OutputBelowDustLimit) #976

Closed iodraft closed 2 years ago

iodraft commented 2 years ago

Describe the bug Initiated a swap to xmr for 0.001 btc (~40 usd) 8 hours ago, but still I have the status "Waiting for Alice to lock Monero". It seems that the btc have (maliciously?) been moved away from the multisig wallet. According to this comment, the refund functionality of the swap must be used before 72 blocks (12 hours) have been reached. However, block confirmation is already at 45 blocks, and the refund functionality does not work. ./swap withdraw-btc --address bc1q.. image

If I abort the connection and resume the swap, It's just stuck at this. .\swap resume --swap-id 59bbef94-e08c-47ec-9ffd-b77e8be345fb image

Im afraid that I may lose my btc funds (without getting any xmr) in this way, where the swap was canceled due to Alice using too much time to lock xmr.

I have also followed this guide, but this time those tips were not enough.

It also seems it could take up to three days before the protocol returns the funds by itself (hopefully), so I'll keep the swap alive and hope that I get my funds back.

Lost/trapped Funds Yes.

Debug logs swap-59bbef94-e08c-47ec-9ffd-b77e8be345fb.log

Platform (please complete the following information):

Other If it's of relevance, this is how the trade looked like when it started. Last time when I did a successful swap, it didn't have all of these "artifacts" (ie. "[3mdeposit_address←[0m←[2m=←[0mbc1qahkky3k2k2ajgfwsl59vjln025whuvhc8szpaz") in the console window. But I was still able to copy the bitcoin address and transfer to it. image

Powershell script that was used, see below (have only obfuscated change-address).

mkdir -f ~/swaptool; cd ~/swaptool;
If(!(test-path .\swap.exe) -or !((Get-FileHash .\swap.exe).Hash -eq "0e5d81416626cdedc0965e65bf4a3d43119ebeab5ee19776fdcf1ab03aa9efc3")) {
  [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls, [Net.SecurityProtocolType]::Tls11, [Net.SecurityProtocolType]::Tls12, [Net.SecurityProtocolType]::Ssl3
  [Net.ServicePointManager]::SecurityProtocol = "Tls, Tls11, Tls12, Ssl3"
  Write-Host "Downloading the latest version of the swap tool...";
  Invoke-WebRequest -Uri https://github.com/comit-network/xmr-btc-swap/releases/download/0.10.2/swap_0.10.2_Windows_x86_64.zip -OutFile ./swap.zip;
  Expand-Archive ./swap.zip -DestinationPath ./ -Force;
}
clear; Write-Host "Starting swap. This can take some time...";
./swap  buy-xmr --receive-address 84HUGkVcrds1P3CJrdyHQETARJSo4sFKwYckG9TWRe1Wi5en3MCfRoXVedPNX7McqQ9uDUvycSyxKSjfNrrXQGJh261MHfY --seller /ip4/45.138.50.29/tcp/9939/p2p/12D3KooWMgGjeW7ErQxCQzaeHiXxJn42wegCPFepixEXfBJT1PNS --change-address bc1q..
iodraft commented 2 years ago

Update. It seems that the issue solved itself. After the 72 block mark, then I saw this. Since Alice took to long to lock Monero, the swap was canceled and the protocol automatically refunded my btc back to me. Value is a little lower due to the lost fees, but it's better than losing all of it. image

Hence, this issue can be closed / set as resolved.