We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
As reported by PS:
So, for now logic to calculate max possible outcome (for BUY) is:
It works fine for most of the cases, but not when we do:
e.g. let's consider BUY 9 USDT for USDC (in backwards order as it's BUY):
As an end result, we can spent up to 9.0 of USDC tokens to buy 9 USDT tokens.
but, in getMaxSwapAmount we calculate:
So, even though we can see that it's possible to buy 9 USDT, getMaxSwapAmount returns 8.18 USDT
It's not a big problem, as it occurs only on the numbers that are close to the max available balance, but still I found it's important to let you know
Simulation: https://www.tdly.co/shared/simulation/a1c4985f-2920-4039-b607-c072bc0cda95
The text was updated successfully, but these errors were encountered:
No branches or pull requests
As reported by PS:
So, for now logic to calculate max possible outcome (for BUY) is:
It works fine for most of the cases, but not when we do:
e.g. let's consider BUY 9 USDT for USDC (in backwards order as it's BUY):
As an end result, we can spent up to 9.0 of USDC tokens to buy 9 USDT tokens.
but, in getMaxSwapAmount we calculate:
So, even though we can see that it's possible to buy 9 USDT, getMaxSwapAmount returns 8.18 USDT
It's not a big problem, as it occurs only on the numbers that are close to the max available balance, but still I found it's important to let you know
Simulation: https://www.tdly.co/shared/simulation/a1c4985f-2920-4039-b607-c072bc0cda95
The text was updated successfully, but these errors were encountered: