RebateFi Hook is a Uniswap V4 hook implementation that enables asymmetric fee structures for designated ReFi (Rebate Finance) tokens. Provided that any one of the tokens should be ReFi Token
ReFi hook has an IF condition to check if one of the tokens is REFI but the if condition just checks the same currency1 twice to see if its ReFi. In case if the other Token has higher address than ReFi then it has to be passed as currency1
In Uniswap v4, the PoolKey must always have currency0 < currency1 by address, otherwise PoolManager reverts with CurrenciesOutOfOrderOrEqual(currency0, currency1) so here Its not possible to use pools where the address of the other token is higher than that of ReFi.
Likelihood:
Can occur to anyone trying to create a LP with ReFi and another token whose address is higher than that of ReFi Token.
Impact:
Most tokens in the market wont be able to utilize this hook.as it is denying the creation of most LPs .
User tries to create a pool with where the tokenCurrency has higher address than the RefiCurrency so have to pass tokenCurrency as currency1 and ReFi as currency0. This will revert with ReFiNotInPool error message
The mitigation is simply to change the IF statement to check if either one the currency1 or currency0 is ReFi instead of just checking the currency1 alone.
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.