-
Notifications
You must be signed in to change notification settings - Fork 149
Closed
Description
This issue deals with the ability to properly refund a swap-gone-wrong. There are two parts to this issue.
- bug: We don't load orders from the DB until we have already established a connection with the order's DEX. What happens when a DEX goes offline suddenly, causing swaps to fail, and doesn't come back? If a client is restarted before refund, they won't be able to refund until the DEX comes back online, potentially leaving the client's failed swap un-refunded beyond the lock time. This is a bug and a security hole that needs a solution.
- Even if the DEX is connected, if the wallet is not unlocked, we can't refund. But if we generated the refund at the same time as the swap output, there would be no reason to have an unlocked wallet to refund. We'd just be broadcasting. In theory, we don't even need a wallet connection to refund, as we could devise a path to broadcast the refund to e.g. dcrdata without a wallet backend at all. But having a refund path on a locked wallet is a start, as there would be a conceivable system configuration in which a refund could happen without user input in the case of an unexpected restart.
itswisdomagain, JoeGruffins, chappjc, xaur and norwnd
Metadata
Metadata
Assignees
Labels
No labels