If slippage is too high why not trade less?

Open
#2 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
typescript
Domain
blockchain

Research direction

Start by tracing the bot's maximum-slippage check and the path that compares trading the full token balance with 1% of it. Determine whether the intended behavior is to reduce trade size automatically, and define how the reduced amount and completion criteria should work before changing the trading flow.

Written by the indexing model from the issue text.

Description

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.

Original issue https://github.com/gnosis/gp-v2-trading-bot/issues/23 by @vkgnosis

Dominant language
TypeScript
Stars
15
Forks
1
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cowprotocol/trading-bot

All issues in cowprotocol/trading-bot

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.