RebateFiHook::_beforeSwap we compute the feeAmount with 100000 (1e5) while Uniswap v4 LP fees are expressed in pips where 1000000 (1e6) pip =100%, causing the event to overstates the fee by 10x (e.g., 0.30% is logged as 3.0%)Normal behavior:
When a user sells ReFi (i.e., ends the swap holding fewer ReFi), the hook emits ReFiSold(seller, amount, fee), where fee should represent the applied LP fee proportionally to the trade amount using pips (1e6 = 100%).
Issue:
The event fee is computed with / 100000, causing a 10× overstatement (0.30% → 3.0%). This does not change pool math (the pool fee override is set correctly via fee | OVERRIDE_FEE_FLAG), but it corrupts on-chain telemetry
Likelihood:
Every sell path emits this event, so it is hit under normal trading.
Impact:
Off-chain rebate/fee sharing logic based on this event will overcharge or mis-credit by 10×.
Add this test to RebateFiHookTest.t.sol. It proves the hook emits the wrong (10×) fee amount in the ReFiSold event.
Use pips correctly (divide by 1_000_000) and optionally clarify the comment:
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.