Core Contracts

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

Inconsistent Voting Period End Check Allows Vote Manipulation

Summary

In Governance::state, the check for whether voting is still active uses block.timestamp < proposal.endTime, but in Governance::castVote users can vote when block.timestamp == proposal.endTime. This inconsistency creates a race condition where votes cast if the block is mined in the proposal.endTime may not be counted if the proposal state is checked in the same time.

Vulnerability Details

  1. castVote allows voting when block.timestamp == proposal.endTime

  2. state considers voting ended when block.timestamp >= proposal.endTime

  3. Both functions can be called in the same block

Impact

This race condition could allow manipulation of proposal outcomes by:

  • Preventing legitimate last-minute votes from being counted

  • Enabling premature proposal execution before all valid votes are tallied

  • Creating uncertainty about whether votes will be counted in the final block

Recommendations

Make the end time check consistent between state and castVote:

// In state function
- if (block.timestamp < proposal.endTime) return ProposalState.Active;
+ if (block.timestamp <= proposal.endTime) return ProposalState.Active;

This ensures votes cast in the final block are always counted before the proposal state can change.

Additionally, consider adding a buffer period between voting end and execution to prevent race conditions.

Updates

Lead Judging Commences

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

Governance::state and Governance::castVote use inconsistent time boundary checks, allowing votes at exactly proposal.endTime when state shows inactive

Support

FAQs

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

Give us feedback!