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

Order might get rejected because of fee #1

Open
nlordell opened this issue Mar 31, 2022 · 0 comments
Open

Order might get rejected because of fee #1

nlordell opened this issue Mar 31, 2022 · 0 comments

Comments

@nlordell
Copy link
Contributor

I think this is what happened in some trading bot runs that failed because the order got rejected because of insufficient fee like https://logs.gnosisdev.com/goto/5c0850bae0139dda90896a9c4a11739a .

The problem is that:

  • the bot has an amount of sell_token based on which it queries the fee,
  • it subtracts the fee_amount from the sell_amount to create the order
  • the resulting order has a smaller sell amount than what we originally queried the fee for so the minimum fee could be higher

From api perspective it is a little annoying that there is no way to get the actual "maximum sell amount" you can set taking the fee into account. We would have to do some kind of estimation like using more fee or using only half the initial balance for the sell amount so that the fee is very likely to fit into the other half.

Original issue gnosis/gp-v2-trading-bot#22 by @vkgnosis

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