The cancel
function is designed (according to its documentation) to automatically cancel a proposal if the proposer’s voting power falls below the required threshold. However, the current implementation does not perform automatic cancellation. Instead, the function only reverts if the proposer’s voting power is insufficient when a non-proposer attempts to cancel, and it does not trigger the cancellation when the proposer’s voting power drops below the threshold.
Affected Function:
Issue:
The comment indicates that the proposal should be automatically cancelled if the proposer’s voting power drops below the required threshold. However, the current code does not automatically cancel the proposal. Instead, it only prevents the cancellation by others if the proposer still meets the voting power requirement, and does not trigger cancellation if the proposer’s voting power decreases.
Expected Behavior:
The proposal should be cancelled automatically when the proposer’s voting power falls below the required threshold, without requiring an external cancellation call. Alternatively, it should allow any user to cancel the proposal if the proposer’s voting power is insufficient, without relying on the proposer’s action.
Inconsistent Proposal State:
Proposals may remain active even after the proposer’s voting power drops below the required threshold, potentially undermining the governance process and causing confusion regarding proposal status.
Manual Code Review
Implement Automatic Cancellation:
Update the cancel
function (or create a separate mechanism) to automatically cancel proposals when the proposer’s voting power falls below the threshold, without requiring any external call to check voting power.
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.