The Governance contract’s proposal cancellation functionality emits an event with a hardcoded reason that inaccurately indicates the cancellation was performed by the proposer, even in cases where a third party cancels the proposal due to the proposer's voting power falling below the required threshold.
In the cancel() function, the cancellation condition permits either the original proposer to cancel their proposal or any other address to cancel it if the proposer’s voting power is still above the threshold. The relevant code snippet is as follows:
After the cancellation conditions are satisfied, the proposal is marked as canceled and the event is emitted with a fixed message:
This implementation always uses the reason "Proposal canceled by proposer" regardless of whether the cancellation was initiated by the proposer or by a third party (due to the proposer's insufficient voting power). Consequently, if a non-proposer cancels the proposal because the proposer's voting power falls below the threshold, the event will still misleadingly report that the proposal was canceled by the proposer.
This inconsistency can lead to confusion and misinterpretation of governance activity. Stakeholders reviewing event logs may incorrectly assume that only the proposer has the authority to cancel a proposal, which undermines the transparency of the governance process.
Manual Review
Modify the event emission in the cancel() function to accurately reflect the actor responsible for cancellation. For example, use a conditional message or include additional data in the event to indicate whether the cancellation was performed by the proposer or by a third party due to insufficient voting power. One approach could be:
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.