Core Contracts

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

Canceled proposals are stored in the `TimelockController` as valid proposals

Summary

In Governance.sol, when a proposal is canceled via the cancel() function, it only sets proposal.canceled = true but does not call _timelock.cancel() to remove the operation from the TimelockController's storage. This leaves the canceled proposal's operation data permanently stored in the timelock contract.

function cancel(uint256 proposalId) external override {
// ... validation checks ...
proposal.canceled = true;
// Missing: _timelock.cancel(id);
emit ProposalCanceled(proposalId, msg.sender, "Proposal canceled by proposer");
}

Impact

Canceled proposals are stored in the TimelockController as valid proposals.

Tools Used

Manual Review

Recommendations

Add the timelock cancellation call in the Governance's cancel() function:

function cancel(uint256 proposalId) external override {
...
+ bytes32 id = _timelock.hashOperationBatch(
+ proposal.targets,
+ proposal.values,
+ proposal.calldatas,
+ bytes32(0),
+ proposal.descriptionHash
+ );
+ _timelock.cancel(id);
proposal.canceled = true;
...
}
Updates

Lead Judging Commences

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

Governance::cancel and state lack synchronization with TimelockController

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

Governance::cancel and state lack synchronization with TimelockController

Support

FAQs

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

Give us feedback!