In the BoostController.sol contract the MAX_BOOST constant is used instead of the boostState.maxBoost variable when calculating boost through _calculateBoost, which can lead to incorrect boost calculations if the maximum boost value is updated.
The vulnerability arises from the use of the MAX_BOOST constant in the _calculateBoost function. The MAX_BOOST constant represents the default maximum boost value, but the actual maximum boost value can be updated and stored in the boostState.maxBoost variable. By using the constant instead of the variable, the function may calculate incorrect boost amounts if the maximum boost value has been changed.
If the maximum boost value is updated, the _calculateBoost function will continue to use the outdated MAX_BOOST constant, leading to incorrect boost calculations. This can result in users receiving higher or lower boosts than intended, affecting the fairness and accuracy of the boost system. Over time, this can undermine user trust and the integrity of the protocol.
Manual Review
To mitigate this vulnerability, replace the use of the MAX_BOOST constant with the boostState.maxBoost variable in the _calculateBoost function. Here is an example of how to implement this:
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.