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 error messaging improvement #375

Open
johngrantuk opened this issue Aug 5, 2024 · 0 comments
Open

PriceImpact error messaging improvement #375

johngrantuk opened this issue Aug 5, 2024 · 0 comments

Comments

@johngrantuk
Copy link
Member

Common error for PI is occuring when pools have low liquidity - Price Impact calculation for Add Liquidity Unbalanced relies on swap queries under the hood and if they are too large compared to pool balances, they will revert due to MaxAmountInRatio.
See #373 as an example: "Reduce add liquidity amount as otherwise the priceImpact calculation (swap queries) will revert with the pool used, due to revert MaxAmountInRatio"

  • Can we catch and return a better error for this case?
  • Can we add some docs to explain whats happening so we don't keep revisiting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant