Core Contracts

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

Total weight for all gauges can be greater than 10 000 in GaugeController contract.

Summary

setTypeWeight function in GaugeController contract is defined as follows:

function setTypeWeight(GaugeType gaugeType, uint256 weight) external onlyRole(GAUGE_ADMIN) {
if (weight > MAX_TYPE_WEIGHT) revert InvalidWeight();
uint256 oldWeight = typeWeights[gaugeType];
typeWeights[gaugeType] = weight;
emit TypeWeightUpdated(gaugeType, oldWeight, weight);
}

The problem arises because each type (RWA or RAAC) can be set to a value up to 10000, but the sum of the weight for RWA or RAAC shouldn't exceed 10000.

This is incorrect and may lead to issues with rewards distribution in the different gauges.

Impact

The impact of this issue is medium.

Tools Used

Manual review.

Recommendations

Ensure that the sum of the gauge weights is 10 000.

Updates

Lead Judging Commences

inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement
inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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

Give us feedback!