Core Contracts

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

The usage of non-checkpointed voting power in Governance may lead to governance manipulation

Summary

Governance::castVote uses the user's latest voting power instead of the voting power at a predefined time from the past.
Since the voting power can be increased by locking more tokens, users are able to manipulate the vote results.

Vulnerability Details

Users can lock Raac tokens to receive veRaac tokens which are used as decaying voting power.
The amount of veRaac tokens minted and initial voting power is given by the following formula:

uint256 initialPower = (amount * duration) / MAX_LOCK_DURATION;

The voting power depends on the amount of locked tokens and on the lock duration.
The voting power decays liniarely to 0 at unlock time.

Governance uses _veToken.getVotingPower(msg.sender) to get an user voting power on castVote.

The getVotingPower]() returns the lates decayed voting power:

function getVotingPower(address account) public view returns (uint256) {
return _votingState.getCurrentPower(account, block.timestamp);
}

The usage of getVotingPower in governance leads to following problems:

  • the same 1000 votingPower is worth more at the beginning of voting period than right before the voting closes.
    The voting period can take up to 4 weeks;

  • an user, unhappy with the proposal's vote result, can increase (or extend) his locked tokens, obtaining more voting power. Then he can vote decisively right before voting period ends, reversing the vote result.

Impact

Governance voting is unfair.
Governance voting is susceptible to manipulation. The manipulation is straight forward: mint more voting power then vote.

Tools Used

Recommendations

Update the Governance::castVote function and use the voting power users had at a predefined time in the past. (eg. when the proposal was created).
The checkpoint sistem implemented in veToken can be used to retrieve the voting power at a specific block.

Updates

Lead Judging Commences

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

Governance.castVote uses current voting power instead of proposal creation snapshot, enabling vote manipulation through token transfers and potential double-voting

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

Governance.castVote uses current voting power instead of proposal creation snapshot, enabling vote manipulation through token transfers and potential double-voting

Support

FAQs

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