**Normal behavior: **
Before pool initialization, the hook should verify that the ReFi token is part of the pair, regardless of whether it sits in currency0 or currency1.
Issue:
The code mistakenly checks currency1 twice, never considering currency0. When ReFi sorts to currency0 (common, depending on address ordering), initialization reverts with ReFiNotInPool(), blocking pool creation and all downstream operations for that pair.
Likelihood:
Uniswap v4 uses deterministic currency ordering; for many pairs ReFi will naturally end up as currency0 (e.g., when paired with a token deployed after ReFi). In those cases, initialization always hits this path.
Impact:
Legitimate pools (ReFi as currency0) cannot be initialized; liquidity cannot be added; swaps are impossible for those pairs.
Add the following test to RebateFiHookTest.t.sol. It deploys a new token after ReFi so its address is higher, making ReFi the currency0 for that pair. With the current bug, _beforeInitialize reverts with ReFiNotInPool().
Check both sides for membership:
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.