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

Document limit_price and fee substraction #37

Open
gitmalong opened this issue May 31, 2023 · 0 comments
Open

Document limit_price and fee substraction #37

gitmalong opened this issue May 31, 2023 · 0 comments

Comments

@gitmalong
Copy link

gitmalong commented May 31, 2023

Hi!

I am unclear how the limit_price is exactly calculated when coming from a minimum out amount.

Is it minimum_out / amount_in rounded to u32::max(source_mint_decimals, destination_mint_decimals) and then converted to an integer by assuming destination_mint_decimals?

Does the feed need to be subtracted before from minimum_out?

Is the fee always taken from certain stablecoins and always from the source token?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant