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

Stable AMM doesn't support price imbalance #926

Closed
gregdhill opened this issue Feb 13, 2023 · 2 comments
Closed

Stable AMM doesn't support price imbalance #926

gregdhill opened this issue Feb 13, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@gregdhill
Copy link
Member

Describe the bug
When trading against a base pool with three assets where the input currency is worth significantly more, the output amount should be less.

To Reproduce
Steps to reproduce the behavior:

  1. Create a base pool with assets A, B, and C
  2. Add liquidity 1e12, 1e11 and 1e11 respectively
  3. Trade A to B
  4. Output amount is almost the same as input

Expected behavior
Output amount should be less since the price of the input currency is less

Additional context
See: #920

@gregdhill gregdhill added the bug Something isn't working label Feb 13, 2023
@nud3l nud3l added this to Backlog Feb 13, 2023
@github-project-automation github-project-automation bot moved this to New 🆕 in Backlog Feb 13, 2023
@gregdhill gregdhill added this to the Kintsugi De-Fi Hub milestone Feb 13, 2023
@gregdhill
Copy link
Member Author

Seems this is expected behavior, Curve v1 only supports pegged assets. In the case of LKSM Acala converts this value to KSM here: https://github.com/AcalaNetwork/Acala/blob/01f19ae1bfb0afff62a0b938c8e2d02cf5d831c5/runtime/karura/src/lib.rs#L1594-L1630

@nud3l nud3l moved this from New 🆕 to Todo ⏳ in Backlog Feb 20, 2023
@nud3l nud3l removed this from the Kintsugi De-Fi Hub milestone Mar 16, 2023
@gregdhill
Copy link
Member Author

Created #1036

@github-project-automation github-project-automation bot moved this from Todo ⏳ to Done ✅ in Backlog May 2, 2023
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
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants