Core Contracts

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

Incorrect error message when queuing already pending proposal

Summary

The Governance::_queueProposal() function throws a ProposalAlreadyExecuted error when a proposal is already queued, which incorrectly represents the proposal's state and can confuse users.

Vulnerability Details

In Governance::_queueProposal(), when checking if a proposal is already queued using isOperationPending(), the error message indicates the proposal is executed rather than queued:

if (_timelock.isOperationPending(id)) {
revert ProposalAlreadyExecuted(proposalId, block.timestamp); // Incorrect error
}

The root cause is a mismatch between the check being performed (isOperationPending()) and the error being thrown (ProposalAlreadyExecuted). The function is checking if the proposal is pending in the timelock, but throwing an error suggesting it has already been executed.

Impact

The incorrect error message can:

  • Lead to incorrect assumptions about proposal execution status

  • Create inconsistency in error handling across the protocol

Recommendations

Create New Error Type
Create a specific error for queued proposals and use it instead:

+ error ProposalAlreadyQueued(uint256 proposalId, bytes32 operationId);
function _queueProposal(uint256 proposalId) internal {
// ...
if (_timelock.isOperationPending(id)) {
- revert ProposalAlreadyExecuted(proposalId, block.timestamp);
+ revert ProposalAlreadyQueued(proposalId, id);
}
// ...
}
Updates

Lead Judging Commences

inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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

Give us feedback!