The cancel function does not check if the proposal is already canceled before proceeding with the cancellation logic. This could lead to redundant cancellations and unnecessary state changes.
The function checks if the proposal is in the Executed state but does not check if it is already in the Canceled state.
If a proposal is already canceled, calling cancel again will still set proposal.canceled = true and emit an event, even though no state change occurs.
Redundant cancellations could emit misleading events or cause confusion for off-chain systems monitoring the contract.
While not critical, this could lead to inefficiencies and unnecessary gas consumption.
Manual Review
Add a check to ensure the proposal is not already canceled before proceeding with the cancellation logic.
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.