Description:
In _beforeSwap, the fee amount for the ReFiSold event is calculated as:
Uniswap V4 fees are typically in pips (1/1,000,000). A fee of 3000 represents 0.3%.
The calculation uses a denominator of 100,000.
3000 / 100,000 = 0.03 = 3%.
The actual fee charged by the pool is 0.3%, but the event logs a fee of 3%.
Impact:
Off-chain indexers and users relying on events will see incorrect fee amounts (10x higher). This can lead to confusion, incorrect analytics, and accounting errors.
Proof of Concept:
Recommended Mitigation:
Use the correct denominator (1,000,000) or LPFeeLibrary constants if available.
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.