In the BaseGauge contract, user votes don’t change the weights used to calculate rewards. The protocol aims to track user and gauge weights, but the voting system (voteDirection) updates vote totals without connecting them to the weights that decide how rewards are shared. This means votes don’t influence rewards as they should, affecting RWAGauge and RAACGauge too.
This issue starts in the BaseGauge contract, which is the foundation for other contracts like RWAGauge and RAACGauge. The voteDirection function lets users vote on a “direction” (like how rewards should be split). Here’s what it does:
It takes a user’s vote (e.g., a number from 0 to 10,000) and their voting power (based on the veToken balance).
It updates totalVotes ( Total votes across all users) and userVotes (details of each user’s vote).
But it stops there, it doesn’t update anything about weights used for rewards.
Weights are tracked in a part of the contract called PeriodState, which includes votingPeriod
votingPeriod is supposed to track weights over time, but it doesn’t use totalVotes or userVotes.
The contract also has a function called updatePeriod that refreshes weights for each new time period. This is where Weights Should Change, But Don’t
It takes the average weight from the last period (avgWeight) and uses it for the next period.
The Problem is that It doesn’t look at totalVotes or user votes from voteDirection. The new weights ignore what users voted for.
Another function, getTimeWeightedWeight, shows the current weight
Rewards depend on a user’s weight, calculated in getUserWeight:
_getBaseWeight gets the gauge’s weight from another contract (IGaugeController):
According to the protocol, Rewards are intended to be distributed based on user weights. But totalVotes from voteDirection isn’t sent to the controller or used here.
Users vote on how rewards should be shared (like yield or emission direction), but their votes don’t matter.
Rewards stay based on old weights or controller settings, not what users want.
The protocol aims to track weights, but without votes updating them, it fails to do this properly.
People using RWAGauge or RAACGauge might think their votes change rewards, but they don’t, which could upset them or make the system seem unfair.
Manual Review
Change voteDirection to update votingPeriod with totalVotes.
Use the existing _updateWeights function to tie votes to votingPeriod.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.