Normal Behavior: The _beforeInitialize function should validate that the ReFi token is present in the pool by checking if either currency0 or currency1 matches the ReFi token address.
Specific Issue: The validation logic in _beforeInitialize contains a critical copy-paste error where it checks currency1 twice instead of checking both currency0 and currency1:
Likelihood:
This will occur every time a pool is initialized where ReFi is currency0 but not currency1
The condition currency1 != ReFi && currency1 != ReFi is always equivalent to currency1 != ReFi, making the check incomplete
Pools with ReFi as currency0 will incorrectly revert with ReFiNotInPool() error
Pools without ReFi token at all may incorrectly pass validation if they happen to have ReFi as currency1
Impact:
Hook cannot be used with pools where ReFi is currency0 (50% of valid pool configurations are broken)
Asymmetric fee logic may be applied to wrong pools if ReFi happens to be currency1 in a pool where it shouldn't be
Protocol functionality is severely limited or completely broken depending on pool configuration
Users cannot create valid ReFi/ETH pools in the intended configuration
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.