Core Contracts

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

None of the gauge functions call updateWeights() leading to incorrect updates and rewards

Description & Impact

_updateWeights() needs to be called after actions like casting of vote via voteDirection() or update of period via updatePeriod(). But this is never done currently in the implementation.

This would ensure that:

  • When users vote on direction, their votes are properly weighted over time

  • When periods roll over, the weights are carried forward correctly

The lack of these calls means the time-weighted average functionality for weights isn't being fully utilized, which could affect how voting power influences reward distribution over time.

Mitigation

Call _updateWeights() from inside these two functions and any other which need to update the vote weights or period.

Updates

Lead Judging Commences

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

BaseGauge::stake, voteDirection and withdraw don't call _updateWeights, causing outdated time-weighted average calculations that lead to unfair reward distribution

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

BaseGauge::stake, voteDirection and withdraw don't call _updateWeights, causing outdated time-weighted average calculations that lead to unfair reward distribution

Support

FAQs

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