Core Contracts

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

`boostState.minBoost` should be denominate in basis points in `BaseGauge`

Summary

in the BaseGauge constructor the boostState.minBoost is denominated in 18 decimals instead of basis points.

Vulnerability Details

This will lead to total DoS of the BaseGauge contract because of the following block of code in the BoostCalculator::calculateBoost function:

function calculateBoost(
uint256 veBalance,
uint256 totalVeSupply,
BoostParameters memory params
) internal pure returns (uint256) {
// Return base boost (1x = 10000 basis points) if no voting power
if (totalVeSupply == 0) {
return params.minBoost;
}
// Calculate voting power ratio with higher precision
uint256 votingPowerRatio = (veBalance * 1e18) / totalVeSupply;
// Calculate boost within min-max range
@> uint256 boostRange = params.maxBoost - params.minBoost;
uint256 boost = params.minBoost +
((votingPowerRatio * boostRange) / 1e18);
// Ensure boost is within bounds
if (boost < params.minBoost) {
return params.minBoost;
}
if (boost > params.maxBoost) {
return params.maxBoost;
}
return boost;
}

Since maxBoost == 25000 and minBoost == 1e18 this line will always revert, leading to full DoS of the contract because the calculateBoost function is practically called in every core function in the contract like stake, withdraw, etc.

Normally this wouldn't be a problem since there is GaugeController that could upgrade the minBoost, but in this case the GaugeController doesn't have the implementation to call the setBoostParameters function, which leads to full contract DoS

Impact

Full DoS of both RWAGauge and RAACGauge

Tools Used

manual review

Recommendations

Fix the value in the constructor or implement a way for GaugeController to fix the value

Updates

Lead Judging Commences

inallhonesty Lead Judge 3 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.