Core Contracts

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

precision loss in distributeRevenue.

Summary

Here in the distributeRevenue we are doing rounding down so there is a precision loss.

we are losing the remaining amount.

Vulnerability Details

function distributeRevenue(
GaugeType gaugeType,
uint256 amount
) external onlyRole(EMERGENCY\_ADMIN) whenNotPaused {
if (amount == 0) revert InvalidAmount();
uint256 veRAACShare = amount * 80 / 100; // 80% to veRAAC holders
uint256 performanceShare = amount * 20 / 100; // 20% performance fee
revenueShares[gaugeType] += veRAACShare;
_distributeToGauges(gaugeType, veRAACShare);
emit RevenueDistributed(gaugeType, amount, veRAACShare, performanceShare);
}

Impact

amount-eRAACShare-performanceShare will get lost.

Tools Used

Recommendations

send the remaining amount-eRAACShare-performanceShare .

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!