Cancel, Refund, and Punish explained
Atomic Swaps offer a lot of security and privacy benefits, but they also come with some responsibilities. As long as you follow the rules of the protocol, you can be sure that you will not lose your funds.
If you want to learn more about the technical details, you can read the paper Atomic Swaps between Bitcoin and Monero by Philipp Hoenisch and Lucas Soriano del Pino (link (opens in a new tab)) or read this COMIT blog post (link (opens in a new tab)).
We have chosen to include a fairly technical explanation here. The GUI will guide you through the process and make it as easy as possible.
Be sure to click the "Resume" button of your swap, if you aren't already resuming it. Otherwise, the GUI cannot perform the necessary actions. You do not need to manually do any of the specific steps described here.
Cancel
If the maker has not been able to redeem the Bitcoin (that you locked) within ~12 hours (72 Bitcoin blocks) from the start of the swap1, the swap will be cancelled. This is done either by you or by the maker, by publishing a special Bitcoin transaction called the Bitcoin cancel transaction, or tx_cancel. As soon as this transaction is confirmed, the swap is locked in a state where only the refund and punish paths can be activated.
Refund
As soon as the swap is cancelled, you can refund your Bitcoin. The GUI will do this automatically for you. This is done by publishing the Bitcoin refund transaction, or tx_refund. This must be done within ~24 hours (144 Bitcoin blocks) from the confirmation of the Bitcoin cancel transaction.
If the Bitcoin is not refunded within this time frame, the maker can punish you. This is a security measure to ensure that malicious actors can't refund their Bitcoin while the maker loses their Monero. You may still be able to redeem the Monero, if the maker cooperates.
Punish
If you do not refund your Bitcoin within ~24 hours (~144 Bitcoin blocks) from the confirmation of the Bitcoin cancel transaction, the maker will punish you. This is done by redeeming the Bitcoin that you locked earlier. At this point, you can no longer refund the swap and get back your Bitcoin.
You may still be able to complete the swap by redeeming the Monero.
Cooperative Redeem
If the maker has punished you, you may still be able to complete the swap by redeeming the Monero. This requires the maker to cooperate. Most makers do cooperate, since the alternative is that the Monero will be locked in the swap forever.
To attempt a cooperative redeem, simply resume the swap. A request will be made to the maker to send you the secret key. If the request fails (e.g. because of network issues), you can still try again later. There is no time limit for this.
Once the GUI receives the secret key, it will automatically redeem the Monero to the address you specified when you started the swap.
With most makers, you can still redeem the Monero even after being punished. This is, however, purely voluntary and we advise against relying on this.
Footnotes
-
To be exact, the time frame is ~12 hours (72 Bitcoin blocks) from the confirmation of the Bitcoin lock transaction. ↩