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]: Simulator/fuzz testing for stableswap #2900

Closed
Tracked by #1451
AlpinYukseloglu opened this issue Sep 29, 2022 · 0 comments
Closed
Tracked by #1451

[x/gamm][stableswap]: Simulator/fuzz testing for stableswap #2900

AlpinYukseloglu opened this issue Sep 29, 2022 · 0 comments
Assignees
Labels
C:stableswap C:x/gamm Changes, features and bugs related to the gamm module.

Comments

@AlpinYukseloglu
Copy link
Contributor

Background

We should make sure that we have fuzz testing for our core invariant and ideally for our binary search implementations (mainly single asset join) to ensure they function across a full range of inputs

Suggested Design

  • Invariant testing (ensure that k changes in the right direction and by small amounts related to BigDec truncations or rounding error) – swap fees should be taken out of input assets so I believe they should not affect k value changes, so unless I'm missing something the main focus of this should be on ensuring rounding is handled properly
  • Single asset join binary search (should be fine as LP share -> single asset out function is monotonically increasing, but worth testing anyway)

Acceptance Criteria

  • All valid tests pass above reasonable thresholds
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.
Projects
Archived in project
Development

No branches or pull requests

2 participants