The TimelockController
is designed to enforce a delay for governance actions, including emergency actions that are supposed to wait 1 day (EMERGENCY_DELAY
) before execution. However, the code allows instant emergency execution without enforcing any on-chain delay. This contradicts the documentation and can enable a privileged user with the EMERGENCY_ROLE
to bypass the expected 1-day timelock, pushing protocol changes immediately.
Documentation on TimelockController, section Usage, states:
In the TimelockController
contract, the two relevant functions are:
Suppose the protocol states that emergency actions require a 1-day delay, giving token holders or the broader community time to notice and respond to potential drastic changes. Instead, anyone controlling the EMERGENCY_ROLE
can do the following instantly in consecutive transactions.
Timelock Bypass: The core premise of a timelock is giving stakeholders a buffer period to react. This vulnerability breaks that assumption for emergency actions.
Immediate Execution Risk: If the EMERGENCY_ROLE
key is compromised or used maliciously, the attacker can push arbitrary changes instantly, potentially seizing funds or breaking the protocol.
Documentation Mismatch: The protocol documents a 1-day delay for emergency operations, yet the code offers none. This misleads users and governance participants who believe they have 24 hours to respond.
Manual Review, Hardhat.
This test can be added at the end of the describe
block: "Emergency Actions", in the file "test/unit/core/governance/proposals/TimelockController.test.js".
Add a Timelock Check for Emergency Actions:
Include a timestamp in scheduleEmergencyAction
:
In executeEmergencyAction
, require:
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.