Core Contracts

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

Precision loss in `GuageController::_distributeToGauges` function

Summary

This is due to the following line of code in the function:

uint256 gaugeShare = (amount * gaugeWeights[i]) /
totalTypeWeight;

Vulnerability Details

At the end of the function the sum of all of the gaugeShare variables may be smaller than the amount input because of precision loss. Because of this some dust amount will be left undistributed

Impact

Because of this some dust amount may left undistributed

Tools Used

Manual Review

Recommendations

track the total sum of shares and compare them to the amount input. if the they are less, notify the rewards to the last gauge or to the biggest one

Updates

Lead Judging Commences

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

GaugeController's _distributeToGauges function leaves revenue undistributed due to integer division truncation when calculating gauge shares

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

GaugeController's _distributeToGauges function leaves revenue undistributed due to integer division truncation when calculating gauge shares

Support

FAQs

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

Give us feedback!