ReFiSwapRebateHook allows the owner to set the 100% fee, that will consume the entire swap amount.The ReFiSwapRebateHook allows the owner to set the sellFee == 100%, that will consume the entire swap amount. The user loses the entire swap amount.
Likelihood:
The owner may accidentally or intentionally set the commission at 100%, causing users to lose the entire transaction amount.
Impact:
The user сomplete loss of funds in a single transaction.
1) Set extreme sell fee == 100%;
2) Make swap (sell);
3) Looking for the ReFiSold(address indexed seller, uint256 amount, uint256 fee) event in the logs and, if the event is found, get params amount and fee ;
4) Print params:
swapAmount - swap amount,
sellFee - swap fee,
amountOut - the number of tokens received by the user as a result of the swap.
In the reusult you will see, that sellFee > swapAmount and the number of tokens received by the user as a result of the swap == 0
Limit the hook to the safest possible fee range, for example ≤ 50% depending on the tokenomics, and check the limit inside ReFiSwapRebateHook::ChangeFee().
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.