Core Contracts

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

Incorrect base wight calculation in gauges

Summary

Users can provide liquidity to the guage and in exchange they will receive part of the rewards. The weight a user has in a gauge is determined by the base weight, associated to the staked amount and a boost determined according to the veToken holdings.

The current codebase is not properly calculating calculating the base weight assuming it to be the gauge weight in the controller instead of the user's staked amount:

function _getBaseWeight(
address account
) internal view virtual returns (uint256) {
return IGaugeController(controller).getGaugeWeight(address(this));
}

Vulnerability Details

Impact

Tools Used

Manual review.

Recommendations

Base weight is the staked amount.

Updates

Lead Judging Commences

inallhonesty Lead Judge 6 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 6 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.