Skip to content
This repository has been archived by the owner on Apr 28, 2022. It is now read-only.

If slippage is too high why not trade less? #23

Closed
vkgnosis opened this issue Jun 10, 2021 · 1 comment
Closed

If slippage is too high why not trade less? #23

vkgnosis opened this issue Jun 10, 2021 · 1 comment

Comments

@vkgnosis
Copy link

I have encountered the silly situation where the trading bot will not trade because I gave it too many funds in the same token.

This happens because we have a maximum slippage tolerance. The bot checks this by comparing the price it gets when trading all of its balance in a token versus the price it would get if it traded only 1% of the balance. If the price in the full balance case is worse by too much it will not trade.

This feels wrong to me because it is likely that if the bot had fewer funds in the first place then the slippage wouldn't be a problem. The solution could be to trade low amounts by default instead of using the full balance.

@fleupold
Copy link
Contributor

That's a good suggestion. I think it would require a price query to "know" how valuable a token is in $ e.g. (we are picking tokens at random) and then also have a parameter of a target amount (mainnet needs more due to higher fee).

So it's a bit extra complexity & configuration but still totally makes sense.

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

No branches or pull requests

3 participants