Core Contracts

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

Voting Manipulation Risk in voteDirection Function

Summary

The current implementation of BaseGauge::**voteDirection()** allows users to vote multiple times without any restrictions, which can be exploited to manipulate the voting outcome. This flaw poses a risk to the integrity of the voting mechanism and the overall governance model of the contract.

voteDirection()

Vulnerability Details

Code Snippet

The relevant portion of the code is as follows:

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);
}
  1. Lack of Voting Restrictions: The voteDirection function does not implement any restrictions on how many times a user can vote. This allows users to call the function multiple times, potentially skewing the voting results in their favor.

  2. Potential Exploitation: A user with sufficient voting power could repeatedly cast votes in a short period, effectively drowning out the votes of others and manipulating the outcome. This could lead to governance decisions that do not reflect the true consensus of the community.

  3. Impact on Governance: The integrity of the voting process is crucial for decentralized governance. Allowing multiple votes without restrictions undermines the fairness and reliability of the voting mechanism, which could lead to a loss of trust among stakeholders.

Impact

The lack of restrictions on the voting mechanism in the voteDirection function poses significant risks, including:

  1. Voting Manipulation : Users with substantial voting power can exploit the system by casting multiple votes, skewing outcomes in their favor.

Recommendations

To mitigate this risk, the following measures should be implemented:

  1. Restrict Voting Frequency : Introduce a mechanism to limit the number of votes a user can cast within a specific timeframe. This could be done by:

  • Allowing only one vote per user per voting period.

  • Implementing a cooldown period between votes.

Updates

Lead Judging Commences

inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement
inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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

Give us feedback!