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

[x/gamm][stableswap][bug]: Enforce minimum post-scaled asset amounts #3255

Closed
Tracked by #1451 ...
AlpinYukseloglu opened this issue Nov 5, 2022 · 0 comments
Closed
Tracked by #1451 ...
Assignees
Labels
C:stableswap C:x/gamm Changes, features and bugs related to the gamm module. T:bug 🐛 Something isn't working

Comments

@AlpinYukseloglu
Copy link
Contributor

Background

Since our k values are cubic in the input amounts, scaling factors that take input reserves below 1 expose an attack vector where our solver can be forced to panic (push reserves to be small enough such that k is always zero causing a div by zero when calculating k ratios)

Suggested Design

  • Require a minimum post-scaled asset amount of 1 per asset in a pool and enforce this on pool creation and pool exit (both should fail if this requirement is not met)

Acceptance Criteria

  • All new and existing tests pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:stableswap C:x/gamm Changes, features and bugs related to the gamm module. T:bug 🐛 Something isn't working
Projects
Archived in project
Development

No branches or pull requests

1 participant