-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 komodo-defi-framework/mm2src/coins/eth.rs Lines 2136 to 2139 in 51c44f6
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 :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥
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
@artemii235 I actually think that the validate price function should be removed completely but I want to get your opinion on this first. |
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor optimization 🙂
I kept the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
fixes #884