The updateUserBoost
function, in BoostController
contract, incorrectly updates the pool’s working supply by directly setting it to the new boost amount instead of properly adjusting it. This results in incorrect calculations of the pool’s total boost, potentially leading to inaccurate reward distributions and unfair advantages for certain users.
The issue arises because poolBoost.workingSupply
is being set directly to newBoost
, rather than adjusting the total boost based on the changes in individual users' boosts. This means that when multiple users are contributing boosts to the same pool, each update call could effectively erase previous contributions, leaving only the last updated user's boost reflected in the pool’s working supply.
Users who updated their boosts earlier might see their contributions completely erased, since poolBoost.workingSupply
is overwritten instead of adjusted.
Rewards distribution, liquidity incentives, or governance mechanisms relying on boost calculations may become inaccurate and unfair.
Attackers could potentially manipulate the system by repeatedly updating their boost and overriding the entire pool’s working supply.
Manual Review
Instead of directly setting poolBoost.workingSupply = newBoost
, the function should adjust the existing working supply by adding or subtracting the difference in boost values:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
View preliminary resultsAppeals are being carefully reviewed by our judges.
The contest is complete and the rewards are being distributed.