Core Contracts

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

Missing Account Parameter Usage in _getBaseWeight Function

Summary

The _getBaseWeight function in the BaseGauge contract accepts an account parameter but doesn't use it when calculating the base weight. Instead, it returns the gauge weight without accounting for the specific user, which could lead to incorrect reward calculations and distribution.

Vulnerability Details

In the BaseGauge contract, the _getBaseWeight function has the following implementation:

function _getBaseWeight(address account) internal view virtual returns (uint256) {
//@audit not using account?
return IGaugeController(controller).getGaugeWeight(address(this));
}

This function receives an account parameter but ignores it entirely, returning only the global gauge weight. This presents a serious issue as the function is designed to provide user-specific weight information but fails to do so.
The function is virtual and intended to be overridden by child contracts, but the contracts RAACGauge and RWAGauge.

Impact

This function is used in getUserWeightwhich is used in the earned function, this means all users may receive the same base weight regardless of their individual contributions or balances.
this breaks the financial accounting of the Gauge system as high-contributing users might receive the same rewards as low-contributing users, undermining the economic incentives of the protocol.

Tools Used

Manual review

Recommendations

Modify the _getBaseWeight function to incorporate user-specific weight

Updates

Lead Judging Commences

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

BaseGauge._getBaseWeight ignores account parameter and returns gauge's total weight, allowing users to claim rewards from gauges they never voted for or staked in

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

BaseGauge._getBaseWeight ignores account parameter and returns gauge's total weight, allowing users to claim rewards from gauges they never voted for or staked in

Support

FAQs

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