The ReFiSwapRebateHook::_beforeInitialize() should validate that ReFi token is in the pool (in key.currency0 or in key.currency1) before initialization
But this only checks the key.currency1 position
Likelihood:
This will occur when a user attempts to create a pool with an incorrect token order.
Impact:
The user cannot initialize the pool with an incorrect token order;
It is possible to break UX or the creation of a pool with an incorrect configuration may be blocked.
Since in the ReFiSwapRebateHook::_beforeInitialize() we check only currency1 then:
First pool inititialization reverts because key.currency1 != ReFi (wrong order)
Second pool inititialization will not revert, because key.currency1 == ReFi (correct order)
Therefore, the pool can be initialized only when key.currency1 == ReFi.
Add a check for key.currency0 and key.currency1 in the ReFiSwapRebateHook::_beforeInitialize() function.
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.