Under normal behavior, the hook should allow initialization of any pool that contains the ReFi token in either currency0 or currency1.
However, the _beforeInitialize() function contains a duplicated condition that checks currency1 twice and never checks currency0. This causes the hook to reject all pools where ReFi is the first token in the pair.
This effectively forces ReFi to always be currency1, which is unintended and also guarantees that the buy/sell reversal bug (H-01) always triggers.
Likelihood:
This condition is triggered every time a pool is initialized.
Any pool where ReFi should be currency0 will always revert.
Developers cannot deploy pools with ReFi as token0 even if desired.
Impact:
Prevents valid pool deployments.
Forces a single hard-coded pool configuration.
Locks ReFi into currency1, amplifying the impact of the buy/sell reversal bug.
Potential DoS for integrations expecting flexible token ordering.
Below PoC demonstrates that initializing a pool where ReFi is currency0 always fails, even though the ReFi token is present.
This occurs because currency0 is never checked.
The check should validate both currencies, not just currency1 twice.
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.