Skip to content

Add back comissions for botProfit #792

@carkod

Description

@carkod

Comissions have been removed from the Dashboard terminal in this PR

There are several problems with current approach. In the back-end they are summed and appended directly from the buy/sell order transaction. That means the unit is in BNB, not the fiat or quote asset. To illustrate this:

if we buy 0.0001 BTC/USDC (buy BTC from USDC market) and we get charged 0.000012 BNB, this cannot be directly substracted from 0.00001, because they units don't match.

On the other hand, Dashboard uses percentages for botProfit. So obviously even if we convert BNB -> BTC, we still need to convert to percentages, so everything was wrong with the current commission substraction from botProfit.

We need to decide whether

  • we want to commit to doing that additional conversion network request (request BNB/BTC market price in this example),
  • remember that this has to be a dynamic quote asset, so it has to work with other pairs like FORM/USDC, which also would get back XXXX BNB in commmissions.
  • convert into a percentage in front-end, although this can be easily done as part of the botProfit calculation

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions