The ReFiSwapRebateHook constructor accepts a _ReFi address parameter that is stored and used throughout the contract's lifecycle to identify the ReFi token in swap operations. This address is critical for the hook's core functionality, as it determines which token direction receives fee rebates.
The constructor lacks zero-address validation for the _ReFi parameter. If the contract is deployed with address(0) as the ReFi token, all swap operations will fail because the hook cannot properly identify the ReFi token direction, rendering the entire hook unusable and requiring a complete redeployment.
Likelihood:
Deployment scripts or frontend interfaces may pass address(0) due to configuration errors, uninitialized variables, or incorrect parameter ordering.
Impact:
All swap operations through the pool will revert when the hook attempts to identify swap direction
Wasted gas costs from the initial deployment and address mining process
Potential loss of funds if liquidity is added to the pool before the issue is discovered
Time delays and operational disruption while redeploying and remining a valid hook address
Add this test to RebateFiHookTest.t.sol:
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.