basiliskawakens.xyz

How to Check the Time-Lock on a DAO Treasury Transaction

A time-lock on a DAO treasury transaction is a delay built into the data/verify-contract-owner-and-proxy/">smart contract that prevents funds from being moved immediately after a proposal passes. To check it, you read the contract's state on a block explorer - specifically the time-lock period, the queued transaction, and the execution window. The exact method depends on whether the DAO uses a standard time-lock contract (like OpenZeppelin's TimelockController), a custom implementation, or a multi-sig with a built-in delay.

Identify the treasury contract

First, confirm which contract holds the treasury. DAOs often separate the governance token contract, the treasury, and the time-lock into different addresses. Look for:

On Etherscan or your chain's explorer, open the treasury contract's page. Check the "Contract" tab for source code verification. If verified, you can read the contract's functions directly.

Read the time-lock duration

Most standard time-locks expose a getMinDelay() or MINIMUM_DELAY function. Here's how to check it:

  1. Go to the treasury contract's "Read Contract" tab on the explorer.
  2. Find the function named delay, minDelay, getMinDelay, or MIN_DELAY.
  3. Click "Query" or the equivalent button. The result is usually in seconds.
  4. Convert to days or hours: 86,400 seconds = 1 day; 3,600 seconds = 1 hour.

If the function doesn't exist, the contract may use a custom implementation. Look for a timeLock or timelockDelay variable in the read functions list. Some DAOs store the delay as a public variable (e.g., uint256 public timelockDelay).

If the contract is unverified, you can still infer the delay by examining past transactions. Find a queued proposal's transaction, note the block timestamp when it was queued, then find the execution transaction and subtract the timestamps. The difference is the delay - but this only works if the delay hasn't changed.

Find Queued Transactions

Time-locks work by storing a hash of the transaction data (target address, value, calldata, and a unique identifier). To see pending or queued transactions:

  1. On the treasury contract's explorer page, go to the "Events" tab.
  2. Filter for the CallScheduled or Queued event (common names in OpenZeppelin timelocks).
  3. Each event log contains the transaction ID (bytes32), the target address, value, and the scheduled execution time.
  4. The scheduled execution time is a Unix timestamp. Compare it to the current block timestamp (shown on the explorer's home page) to see if the transaction is still locked or ready for execution.

For a Gnosis Safe multi-sig with a time-lock module, the events may be named ExecutionDelaySet or TxQueued. The module's contract address is often separate from the Safe itself.

Check Execution Status

A queued transaction must be executed within a window after the delay expires. OpenZeppelin's timelock uses a GRACE_PERIOD (typically 14 days). After that, the transaction expires and must be re-queued.

To check if a queued transaction is still valid:

  1. Read the GRACE_PERIOD constant from the contract (if available).
  2. Find the scheduled execution time from the event log.
  3. The execution window runs from scheduledTime to scheduledTime + GRACE_PERIOD.
  4. If the current block timestamp is before scheduledTime, the transaction is still locked. If after the grace period, it's expired.

Some DAOs use custom timelocks with no grace period - the transaction can only be executed at exactly the scheduled time. Others allow early cancellation via a separate cancel function controlled by a governance vote.

Verify the Time-Lock on a Multi-Sig

If the treasury is a multi-sig with a built-in delay (like a Gnosis Safe with a "timelock module"):

  1. Find the Safe's address on a block explorer.
  2. Look for a "Modules" section on the Safe's page. The time-lock module's address is listed there.
  3. Open the module's contract page and read its delay or executionDelay function.
  4. To see pending transactions, check the module's events for TransactionAdded or ExecutionScheduled.

The Safe itself may also show pending transactions under the "Transactions" tab, but the time-lock delay is enforced by the module, not the Safe.

What to Do If the Contract Is Unverified

Unverified contracts don't expose readable function names or events. In that case:

Example: checking a standard openzeppelin timelock

Assume the treasury is a TimelockController contract. You would:

  1. Read getMinDelay() → returns 172800 (2 days).
  2. Filter events for CallScheduled. Find a recent event with parameters:
  3. id: 0xabc...
  4. index: 0
  5. target: 0x... (the recipient address)
  6. value: 0
  7. data: 0x... (the function call)
  8. predecessor: 0x000...000
  9. delay: 172800
  10. Read getTimestamp(id) → returns a Unix timestamp. If it's 1,700,000,000 and the current time is 1,699,000,000, the transaction is locked for another 1,000,000 seconds (~11.6 days).
  11. Read GRACE_PERIOD → returns 1209600 (14 days). The execution window ends at 1,700,000,000 + 1,209,600 = 1,701,209,600.

If the current time is within that window, the transaction can be executed by anyone calling execute() with the same parameters. If outside, it's expired.

Important Caveats

Not financial advice. basiliskawakens.xyz publishes market data and general information about digital assets. Crypto assets are volatile and you can lose everything you put in. Nothing here is a recommendation to buy, sell or hold, and we make no price predictions.

Prices are sourced from third parties and may be delayed or wrong. Verify anything you intend to act on against a primary source.

Back to on-chain data