The cancel function in the Governance contract does not call the corresponding cancel function in the TimeLock contract. This omission creates an inconsistent state where a canceled proposal remains scheduled in the TimeLock contract and can still be executed by an admin, leading to potential unintended consequences.
Governance Contract:
The cancel function marks the proposal as canceled but does not call the cancel function in the TimeLock contract.
TimeLock Contract:
The cancel function in the TimeLock contract allows an admin to cancel a scheduled operation.
When a proposal is canceled in the Governance contract, it only marks the proposal as canceled locally (proposal.canceled = true) but does not propagate this cancellation to the TimeLock contract. As a result, the proposal remains scheduled in the TimeLock contract and can still be executed by an admin, leading to an inconsistent state between the two contracts.
Inconsistent State:
A canceled proposal remains scheduled in the TimeLock contract, creating a mismatch between the Governance and TimeLock states.
Unintended Execution:
An admin with the EXECUTOR_ROLE in the TimeLock contract can still execute the canceled proposal, leading to unintended and potentially harmful actions.
Manual Code Review
Update the cancel function in the Governance contract to call the cancel function in the TimeLock contract. This ensures that the cancellation is propagated to the TimeLock contract, maintaining consistency between the two contracts.
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.