Skip to content
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

Review and fix all areas that set slippage tolerances #6017

Closed
0xean opened this issue Jan 16, 2024 · 2 comments
Closed

Review and fix all areas that set slippage tolerances #6017

0xean opened this issue Jan 16, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@0xean
Copy link
Contributor

0xean commented Jan 16, 2024

Long tail swaps don't correctly enforce slippage leading to sandwich and a loss of user funds. We need to resolve this and additionally take the time to audit anywhere else this might be the case and confirm slippage is set correctly.

AC

  1. Long tail swaps correctly enforce a minAmountOut for the intermediary asset
  2. All other swap protocols / routes are confirmed to enforce sane slippage tolerances
@0xean 0xean added the bug Something isn't working label Jan 16, 2024
@0xean 0xean moved this from To schedule to Up next in ShapeShift Dashboard Jan 16, 2024
@0xApotheosis 0xApotheosis self-assigned this Jan 18, 2024
@0xApotheosis 0xApotheosis moved this from Up next to In progress in ShapeShift Dashboard Jan 22, 2024
@0xApotheosis
Copy link
Member

In addition to the long-tail fixes above, I sanity checked the following at runtime:

1inch:

We correctly build the transaction payload with the user's specified slippage (or the default if not set) in the slippage parameter:

Screenshot 2024-01-29 at 9 37 19 am

0x

We only use the user's specified slippage if 0x supports slippage protection for that trade pair. If not, we default to 0.2% (and let the user know that custom slippage is not supported).

THORChain

LiFi

Defaults to 0.5%, and can be overridden by the user.

@github-project-automation github-project-automation bot moved this from In progress to Done in ShapeShift Dashboard Jan 28, 2024
@0xean
Copy link
Contributor Author

0xean commented Jan 29, 2024

thanks @0xApotheosis for the review here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

2 participants