The UpliftOnlyExample contract contains a critical calculation error in the fee computation logic where an unnecessary scaling factor of 1e18 is applied, resulting in significantly inflated fees being charged to users.
In the UpliftOnlyExample contract, when calculating fees based on LP token value changes, the code incorrectly applies an additional 1e18 scaling factor:
The lpTokenDepositValueChange should already represent the actual value change in the base units. By multiplying this with both upliftFeeBps and an additional 1e18 scaling factor, the resulting fee calculation becomes inflated by 1e18, leading to users being charged fees that are 1e18 times larger than intended.
Loss of funds. Users are being charged fees that are 1e18 times larger than intended, resulting in significant overcharging and potential loss of user funds when interacting with the protocol.
Manual Review
Remove the additional 1e18 scaling factor from the fee calculation:
This change ensures that fees are calculated correctly based on the actual value change and the intended fee basis points, without applying an unnecessary scaling factor.
Likelihood: High, when benefit. Impact: High, exitFee will be too high, loss of funds or DoS removal.
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.