-
Notifications
You must be signed in to change notification settings - Fork 99
fix: invert back the stableswap spot price #1094
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
base: master
Are you sure you want to change the base?
Conversation
|
Crate versions that have not been updated:
Crate versions that have been updated:
Crate versions that have been downgraded:
Runtime version has not been increased. |
# Conflicts: # Cargo.lock # pallets/stableswap/Cargo.toml # runtime/hydradx/Cargo.toml # runtime/hydradx/src/lib.rs
enthusiastmartin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the change/fix looks ok.
however, i do have question why the need to change various values in the tests ?
eg. fees, issuance etc.
i would expect the tests not to change.
and it needs to resolve the conflicts.
agree, reverted all those changes |
| fee, | ||
| pegs, | ||
| ) | ||
| .map(|p| p.reciprocal())? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should fix the underlaying function rather than inverting the price here.
| &asset_pegs, | ||
| ) | ||
| .ok_or_else(|| ExecutorError::Error(ArithmeticError::Overflow.into()))? | ||
| .reciprocal() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this is an issue?!
|
Quick benchmark at commit 375b5e6 has been executed successfully. |
Fixes -> #1009