Under expected behavior, the hook must apply:
Reduced fees on buys of the ReFi token.
Higher fees on sells of the ReFi token.
However, the _isReFiBuy() logic is implemented incorrectly.
When ReFi is currency1 (which is always the case due to a separate initialization bug), the function classifies every buy as a sell and every sell as a buy.
This fully inverts the economic incentives that the protocol intends to enforce.
The root cause is highlighted below:
Likelihood:
ReFi is always currency1 due to another bug in _beforeInitialize(), so this logic runs in the faulty branch 100% of the time.
Every swap involving the ReFi token will be misclassified.
No user can ever receive the intended fee structure.
Impact:
Buyers are charged premium sell fees, making accumulation unattractive.
Sellers are charged reduced buy fees, making dumping cheaper.
The tokenomics of ReFi reverse entirely, harming liquidity, price stability, and protocol sustainability.
Protocol revenue and incentives behave opposite to design, breaking the project’s core mechanism.
The following PoC shows how swap direction is always interpreted incorrectly when ReFi is currency1.
In Uniswap V4:
zeroForOne = true → swap token0 → token1
zeroForOne = false → swap token1 → token0
If ReFi is currency1, then:
A buy means token0 → token1 → zeroForOne = true
A sell means token1 → token0 → zeroForOne = false
The hook mislabels these:
This PoC shows that every buy is treated as a sell and every sell is treated as a buy.
To determine if a user is buying ReFi, we must check:
If ReFi is currency0, a buy is token1 -> token0 → zeroForOne = false
If ReFi is currency1, a buy is token0 -> token1 → zeroForOne = true
The corrected logic directly reflects this.
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.