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

swap+add: complete iterative search for scenarios where first returned swap does not return expected ratio #2

Closed
ewilz opened this issue Sep 7, 2021 · 2 comments
Assignees
Labels

Comments

@ewilz
Copy link
Member

ewilz commented Sep 7, 2021

Define error tolerance for ratio post-swap.
If post-swap ratio is not within error tolerance, retry search with market rate from first search (which likely didn't match up with expectations)
Alternatively, the swap may have moved sqrtPrice of the target pool, which in turn could push the post-swap ratio outside our error tolerance.

@ewilz ewilz added the swap+add label Sep 7, 2021
@ewilz ewilz self-assigned this Sep 14, 2021
@willhennessy
Copy link

draft PR coming tomorrow

@ewilz
Copy link
Member Author

ewilz commented Sep 20, 2021

#6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants