Core Contracts

Regnum Aurum Acquisition Corp
HardhatReal World AssetsNFT
77,280 USDC
View results
Submission Details
Severity: low
Valid

Min Boost is greater than max Boost in `BaseGauge`

Summary

In BaseGauge, minBoost is incorrectly set higher than maxBoost, leading to calculation errors in boost computation.

Vulnerability Details

The constructor initializes the boost parameters as follows:

/contracts/core/governance/gauges/BaseGauge.sol:140
140: // Initialize boost parameters
141: boostState.maxBoost = 25000; // 2.5x
142: boostState.minBoost = 1e18; // @audit : why min_boost is less than max_boost ?

Here we can see that minBoost and greater then maxBoost. This incorrect assignment affects boost calculations in BoostCalculator::calculateBoost() function:

/contracts/libraries/governance/BoostCalculator.sol:76
88: // Calculate boost within min-max range
89: uint256 boostRange = params.maxBoost - params.minBoost; <@
90: uint256 boost = params.minBoost + ((votingPowerRatio * boostRange) / 1e18);

Since minBoost > maxBoost, calculating boostRange will result in underflow error.

Although setBoostParameters function exists to update these values. But if setBoostParameters is not called on time, the incorrect values persist, leading to miscalculations.

Impact

Incorrect boost calculations may lead to improper reward distribution.

Tools Used

Manual Review

Recommendations

Ensure correct initialization of minBoost and maxBoost in BaseGauge constructor.

Updates

Lead Judging Commences

inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Validated
Assigned finding tags:

boostState.minBoost is set to 1e18

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!