Delay Modifier
The Delay Modifier puts a waiting period between a decision and its execution. A transaction enters a queue. After a cooldown, anyone can execute it. Before that, the owner can cancel it.
Use the Delay Modifier when someone must be able to intervene:
- The Safe owners review what an automated module wants to do, and veto bad transactions.
- A DAO gives members a fast lane (for example through a Roles Modifier), and keeps a veto window for a guardian.
- An account gives a service provider control, but with a time buffer that limits the damage of a compromised key.
How it works
- An enabled module calls
execTransactionFromModule. The Delay Modifier stores the transaction hash in the queue and emitsTransactionAdded. - The cooldown (in seconds) runs. During this time, the owner can cancel queued
transactions with
setTxNonce. - After the cooldown, anyone can call
executeNextTxwith the original transaction data. The Delay Modifier verifies the hash and forwards the call to the Safe. - If an expiration is set, the transaction stays valid only for that window after the cooldown. Expired transactions never execute.
Two properties are important to plan around:
The queue is strictly first-in, first-out. executeNextTx always executes the
oldest queued transaction. One stale transaction at the head blocks the whole
queue until it expires or the owner skips it with setTxNonce.
The Delay Modifier delays only the module path that goes through it. Safe owners that sign directly, and modules enabled directly on the Safe, are not delayed.
Composition with Roles
Put the Delay Modifier between the Roles Modifier and the Safe to get “scoped permissions plus review period”:
- The Safe enables the Delay Modifier.
- The Delay Modifier enables the Roles Modifier.
- The
targetof the Roles Modifier is the Delay Modifier.
See the concepts page for the full diagram. The reverse order works too: Delay in front of Roles delays the calls before the permission check.
Next steps
- Add it to your constellation: Quickstart: Delay
- Operate and monitor it: Delay guide
- Full API and addresses: Delay reference