Due to a miscalculation in the ReFiSwapRebateHook::_beforeSwap function, the user will be charged 10 times more. For instance, instead of the expected initial sellFee of 0.3%, the user's balance will be deducted by 3% for the swap fee.
The problem is that currently, the denominator of the division is 100_000. However, it is supposed to be the standard 1_000_000.
Likelihood: High
Since it is an unconditional part of the system, it happens every time a user sells their ReFi tokens (swaps for another ERC20 token)
Impact:
It severely affects the program because it charges the users 10x the expected swap fee amount.
It can be easily and manually calculated. The initial sellFee is set to 3_000, and the denominator is 100_000. The result of 3000 / 100000 = 0.03. By multipying it by 100 to get the percentage, we will have 3% which drastically differs from what we expected (0.3%).
To solve the issue, please make the following changes to the code.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.