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]: Spot prices are not descaled #3353

Closed
Tracked by #3328 ...
AlpinYukseloglu opened this issue Nov 12, 2022 · 0 comments · Fixed by #3357
Closed
Tracked by #3328 ...

[x/gamm][stableswap][bug]: Spot prices are not descaled #3353

AlpinYukseloglu opened this issue Nov 12, 2022 · 0 comments · Fixed by #3357
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

We calculate spot prices on scaled pool amounts but do not descale the output. Also, if we assume people will use large scaling factors, our 1 token swap approximation might not be precise enough.

Suggested Design

  • Scale a by input denom's scaling factor and descale output by its scaling factor

Acceptance Criteria

  • All new and existing tests pass
  • Justification for why scaling a works is added to the spec
@AlpinYukseloglu AlpinYukseloglu added T:bug 🐛 Something isn't working C:x/gamm Changes, features and bugs related to the gamm module. C:stableswap labels Nov 12, 2022
@AlpinYukseloglu AlpinYukseloglu self-assigned this Nov 12, 2022
@osmo-bot osmo-bot moved this to Needs Review 🔍 in Osmosis Chain Development Nov 12, 2022
Repository owner moved this from Needs Review 🔍 to Done ✅ in Osmosis Chain Development Nov 16, 2022
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

Successfully merging a pull request may close this issue.

1 participant