The updateUserBoost
function incorrectly updates the pool's working supply by directly setting it to a single user's boost value, instead of properly accounting for all users' contributions.
In the updateUserBoost
function, the pool's working supply is updated using direct assignment:
Here, the working supply is directly set to newBoost
instead of being incrementally updated. This overwrites the entire pool's working supply with a single user's boost value and also the cumulative nature of the working supply is not preserved.
Loss of working supply data for all other users in the pool
Incorrect boost calculations for the entire pool
Unfair advantage to the last user updating their boost
Manual code review
The working supply should be updated incrementally, similar to how totalBoost
is updated:
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.