Core Contracts

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

Gauge user base weight is not boosted correctly

Summary

Gauge user base weight is not boosted correctly.

Vulnerability Details

When applies boost multiplier to base weight in _applyBoost(), the boost multiplier is computed in BoostCalculator.calculateBoost().

BaseGauge::_applyBoost()

uint256 boost = BoostCalculator.calculateBoost(
veBalance,
totalVeSupply,
params
);

And boost is in the range of min boost and max boost, which are in basis point.

BoostCalculator::calculateBoost()

// Ensure boost is within bounds
if (boost < params.minBoost) {
return params.minBoost;
}
if (boost > params.maxBoost) {
return params.maxBoost;
}
return boost;

At last, the boot multiplier is multiplied with baseWeight but wrongly divided by 1e18 instead of 10000.

BaseGauge::_applyBoost()

return (baseWeight * boost) / 1e18;

Impact

Gauge user base weight is incorrectly boosted.

Tools Used

Manual Review

Recommendations

- return (baseWeight * boost) / 1e18;
+ return (baseWeight * boost) / 10000;
Updates

Lead Judging Commences

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

BaseGauge reward calculations divide by 1e18 despite using 1e4 precision weights, causing all user weights to round down to zero and preventing reward distribution

Support

FAQs

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

Give us feedback!