Core Contracts

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

Cancelled proposals can still be voted on.

Summary

The contract’s castVote function does not check whether a proposal has been canceled, allowing users to continue voting on a proposal that should no longer be active.

Vulnerability Details

In Governance::cancel a proposal gets cancelled and proposal.canceled = true. But in Governance::castVote which allows a user to cast vote on a specified proposal, there is no check to ensure that the proposal has not been canceled. Instead it only checks that the proposal startTimeis not zero(which indicates a non-existent proposal) and is being called before the endTime. These parameters were not reset during cancelation of proposal. And the proposal.canceledis not explicitly checked and enforced.

https://github.com/Cyfrin/2025-02-raac/blob/89ccb062e2b175374d40d824263a4c0b601bcb7f/contracts/core/governance/proposals/Governance.sol#L181

Impact

Canceled proposals will potentially receive votes which is needless.

Tools Used

Manual Review

Recommendations

Either reset the startTime of a proposal during cancelation to 0. so the check in castVotescan catch this. OR, add a check in castVotes that reverts if (proposal.canceled).

Updates

Lead Judging Commences

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

Governance::castVote lacks canceled/executed proposal check, allowing users to waste gas voting on proposals that can never be executed

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

Governance::castVote lacks canceled/executed proposal check, allowing users to waste gas voting on proposals that can never be executed

Support

FAQs

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

Give us feedback!