Function getHookPermission() doesn't make possible to enables dynamic fees making the RebateFiHook protocol useless.
On Uniswap v4 , Hook are optional and customizable by developpers to fit their own goal. On this case the protocol's purpose is to encourage peoples to buy ReFi token by making fee = 0 and discourage peoples to sell to dumping and generate protocol revenue by adding fee.
On uniswap v4 each hook choose the function that they can access by using the getHookPermission() function. These function are stored in the 160 bit address of the contract. So if there are missing permission on critical function this can't be changed without redeploying another contract.
The problem with the function getHookPermission() is that the function beforeSwapReturnDelta and afterSwapReturnDelta are false , so that the hook can never call them , and these are the function (atleast one of t hem depend on design) that permit to applicate fee neither pricing or swap result :
Likelihood:
Without modification it would be always.
Impact:
The entire protocol is break.
Allow these fonction on getHookPermission then add your logic on the contract.
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.