In governance.sol
vote handling after proposal cancellation. When a proposal is cancelled, the system still allows voting to occur and counts these votes, which should not be possible. This creates an inconsistent state where:
A proposal is be officially cancelled
Yet still accumulate votes
These votes are recorded and counted
The voting power is still tracked
The proposal remains in a state where it's simultaneously cancelled but actively collecting votes
This breaks the fundamental governance flow and security assumptions about proposal lifecycle management. Caused from missing state validation in the castVote()
function, which doesn't properly check if a proposal is in a cancelled state before allowing votes.
The root cause is in the castVote()
function's insufficient state validation:
Proof of code:
Flow:
Initial Setup and Proposal Creation:
Proposal Cancellation:
Post-Cancellation Voting (Should Not Be Possible):
Vote Counting Still Active:
Vote Recording Still Active:
The test output shows:
Normal Scenario Should Be:
Proposal Created -> Active
Proposal Cancelled
All subsequent vote attempts should revert
No vote counting should occur
No vote recording should happen
Proposal should be permanently locked in cancelled state
Current Broken Scenario:
1. Proposal Created -> Active
Proposal Cancelled
Votes still accepted
Votes still counted
5. Votes still recorded
Proposal in inconsistent state (cancelled but accepting votes)
Direct Governance Manipulation
Cancelled proposals remain votable
Votes are counted and recorded after cancellation
Creates parallel governance state where cancelled proposals still accumulate power
Cancelled proposals still affect voting metrics
skew governance statistics and historical data
Vote power is still consumed on cancelled proposals
Add a check to revert if a vote want to be casted on a canceled vote
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.