Timelock Commands
Timelock provides a security mechanism that delays critical vault state changes. Changes are staged and must wait for the timelock period to expire before they can be applied.view
View the current timelock configuration and any pending state updates.Arguments
NoneOptions
NoneOutput
Displays:- Current timelock duration in seconds
- Remaining time until timelock expires (if active)
- Detailed breakdown of pending state updates including:
- Integration ACL changes (added, removed, modified integrations with protocol names)
- Delegate ACL changes (added, removed, modified delegates with permissions)
- Asset list changes
- Borrowable asset changes
- Timelock duration changes
Examples
set
Set the timelock duration for the vault. This change itself is subject to the current timelock.Arguments
Timelock duration in seconds. Common values:
- 3600 (1 hour)
- 86400 (24 hours)
- 604800 (7 days)
Options
Skip confirmation prompt and execute immediately
Examples
Set 24-hour timelock with confirmation:Output
apply
Apply pending timelocked changes after the timelock period has expired.Arguments
NoneOptions
Skip confirmation prompt and execute immediately
Behavior
- Checks that the timelock period has expired
- Applies all pending state updates
- Clears the pending changes
- Resets the timelock expiration
Examples
Apply with confirmation:Output
Error Cases
- Transaction fails if timelock period has not expired yet
- Transaction fails if there are no pending changes to apply
cancel
Cancel all pending timelocked changes without applying them.Arguments
NoneOptions
Skip confirmation prompt and execute immediately
Behavior
- Clears all pending state updates
- Resets the timelock expiration
- Does not apply any changes
Examples
Cancel with confirmation:Output
Timelock Workflow
Typical workflow for making protected changes:- Make changes - Use commands like
glam access add-integration,glam access add-delegate, etc. - Review pending changes - Use
glam timelock viewto see what will be applied - Wait - Wait for the timelock period to expire (shown in
viewoutput) - Apply or cancel:
- Use
glam timelock applyto commit the changes - Use
glam timelock cancelto discard them
- Use
Protected State Changes
Timelock protects:- Integration ACL modifications
- Delegate ACL modifications
- Asset list changes
- Borrowable asset changes
- Timelock duration changes
Security Considerations
- Longer timelock periods provide more time to detect and prevent malicious changes
- Use
viewregularly to monitor for unexpected pending changes - The timelock duration change itself is subject to the current timelock
- Only vault managers can set, apply, or cancel timelocks