updateUserBoost overwrites poolBoost.workingSupply with the user's new boost instead of accumulating it, leading to incorrect totals.
The code replaces the entire pool's working supply with a single user's boost amount. Previous contributions from other users in the pool are erased. Creates false representation of total boosted liquidity in the pool.
Initial state:
User1 boost: 1000
User2 boost: 1500
Working supply should be: 2500
User1 updates boost to 1200:
Current code sets working supply = 1200 //incorrect
Correct working supply should be: 2500 - 1000 + 1200 = 2700
User2 now updates boost:
Working supply would start from 1200 instead of 2700
Permanent loss of 1500 from User2's previous boost
Permanent lossof user's boost from previous boost. Reward shares calculations will be incorrect
Foundry
Adjust workingSupply by the difference between new and old boosts.
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.