Core Contracts

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

everybody can record vote onBehalf of others

Summary

recordVote function in veRaacToken.sol allows everybody to record vote onBehalf of others

Vulnerability Details

in recordVote function in veRaacToken.sol users record vote by giving input of address of Voter and proposal id to vote for specific proposal id

issue in here is users can give address of others for address of voter and function doesnt event check that if the address they give is matching with msg.sender address or has allowed specific account to vote onbehalf of him

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

Impact

everybody can vote on behalf of others, there is no check to make sure caller has authorithy on voting on behalf of them or owns the voter address in anyway its just open to everybody. and probably will cause voting manipulations and creates whole lot of issues which would eventually cause really costly attacks

Tools Used

vs code

Recommendations

  • consider adding a check that reverts if caller msg.sender is not voter address

  • or consider adding mechanism where user gives allowance for other user to vote on behalf of them

Updates

Lead Judging Commences

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

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

inallhonesty Lead Judge 3 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.