Core Contracts

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

Block re-org on `Governance::proposalId`

Summary

On Governance::propose#L144 function we can see it is using _proposalCount and incrementing it for proposalId

Vulnerability Details

Governance::propose#L144

144:: uint256 proposalId = _proposalCount++; <-@
145:: uint256 startTime = block.timestamp + votingDelay;
146:: uint256 endTime = startTime + votingPeriod;

Impact

Let's say the users are creating new proposals

Now in between a block re-org happens.

So after the re-org the proposalId will get a wrong value.

Like user A's proposal can get the Id of user B, and B might get A's proposalId.

As we can see after creating the proposal all the actions will be performed based on proposalId.

So let's say one user wants to cancel his proposal and he passes the proposalId, but ultimately we can see the proposal he is assuming as his, is not true. Ultimately he got the ownership of another proposalId

Tools Used

Manual

Recommendations

There are a lot of ways to mitigate it.

One is like creating proposalId as a string and tracking it through mapping.

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!