The cancel function in the Governance.sol contract contains flawed logic that restricts proposal cancellation in unintended ways. While the intended design allows cancellation by the proposer or when the proposer's voting power falls below the proposalThreshold, the current implementation incorrectly prevents cancellation unless the proposer initiates it or their voting power remains sufficient.
The cancel function is designed to allow a proposal to be canceled in two scenarios:
The caller (msg.sender) is the proposer of the proposal.
The proposer's voting power drops below the proposalThreshold, enabling anyone to cancel it.
However, the current condition of the code is:
This logic incorrectly reverts if the proposer's voting power is still sufficient (>= proposalThreshold), meaning cancellation is only possible when:
The caller is the proposer, or
The proposer's voting power is still above the threshold (contrary to the intended design).
As a result, no one can cancel a proposal when the proposer's voting power drops below the threshold unless they are the proposer, which contradicts the governance protection mechanism.
Reduced governance reliability and transparency.
Potential for proposal manipulation or stalled governance processes.
Manual Review
Update the condition in the cancel function to correctly allow cancellation when the proposer's voting power falls below proposalThreshold. Replace the current flawed check with:
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.