Normal behavior: When users buy the designated ReFi token, the hook should apply buyFee (typically 0%) so buys are subsidized; when users sell ReFi, it should apply sellFee (e.g., 0.3%) to discourage dumping.
Actual behavior: _isReFiBuy misclassifies every swap whenever ReFi is currency0, so sells receive the zero-fee path and buys get penalized. This inverts the entire incentive model and lets dumpers avoid the premium fee.
Likelihood
Any pool where ReFi is currency0 (roughly half of deployments) hits this bug immediately.
Users only need to perform normal Uniswap swaps; no special permissions or conditions are required.
Impact
Sellers never pay the configured premium fee, eliminating protocol revenue and removing the anti-dump mechanism.
Buyers are overcharged, discouraging accumulation and undermining the hook’s stated economic goal.
Explanation: Deploy a pool with currency0 == ReFi, perform a standard sell swap (zeroForOne == true), and log the fee value returned by the hook—you’ll observe it equals buyFee instead of sellFee.
Explanation: Flip the logic so “buy” means the user receives ReFi; when ReFi is currency0, that happens only when zeroForOne == false.
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.