DAOs
Timelock
A smart contract mechanism that enforces a mandatory delay before a governance proposal can be executed.
Last Updated
2026-03-29
Related Concepts
What is Timelock?
A timelock is a smart contract that enforces a mandatory delay between a governance proposal being approved and it being executed. It gives the community time to react before changes take effect.
How does Timelock work?
- A proposal passes the community vote.
- Instead of executing immediately, it enters a queue in the timelock contract.
- The delay period begins typically 1 to 7 days depending on the protocol.
- If a bug or attack is discovered, the DAO can cancel the queued proposal before execution.
- After the delay, anyone can trigger execution.
Why does Timelock matter?
It is the primary defense against governance attacks. If an attacker acquires enough votes to pass a malicious proposal, the timelock window allows the community to respond and cancel it.
Key features of Timelock
- Mandatory delay cannot be bypassed by anyone
- Queued proposals can be cancelled during the delay window
- Delay length varies by proposal severity
- Often combined with emergency multisigs for urgent situations
Examples of Timelock
Aave uses a 1-day timelock for parameter changes and 7 days for protocol upgrades. Compound and MakerDAO use timelocks scaled to change severity.
OpenZeppelin's Governor contract includes a built-in timelock pattern.
