RAACGauge::setWeeklyEmission allows to set greather value than MAX_WEEKLY_EMISSION and RWAGauge::setMonthlyEmission allows to set greather value than MAX_MONTHLY_EMISSION breaking invariants and leading to hyperinflation of tokens supply
RAACGauge (contracts/core/governance/gauges/RAACGauge.sol) defines a maximum MAX_WEEKLY_EMISSION token emission:
RWAGauge (contracts/core/governance/gauges/RWAGauge.sol) also defines for a max monthly emission
However RAACGauge::setWeeklyEmission
And RWAGauge::setMonthlyEmission
Doesnt verify that emission arguments are less than MAX_WEEKLY_EMISSION and MAX_MONTHLY_EMISSION respectively, so it allows to bypass this invariants
The following PoC shows the described issue
Save the code in test/unit/core/governance/gauges/RAACGauge.test.js under "Period Management" section:
Start a node and execute the following test:
Observe max emission limits are bypassed
Lacks of checks in RAACGauge::setWeeklyEmission and RWAGauge::setMonthlyEmission allows to set greather value than MAX_WEEKLY_EMISSION and MAX_MONTHLY_EMISSION breaking invariants
leading to hyperinflation on token supply
Manual Review
Implements checks on RAACGauge::setWeeklyEmission and RWAGauge::setMonthlyEmission
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.