PMM percent fee wrong calculation

hey guys, I am building my own connector and I run into some trouble with PMM percent fees.

exchange fee = 0.1%

In the “c_check_and_add_transaction_costs_to_pricing_proposal” file this is the math being applied:

buy_price_with_tx_cost = buy_price * (Decimal(1) - fee_object.percent) - fixed_cost_per_unit
to make it easier lets say it turns out like this:
buy_price_with_tx_cost = 100 * (1 - 0.1) - 0 which results to 90

however it’s not right, it should do something like this 100 - (0.1% of 100) which results to 99.9

I may be making an obvious mistake, so I apologize in advance :slight_smile:

fee_object.percent should be .001 not .1

While the problem is fixed by doing (percent_value / 100), I do believe that is not intuitive, since the input variable is called “percent”, perhaps it’s a common practise that I am unaware of, for me it makes sense to input the actual percent value which is “0.1”.