Core Contracts

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

Voting system in BaseGauge contract is not fully implemented and cannot be used for now.

Summary

Voting system in BaseGauge contract includes some functions (voteDirection, processVote), but features are missing and no votes can be effectively registered and used.

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;
}

The userVotesstorage mapping is set in these functions but never used elsewhere.

Impact

The impact of this issue is high as there is no functional voting mechanism while the documentation stipulates voting system is a key feature of this contract.

Tools Used

Manual review.

Recommendations

Make sure to properly implement the gauge voting system.

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!