The _calculateBoost function in the BoostController contract calculates a user’s boosted rewards based on their veToken balance. However, it contains an issue where the maximum boost amount is determined using a hardcoded constant (MAX_BOOST) rather than the dynamically set boostState.maxBoost. This inconsistency can lead to incorrect boost calculations, potentially affecting reward distribution and user incentives.
Affected Code
and
Issue: The function uses MAX_BOOST instead of boostState.maxBoost, which means that if the maximum boost percentage is updated in the setBoostParameters, this function will not reflect the new value.
Potential Consequence:
Users could receive a lower boost than intended if boostState.maxBoost is increased.
If boostState.maxBoost is decreased, some users might receive an unfairly high boost, leading to unfair rewards distribution.
Incorrect Reward Distribution: Users may not receive the correct boost, leading to losses in incentives or excessive rewards for some users.
Manual Review
Use boostState.maxBoost Instead of MAX_BOOST
Modify the code to dynamically use boostState.maxBoost:
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.