-
Notifications
You must be signed in to change notification settings - Fork 191
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
THORSwap trades refunded at "Emit asset is less than price limit" #5733
Comments
For a similar quote on THORSwap (10,000 USDT -> DAI), we use a limit of Takeaways:
Another thing to mention here is the notion of final memo: we pass the memo we get from the quote through Notes:
A good starting point would be to use the new Q: is it even feasible to have reliable limit for larger trades while including our affiliate bps deduction logic, or should we go with 0 with user-facing warnings that the price limit is not guaranteed and is subject to a change because of xyz? |
Overview
Some of our trades are currently being refunded with cause:
Refunded: Emit asset {actual} less than price limit by -{limit - actual}
We need to investigate the current limit memo to ensure our THOR Txs consistently go through.
These account for a small portion of ss affiliate trades (~1 per day)
There seems to be a constant to these happening on larger streaming swaps (5000+ USD)
References and additional details
Refunded Txs: https://runescan.io/txs?affiliate=ss&type=refunded
All Txs: https://runescan.io/txs?affiliate=ss&type=all
addSlippageToMemo
web/src/lib/swapper/swappers/ThorchainSwapper/utils/addSlippageToMemo.ts
Lines 33 to 39 in 9a6cde4
Investigate slippage configuration tweaking for larger trades, streaming options, as well as potentially deducting some other fees (?) to get the final limit memo
Acceptance Criteria
Note, this will require some confirmation from the runescan link above that we do not see refunds for that reason anymore
Need By Date
No response
Screenshots/Mockups
No response
Estimated effort
N/A, may require multiple PRs until we get the heuristics right
The text was updated successfully, but these errors were encountered: