getWorkingBalance() in BoostController.sol reads user boost values without requiring prior state updates via updateUserBoost(). This can lead to incorrect working balance calculations that affect reward distributions and voting power.
In BoostController.sol, getWorkingBalance() retrieves values from userBoosts mapping:
The userBoosts mapping only gets populated when updateUserBoost() is called. Without a prior call to updateUserBoost(), userBoost.amount remains at its default value of 0, leading to incorrect working balance calculations.
This working balance is used in critical functions like reward calculations in BaseGauge.sol:
Users may receive incorrect rewards if their working balance is not properly initialized
Voting power calculations may be inaccurate, affecting governance
Boost multipliers may not be properly applied to staking positions
Manual Review
Add state synchronization:
Make getWorkingBalance() call updateUserBoost() internally:
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.