-
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
fix: thorchain swap improvements #5748
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conceptual stamp, haven't tested this at runtime yet but this is exactly what I thought the PR would look like 🏆 looks sane to me and on par with THORSwap for streaming swaps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functional test, memo looking as expected for streaming swaps:
0XC770EEFAD204B5180DF6A14EE197D99D808EE52D:0xB0E5C1DD13D78a314c3c0d82CE2C9f4c65C3e02c:0/10/0:ss:30
.
@kaladinlight I'll hold off on merging, as I'm not sure is you wanted to address the "TODO: disable custom slippage limit" in this PR, or a follow-up. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sanity tested with frame-injected vitalik.eth
against THORSwap:
- Receive amounts look sane against THORSwap
- Memo looks sane against TS:
- Limit is indeed present for streaming swaps
- We use 0/10/0 as streaming parameters as mentioned in the testing steps. i.e:
0
is on par with the explicit quantity from TS (0/explicit quantity from quote is the same), and10
is valid as per our current heuristics, possibly too high, but our 1/5/10 interval heuristics won't hurt, only make swaps possibly longer vs. the 3 used by TS for a similar a swap
Description
0
limit for thorchain streaming swaps which will use TC auto stream limits which should result in more completed trades and less refunds (see: https://discord.com/channels/838986635756044328/1166265575941619742/1166500062101250100)Min expected after slippage
as we can't determine this accuratelyexpected_amount_out
and don't account for affiliate fees in these calculations and display values as they are shown elsewhere (this very closely reflects TS UI as changed)Pull Request Type
Issue (if applicable)
closes #5733
Risk
Medium - this changes our limit logic on both regular and streaming swaps, we will want to do our best to verify completed trades and also monitor after this update is deployed to ensure we have reduced the occurrences of refunds for all thor trades
Testing
0/10/0
streaming params in the memo, the first zero being limit = auto limit)Engineering
☝️
Operations
☝️
Screenshots (if applicable)
No affiliate fee