The function allows the controller to set arbitrary maxBoost, minBoost, and boostWindow values. There are no checks to ensure that maxBoost is within a reasonable range (like the previous 25000 or 50000 basis points). This could allow a malicious or compromised controller to set excessively high boosts, leading to inflated rewards and potential token inflation.
The maxBoost parameter int the setBoostParameters function controls the maximum boost multiplier users can get, which directly affects how many rewards they receive. If there's no cap, a malicious or compromised controller could set this to a very high value, leading to inflated rewards and potential token inflation.
Looking at the code, the setBoostParameters function is indeed only restricted by the onlyController modifier, which means only the controller can call it. However, there's no check on the values of _maxBoost, _minBoost or _boostWindow.
POC
I created a Test using the scenario below:
Deploy BaseGauge with initial maxBoost = 25000 (2.5x).
Attacker gains control of the controller role.
Controller sets maxBoost = 50000 (5x).
User stakes tokens and claims rewards, receiving 5x the intended amount.
Test Results:
Outcome: User receives 5x rewards instead of the intended 2.5x.
Impact: Protocol’s reward reserves are drained 2x faster than designed.
A malicious or compromised controller can set maxBoost
to extreme values, allowing users to claim inflated rewards and drain the protocol’s token reserves.
Add validation to restrict maxBoost to a safe limit:
After Fix result
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
View preliminary resultsAppeals are being carefully reviewed by our judges.
The contest is complete and the rewards are being distributed.