The BaseGauge contract initializes boostState.minBoost to 1e18 instead of 10000 (1x in basis points). This causes the _applyBoost function's boost calculation to fail due to arithmetic underflow when subtracting minBoost from maxBoost in the BoostCalculator::calculateBoost function.
In BaseGauge::constructor, the boost parameters are initialized incorrectly:
This value is then used in `BaseGauge::_applyBoost` which passes it on to BoostCalculator::calculateBoost:
POC
BaseGauge is deployed with minBoost = 1e18 and maxBoost = 25000
User calls BaseGauge::stake to stake tokens
When calculating rewards via BaseGauge::earned, it calls getUserWeight
getUserWeight calls _applyBoost which uses BoostCalculator::calculateBoost
The calculation 25000 - 1e18 reverts due to underflow since maxBoost is much smaller than minBoost
All reward calculations will fail due to the revert in boost calculations making users unable to earn or claim rewards. The gauge system becomes non-functional
Manual review
Fix the minBoost value in the constructor:
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.