The hook enforces that the designated ReFi token must be one of the two tokens in a pool during initialization. Due to a duplicated condition checking only key.currency1, pools where ReFi is currency0 are erroneously rejected — breaking expected protocol functionality and limiting deployment flexibility.`
The _beforeInitialize hook is intended to validate that the ReFi token is present in the pool — either as currency0 or currency1 — and revert otherwise, ensuring the hook is only used on valid pools.
However, the condition Currency.unwrap(key.currency1) != ReFi && Currency.unwrap(key.currency1) != ReFi mistakenly repeats the check for key.currency1 and omits key.currency0 entirely, effectively requiring ReFi to be exclusively currency1.
Likelihood:
Any attempt to initialize a pool where ReFi is the first token (currency0, e.g., ReFi/WETH) will trigger the ReFiNotInPool() revert — this occurs deterministically for this common pool ordering.
Uniswap V4 pool keys are typically constructed with tokens sorted by address (lower address first), meaning depending on the ReFi token address, it may always be currency0, making successful initialization impossible without external workarounds.
Impact:
Protocol deployment failure: Owners cannot create pools with natural token ordering (e.g., ReFi/USDC if ReFi.address < USDC.address), violating expected behavior and documentation.
Loss of composability: Integrators (e.g., frontends, aggregators, other protocols) expecting standard pool key conventions will fail to use the hook, harming adoption and usability.
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.