The _beforeInitialize hook in RebateFiHook.sol is intended to ensure the pool being created contains the ReFi token. The current implementation compares key.currency1 against the ReFi address twice and never checks key.currency0. As written, the function reverts only when currency1 is not ReFi; pools with ReFi as currency0 will be allowed but should be accepted, while pools with ReFi absent from both sides may incorrectly pass or fail depending on the duplicate check logic.
Likelihood:
During pool creation where ReFi has been supplied as currency0 rather than currency1 (common when callers supply token ordering in different conventions).
Impact:
pools that should be validated as containing ReFi may be mis-detected; conversely, some pools with ReFi might be rejected incorrectly based on the duplicated check. This leads to incorrect hook enforcement at pool initialization.
Replace the duplicated currency1 checks with checks of both currency0 and currency1.
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.