Core Contracts

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

Gauges type weight not applied during total weight calculation

Summary

Rewards are distributed proportionally to the relative gauges weight, this is the fraction of the gauge weight and the sum of all the weights. The relative weight of each gauge can be uniquely determined by the product of its weight and type weight. The total weight calculation as of now is:

function getTotalWeight() public view override returns (uint256) {
uint256 total = 0;
// This could be optimized by maintaining a running total
for (uint256 i = 0; i < _gaugeList.length; i++) {
if (gauges[_gaugeList[i]].isActive) {
total += gauges[_gaugeList[i]].weight;
}
}
return total;
}

It can be easily observed that the type weight is being ignored. This will result in an increased total weight and therefore a smaller reward distribution rate.

Vulnerability Details

Impact

Tools Used

Manual review.

Recommendations

Apply type weight.

Updates

Lead Judging Commences

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

GaugeController::_calculateReward uses combined weight of all gauge types instead of type-specific weights, causing incorrect reward distribution between RWA and RAAC gauges

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

GaugeController::_calculateReward uses combined weight of all gauge types instead of type-specific weights, causing incorrect reward distribution between RWA and RAAC gauges

Support

FAQs

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