Blockchain & Cryptocurrency Glossary

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

  • search-icon Clear Definitions
  • search-icon Practical
  • search-icon Technical
  • search-icon Related Terms

Time Lock Contract

1 min read
Pronunciation
[tahym lok kon-trakt]
Analogy
Imagine a company's board proposing a major policy change. A time lock contract is like a rule stating that any proposed change must be publicly announced and posted on a bulletin board for, say, 48 hours before it can actually be implemented. This gives all employees and shareholders time to see the proposal, discuss it, raise objections, or prepare for the change.
Definition
A smart contract designed to enforce a mandatory delay between the proposal of an action (e.g., a protocol upgrade, parameter change, fund transfer) and its execution. This delay provides a window for users or stakeholders to review the proposed action, react, or even exit the system if they disagree.
Key Points Intro
Time locks introduce a delay before executing sensitive operations, enhancing security and transparency in governance.
Key Points

Enforces a predefined waiting period between proposing and executing a function call.

Commonly used for administrative or governance actions in protocols (e.g., upgrades, changing fees, pausing contracts).

Gives the community time to audit proposed changes and react if necessary (e.g., by withdrawing funds or challenging the proposal through governance).

Increases transparency and reduces the risk of immediate, malicious changes by administrators or governance.

Example
A DAO might use a Time Lock contract to manage its treasury or protocol upgrades. When a governance proposal passes, instead of executing immediately, it is queued in the Time Lock. After a set delay (e.g., 2 days), anyone can trigger the execution of the queued proposal.
Technical Deep Dive
A Time Lock contract typically has functions to: 1. Queue transactions: An authorized address (e.g., a governance contract or admin) proposes an action (target contract, function signature, parameters, execution time). 2. Execute transactions: After the specified delay has passed, anyone can call an execute function to dispatch the queued transaction to its target. 3. Cancel transactions: Often, an authorized address (e.g., governance) can cancel a queued transaction before it's executed. The contract meticulously checks timestamps or block numbers to enforce the delay.
Security Warning
The security of a Time Lock depends on the length of the delay (is it sufficient for users to react?) and the security of the entity authorized to queue transactions (e.g., the governance mechanism). If the authorized entity is compromised, malicious transactions could still be queued, although the delay provides a window for detection.

Time Lock Contract - Related Articles

No related articles for this term.