Core Contracts

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

Incorrect Voting Power Calculation in BaseGauge::voteDirection Function

Summary

The voteDirection function allows users to vote with a direction parameter, utilizing their voting power. However, instead of calling getVotingPower, it directly checks the balance of veRAACToken for the voting power calculation.

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

The balance of veRAACToken does not necessarily represent the actual voting power. The getVotingPower function implement additional logic (such as time-weighting), meaning users might have different effective voting power than their token balance suggests.

If the voting power depends only on balanceOf, users will transfer tokens to other account and vote multiple times, artificially inflating their voting influence.

Impact

Users could transfer tokens to multiple wallets and vote multiple times.

Tools Used

Manual Review

Recommendations

Use getVotingPower(msg.sender) Instead of balanceOf(msg.sender);

Updates

Lead Judging Commences

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

BaseGauge::_applyBoost, GaugeController::vote, BoostController::calculateBoost use balanceOf() instead of getVotingPower() for vote-escrow tokens, negating time-decay mechanism

Support

FAQs

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