feeAmount for the ReFiSold event, causing the hook to report a fee 10× larger than the actual intended sell fee.The RebateFi hook is designed to apply reduced fees on buys and standard (0.3%) or premium fees on sells. These fee amounts are meant to be accurately reflected in emitted events so off-chain systems, dashboards, analytics, and monitoring tools can correctly understand user behavior, measure selling pressure, and adjust sell fees accordingly.
The hook calculates the feeAmount emitted in the ReFiSold event using an incorrect denominator (100_000). When sellFee is set to values intended to represent Uniswap’s fee units (millionths), the event reports a fee that is 10× higher than the fee actually charged. While the on-chain swap execution is correct, the event misrepresents protocol behavior and misleads any system relying on events for economic logic, revenue tracking, user analytics, or anti-dump detection.
Likelihood:
The issue occurs whenever a sell transaction is executed, because sellFee is interpreted in millionths while the event calculation always divides by 100_000, producing a 10× inflated fee in every ReFiSold event.
Any off-chain analytics, dashboards, bots, or monitoring tools that read these events will consistently consume incorrect fee data, since events are their primary data source.
Impact:
Off-chain systems will misinterpret normal sells as significantly larger or more heavily penalized, disrupting RebateFi’s intended economic model and potentially flagging legitimate behavior as “dumping.”
Fee analytics, revenue reporting, user dashboards, or incentive mechanisms relying on event data will produce incorrect outputs, damaging protocol reliability and potentially leading to incorrect business or governance decisions.
Set sellFee to 3000 in the RebateFi hook, which is intended to represent 0.3% of the swap amount.
Execute a sell transaction of swapAmount = 1000 tokens through the hook.
Observe the emitted ReFiSold event: feeAmount = (swapAmount * sellFee) / 100_000;
Calculation: feeAmount = 1000 * 3000 / 100_000 = 30
Compare with the actual intended fee: Actual fee = 1000 * 0.3% = 3
Result: The event reports a fee 10× higher than the actual fee charged.
Update the fee calculation denominator in the ReFiSold event emission to match Uniswap v4's fee unit system. Uniswap v4 represents fees in hundredths of a basis point (pips) with a denominator of 1,000,000, where 3000 = 0.3%. The current implementation uses 100,000 as the denominator, causing the event to report fees that are 10× higher than actual. Correcting the denominator to 1,000,000 ensures the emitted feeAmount accurately reflects the fee percentage.
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.