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

PriceImpact - prevent bad results #399

Open
brunoguerios opened this issue Aug 23, 2024 · 0 comments
Open

PriceImpact - prevent bad results #399

brunoguerios opened this issue Aug 23, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@brunoguerios
Copy link
Member

PriceImpact uses an approximation method (ABA) to estimate the price impact of an action (add/remove liquidity unbalanced/single token)

We currently only throw errors for actions where internal queries indeed fail (e.g. add liquidity unbalanced with amountsIn higher than pool balance)

The problem is that there are scenarios that internal queries won't fail, but results are far off the "correct" price impact (e.g. add liquidity unbalanced with amountsIn slightly below pool balance)

With the premise that it's better to show no result rather than a bad result, it would be nice to evaluate which scenarios could potentially return bad results and prevent them to be returned.

@brunoguerios brunoguerios added the bug Something isn't working label Aug 23, 2024
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
None yet
Development

No branches or pull requests

1 participant