The minBoost
value in BaseGauge
is incorrectly set to 1e18
instead of 10000
, causing arithmetic overflow in _applyBoost()
when calculating boost values. This blocks reward distribution as the getUserWeight()
function, which is critical for reward calculations, reverts due to the overflow.
In the BaseGauge
constructor, minBoost
is set to 1e18:
This value is used in _applyBoost()
which is called by getUserWeight()
to calculate rewards. The large value causes arithmetic overflow when multiplying with the base weight, making reward distribution impossible.
Then in BoostCalculator.sol
, the boost value is calculated as follows:
The value should be 10000 (1x) like in the BoostController
contract, as boost values are meant to be multipliers in basis points.
The contract is completely broken as users cannot receive rewards due to the arithmetic overflow in the boost calculation. This affects core functionality and leads to locked rewards that cannot be distributed.
Key points:
All reward distributions fail due to reverts in getUserWeight()
Users cannot claim earned rewards
Affects all gauge implementations inheriting from BaseGauge
Manual review
Add the following test case to the test/unit/core/governance/gauges/GaugeController.test.js
file:
Change the minBoost
value in the constructor to 10000:
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.