Timelock Controller Explained in Detail
A timelock controller queues operations and blocks execution until a delay has passed. It often uses proposer, executor, and admin roles.
The delay gives users and monitors time to react before high-impact changes take effect.
Smart contract example
schedule operation -> wait delay -> execute operation
The operation usually includes a target, value, calldata, predecessor, and salt.
Timelock Controller in Auditing
Timelocks protect upgrades, treasury transfers, oracle changes, and governance actions. If the timelock can be bypassed or roles are too broad, the protection is mostly cosmetic.
Auditors review role assignment and operation lifecycle.
Red flags in code
-
Delay is zero or too short for critical actions.
-
Proposer role is open to untrusted callers.
-
Executor role can execute unintended queued operations.
-
Admin can bypass the timelock.
-
Batch operations have surprising ordering effects.
How to test or review it
-
Schedule and execute operations before and after the delay.
-
Test unauthorized proposer, executor, and canceller callers.
-
Review role admin relationships.
-
Test cancellation and predecessor dependencies.
-
Verify critical admin targets are controlled only through the timelock.