-
Notifications
You must be signed in to change notification settings - Fork 102
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
track and handle potential trade disruptions #361
Comments
|
Yeah, but only partially. Those issues remain if the wallets become locked after a trade is placed e.g. when dexc is restarted. Are there cases where unlocked wallets get locked while dexc is running? I suppose so... |
I updated the links in the issue description, were previously pointing to outdated master. |
Looks like most tricky spots have been covered. Just these 2 now:
|
@chappjc, @itswisdomagain any other issue here? |
Every matched order goes through a series of states in the below-listed order (each state follows from the previous):
A match/trade is considered disrupted or failed if it stays in a pre-final state longer than expected. Failed trades are revoked by the DEX.
Potential disruptions recovery
Below is a list of all potential trade disruptions (or failure states) and how each should be handled.
locktime
.Potential causes of trade disruptions; and prevention
Where possible, attempts should be made to prevent avoidable disruptions. The following table seeks to identify potential "legitimate" causes of disruptions and document steps an actor may take to forestall the disruption.
E.g. Taker fails to create counter-swap and notify the DEX because Taker did not receive an
audit
request from the DEX relaying details of the Maker's init swap.Error sending request ack to DEX. A party's action, even if valid, would be rejected if it was not preceded by a required acknowledgement.N/AAcks requirement removed in #699. See #716E.g. error sending
init
request after broadcasting initialization contractBroadcastTimeout
window.audit
request would typically not take the next required action e.g. sending their own swap contract or redeeming the audited contract; and would be penalized by the DEX. Since the DEX finds and validates contracts before relaying the details to counter-parties, a recipient of the DEX-originatingaudit
request should be able to find and validate the received contract details. An invalid contract would imply a bad-acting DEX and the client may want to stop acting on other trades with the DEX.Assume DEX is malicious for failed audits. Blacklist the DEX?
Network latency retry implemented
swapConf
th confirmation on Maker's swap. Related: Maker's failure to redeem Taker's counter swap because of missingswapConf
th confirmation on Taker's swap.swapConf
th confirmation on other party's swap tx in order to take appropriate next steps timely.See repeated call to trade.tick() which checks confirmations here and here.
See comment here. Related #676
redemption
request.The text was updated successfully, but these errors were encountered: