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/stableswap][osmomath] Increase precision of osmomath BigDec to 36 prevent stableswap CFMM precision issues #2591

Closed
Tracked by #1451
AlpinYukseloglu opened this issue Sep 4, 2022 · 0 comments · Fixed by #2778
Assignees
Labels
C:x/gamm Changes, features and bugs related to the gamm module.

Comments

@AlpinYukseloglu
Copy link
Contributor

AlpinYukseloglu commented Sep 4, 2022

Background

The current BigDec precision significantly limits the use of our current stableswap CFMM. There are a number of ways we can tackle this, but the cleanest path is likely to just increase our BigDec precision bounds. This would also have the added benefit of making our binary search CFMM solver viable, drastically reducing the amount of computation spent on invariant calculations.

Suggested Design

  • Increase BigDec bit length to 1024 (to accommodate large k values)
  • Increase BigDec decimal precision to 36

Acceptance Criteria

  • All existing and new tests should pass
@AlpinYukseloglu AlpinYukseloglu self-assigned this Sep 4, 2022
@osmo-bot osmo-bot moved this to Needs Review 🔍 in Osmosis Chain Development Sep 4, 2022
@AlpinYukseloglu AlpinYukseloglu added the C:x/gamm Changes, features and bugs related to the gamm module. label Sep 4, 2022
Repository owner moved this from Needs Review 🔍 to Done ✅ in Osmosis Chain Development Sep 19, 2022
@AlpinYukseloglu AlpinYukseloglu changed the title [x/stableswap][osmomath] Increase precision of osmomath BigDec to prevent stableswap CFMM precision issues [x/stableswap][osmomath] Increase precision of osmomath BigDec to 36 prevent stableswap CFMM precision issues Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:x/gamm Changes, features and bugs related to the gamm module.
Projects
Archived in project
1 participant