The default value of the ReFiSwapRebateHook::buyFee state variable is set to 0. However, it can be changed by the owner.
Therefore, it is recommended to include the fee parameter in the emitted event (similar to the ReFiSold event) for the external and off-chain services to be well informed of the details of the transaction.
In addition to the aforementioned change to the event structure, the actual feeAmount should also be calculated in the ReFiSwapRebateHook::_beforeSwap function to be included in the event.
Likelihood: Medium
Since buying the ReFi token makes almost half of the swap transactions, it is fairly likely to happen. And it happens every time a user buys the token.
Impact: Low
It does not have any direct effect on the dapp. It can just affect the functionality of the external apps such as the UI.
To reproduce the situation, you simply need to:
Run the program in Remix.
Buy the ReFi token.
See the event in the terminal.
Please make the following adjustments to solve the issue.
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.