When the fees (the buyFee or sellFee state variables) are changed by the owner in the ReFiSwapRebateHook::ChangeFee function, an event should be emitted. However, in the current code, it is not.
Emitting such events facilitates the process of tracking the fee changes history.
For example, to see the effect of the fee changes over the revenue of the dapp, it is necessary to exactly know when the changes were applied. Without the on-chain recorded events, it is difficult and needs extra effort of doing it manually.
Likelihood: High
It happens every time the owner changes any of the fees.
Impact: Low
It does not have any disruptive effect on the functionality of the protocol. However, it makes it difficult to track the fee changes over time.
To see it in action, you should:
Copy/paste the code into Remix.
Run the program.
Look at the terminal window. You do not see any events emitted.
To solve this issue:
First, we need to declare the 2 events BuyFeeChanged() and SellFeeChanged() (for change of the buyFee and sellFee variables, respectively).
Then, we will emit them when the actual changes take place in the ChangeFee function.
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.