When changing the fees in the ReFiSwapRebateHook::ChangeFee function, the new fee arguments are not checked to have proper (not too high) values.
They need to be checked against MAX_LP_FEE. In simple words, it means the fees must be lower than 100% for the dapp to work properly.
Otherwise, all the users' tokens will be spent just to cover the fees. And they will get nothing in return.
Likelihood: Medium
It is fairly possible for the owner to mistakenly set high fee percentages for the transactions.
Impact: High
In absence of the proper checking, it will go through and severely affect the functionality of the protocol.
Users will NOT get any tokens in return when they try to swap their own tokens.
Please copy/paste the following function into the test file and run it.
In order to solve the issue, please make the following changes.
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.