The UpliftOnly contract's fee calculation produces higher fees than intended when multiple tokens in a pool increase in value. Testing shows fees are approximately 16% higher than expected, impacting all multi-token pools.
Location: pkg/pool-hooks/contracts/hooks-quantamm/UpliftOnlyExample.sol
The issue occurs in the fee calculation logic where the total value change calculation results in higher fees than the sum of individual token value changes would produce. Testing demonstrates:
For a 2-token pool where both tokens increase 4x in value:
Expected fee: 12% total (6% per token based on 2% fee rate * 300% increase)
Actual fee: 14% total (16% higher than expected)
Test Results:
Severity: MEDIUM
Technical Impact:
Users pay 16% more in fees than intended
Affects all multi-token pools
Predictable and consistent overcharging
No risk of fund loss or critical system failure
Economic Impact:
Small but consistent economic loss through excess fees
Impact is transparent and can be observed before interaction
Does not compound or worsen over time
Limited in scale (16% over expected)
Foundry testing framework
Manual code review
Custom test suite for fee calculations
Revise Fee Calculation:
Implementation Changes:
Calculate value changes per token independently
Apply fee calculation to each token's value change separately
Sum the individual fees for total fee
Add fee calculation validation checks
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.