Root Cause: The event fee calculation uses a denominator of 100,000 (10^5) while Uniswap V4 fees are typically in pips (1/1,000,000 or 10^6).
Impact: The ReFiSold event reports a fee amount that is 10 times larger than the actual fee applied to the pool. This causes misleading off-chain data and accounting errors for indexers or users relying on events.
In _beforeSwap, the fee amount for the event is calculated as:
The sellFee is initialized to 3000.
In Uniswap V4, 3000 usually represents 0.3% (3000 / 1,000,000).
The event calculation uses 100,000 as denominator: 3000 / 100,000 = 0.03 = 3%.
Thus, the event reports a 3% fee, while the pool applies a 0.3% fee.
Likelihood: High (Always occurs for sells).
Impact: Low (Off-chain reporting issue, does not affect on-chain balances directly, but misleading).
If sellFee is set to 100000 (10% in pips):
Pool Fee: 10%.
Event Fee: (amount * 100000) / 100000 = amount (100%).
The event reports 100% fee when it should be 10%.
Use the correct denominator for pips (1,000,000).
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.