Core Contracts

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

An attacker can call `veRAACToken.sol::recordVote()` on behalf of voter, leading to unintended vote to a proposal.

Summary

The recordVote() function is used to track user vote, but it can be called by anyOne.

function recordVote(
address voter,
uint256 proposalId
) external {
if (_hasVotedOnProposal[voter][proposalId]) revert AlreadyVoted();
_hasVotedOnProposal[voter][proposalId] = true;
uint256 power = getVotingPower(voter);
emit VoteCast(voter, proposalId, power);
}

Vulnerability Details

  • An attacker can call recordVote() function without voter consent.

  • Means even if voter doesn't wishes to vote; his vote is being used in proposal favor.

  • An attacker can create a malicious proposal and then do above process.

  • Causing threat to protocol's system.

Impact

  • voting on malicious proposal without user consent .

Tools Used

Manual

Recommendations

replace _hasVotedOnProposal[voter][proposalId] with _hasVotedOnProposal[msg.sender][proposalId]

Updates

Lead Judging Commences

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

veRAACToken::recordVote lacks access control, allowing anyone to emit fake events

Support

FAQs

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