Core Contracts

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

`BaseGauge::voteDirection` implementation is never used

Summary

The BaseGauge::voteDirection contract implements a voting mechanism through where users with veRAACToken can vote on emission directions (0-10000). The system tracks votes in the userVotes mapping and maintains a totalVotes counter, but these values are never utilized to affect the emission rate or any other parameter in the system.

Vulnerability Details

function voteDirection(uint256 direction) public whenNotPaused updateReward(msg.sender) {
if (direction > 10000) revert InvalidWeight();
uint256 votingPower = IERC20(IGaugeController(controller).veRAACToken()).balanceOf(msg.sender);
if (votingPower == 0) revert NoVotingPower();
@> totalVotes = processVote(
userVotes[msg.sender],
direction,
votingPower,
totalVotes
);
emit DirectionVoted(msg.sender, direction, votingPower);
}
function processVote(
VoteState storage vote,
uint256 direction,
uint256 votingPower,
uint256 totalVotes
) internal returns (uint256) {
if (direction > 10000) revert InvalidWeight();
if (votingPower == 0) revert NoVotingPower();
uint256 newTotalVotes = totalVotes - vote.weight + votingPower;
@> vote.direction = direction;
@> vote.weight = votingPower;
@> vote.timestamp = block.timestamp;
@> return newTotalVotes;
}

Impact

While the contract stores vote information and emits events, the voting data is never used to influence the system's behavior. The weightPeriod variable, which is intended to track time-weighted averages, is never updated with the voting results. In this way, votes cast by veRAACToken holders have no effect on the system. User believe to partecipate with their vote but their votes have no impact.
The emission rate control mechanism described in the documentation is non-functional (ref. RAACGauge.md and RWAGaude.md BaseGauge inheritance notes section: Time-weighted vote tracking for RAAC token emissions directionality voting).

Tools Used

Manual review

Recommendations

Implement proper integration or delete the voting process.

Updates

Lead Judging Commences

inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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

Give us feedback!