Timelocks and Execution
Safe upgrades.
Why Timelocks Exist
A timelock is a mandatory delay between when a proposal passes and when it executes.
It protects users by giving them time to react to changes they disagree with — for example, withdrawing funds before a risky upgrade.
The TimelockController
OpenZeppelin's TimelockController is a contract that schedules, delays, and then executes operations.
The Governor proposes and queues actions into the timelock, which actually owns the protocol's admin rights.
contract Timelock is TimelockController {
constructor(uint minDelay, address[] proposers, address[] executors)
TimelockController(minDelay, proposers, executors, msg.sender) {}
}All lessons in this course
- What Is a DAO
- Governance Tokens
- Proposals and Voting
- Timelocks and Execution