Core Contracts

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

`boostState.minBoost` is being set wrongly in the constructor of `BaseGauge.sol`

Summary

boostState.minBoost is being set wrongly in the constructor of BaseGauge.sol.

// Initialize boost parameters
boostState.maxBoost = 25000; // 2.5x
boostState.minBoost = 1e18;
boostState.boostWindow = 7 days;

Vulnerability Details

minBoost is actualy being set to 1 000 000 000 000 000 000, which is alot biger than maxBoost.
the developer meant to set minBoost to 1x in basis points (10000).

however, this will lead to users earning more rewards than they should as pear in the docs:
Boost multipliers affect reward earnings
as minBoost is used in _applyBoost() and passed to BoostCalculator.calculateBoost() which will return params.maxBoost multiplying users rewards.

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;
}

Impact

Users will be claiming rewardToken more than they should.
however, this is a medium since the owner is able to change boost parameters using BaseGauge.setBoostParameters()

Tools Used

Manual Review.

Recommendations

Set the boostState.minBoost to 10000 or 1e4:

// Initialize boost parameters
boostState.maxBoost = 25000; // 2.5x
- boostState.minBoost = 1e18;
+ boostState.minBoost = 10000; // 1x
boostState.boostWindow = 7 days;
Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 month 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.