In BoostController.sol, the boost value for a user in a specific pool can be updated via updateUserBoost()function. However, in this function, the total working supply of the respective pool is updated to be equals to the user's new boost.
As seen in the updateUserBoost()above, _calculateBoost()is called in line 11 to determine the user's new boost. This function will take the user's base amount multiplied by the time weighted boost via BoostCalculator.calculateTimeWeightedBoost()to return boosted amount of the user.
Then, in line 22, the pool's working supply is updated to equal to newBoost. This is incorrect as the pool-wide working supply is now only accounting for a single user's boosted amount.
Additionally, this value of poolBoost.workingSupplyis checked for in removeBoostDelegation():
Due to an incorrect value of pool's working supply, the delegation amount will also not be accounted for correctly.
Tracking of the pool boost metrics is inherently incorrect and constantly and unneccesarily updates each time a user's boost is updated. This will then affect the basis of pool-specific boost calculations.
Manual
When updating a user's boost, ensure the user's old boosted amount is deducted from pool's working supply, then adds the user's new boost.
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.