-
Notifications
You must be signed in to change notification settings - Fork 426
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
Internal math for stableswap #1006
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
const poolAssets: StableMath.StableSwapToken[] = [ | ||
{ | ||
amount: new Dec(1_000_000_000), | ||
denom: "foo", | ||
denom: 'foo', |
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.
Hmm it seems your vscode setup (prob prettier) is changing double quotes to single
My only hunch right now is you're missing eslint? Try installing this extension below and see if that fixes it. If not, DM me.
https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint
This PR implements relevant math/calc functions for stableswap. Specifically, it implements the following:
calcOutGivenIn
calcInGivenOut
calcSpotPrice
solveCfmm
To align precision bounds with our Go implementation, we also implement a wider precision decimal type for internal calculations
TODO: