fix(fee): remove fixed 0.0001 min threshold for TakerFee#1971
Conversation
… min_tx_amount into consideration instead of threshold
There was a problem hiding this comment.
thanks for the fix, looks good
this was dexfee: https://polygonscan.com/tx/0x8c914293305b1eff4a2a462fd77af73467a9932b56e6187ee07e23229d56b054
0.00001325 ($0.35)
question: is this #1635 related? can we fix that too? i can't post orders with an amount lower 0.0101 WBTC-PLG20 atm, which is ~260 USD
artemii235
left a comment
There was a problem hiding this comment.
It's a great improvement!
Only one comment: dex_fee_threshold still exists in several tests' code. Is it worth renaming it to min_tx_amount for uniformity?
Done |
It's unrelated to this PR, this is due to how minimum trading volume is calculated currently for EVM coins/tokens Since this is wrapped BTC, the decimals is 8 and the minimum is 0.01, we shouldn't depend on the decimal to calculate the minimum since what is of essence here is either the usd price or the gas price. We should work on this separately from this PR anyways, I see that @artemii235 suggested depending on the gas price in the past #873 (comment) when we didn't have the price service to get ERC20 price in relation to ETH, maybe we can look at this solution again or propose a different solution :) |
Should we maybe just use |
Sure, this has no drawbacks compared to the current approach, makers get to decide the minimum volume anyways using |
…st possible amount of the coin
|
There is also this fixed minimum price but I will leave it until we face a problem related to it https://github.com/KomodoPlatform/komodo-defi-framework/blob/8fd29ecce9f32a9fb6b3bb3221a10d66dda05a67/mm2src/mm2_main/src/lp_ordermatch.rs#L1791 |
I agree because this threshold may prevent a real trade between e.g. BTC and a very cheap asset. But it's worth checking that the price is above zero, as |
I kept the |




fixes #884