Skip to content

Order might get rejected because of fee #1

@nlordell

Description

@nlordell

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions