Skip to content

Conversation

smartcontracts
Copy link
Contributor

Introduces the TimelockGuard proposal.

introduces the TimelockGuard proposal.
for execution of the transaction. If a threshold of signers have signed the timer is set to one
value, if all signers have signed the timer is set to some second (presumably shorter) value.
4. After the specified time, anyone can then call `Safe.execTransaction` as normal and execution
will complete as expected.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will need to be merged somehow with the UnorderedExecutionModule. Maybe the TimelockGuard incorporates the bytes32 hashes from the UnorderedExecutionModule and offers a function different from exectTransaction for execution.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that this is doable simply by ensuring that the params of the scheduled transaction match the transaction being executed whether that is by a module or by the normal flow.

Something to consider though, is that certain versions of the Safe (pre 1.4.0 I believe), do not call to the Guard at all when executing a module transaction. So we will likely need to upgrade some if not all of the Safes we use.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since a timelock has to lookup the scheduled transactions, presumably with a hash of data, it's an important design point if the timelock signs for a particular nonce or not.

🟨 We may need to have a way to cancel scheduled transactions. Particularly if the schedules are not for a particular nonce, then a timelocked signature could remains open and ready to use, forever.

🟨 If we have the timelock work noncelessly, we need to ensure that each schedule can only work once, AND that you can schedule the same set of actions again, after it has completed before.

Copy link
Contributor

@maurelian maurelian Sep 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's an important design point if the timelock signs for a particular nonce or not.

Absolutely agree. In my thinking the hash used in this guard should be generated with Safe.getTransactionHash() so as to avoid writing new logic outside of the Safe.

🟨 We may need to have a way to cancel scheduled transactions. Particularly if the schedules are not for a particular nonce, then a timelocked signature could remains open and ready to use, forever.

Is that covered below in ### Transaction Cancellation Flow, or do you have something in mind that is missing?

🟨 If we have the timelock work noncelessly, we need to ensure that each schedule can only work once, AND that you can schedule the same set of actions again, after it has completed before.

Agree. Paraphrasing to confirm: "it should be possible to cancel a set of signatures so that they can never be submitted, but the actual transaction action must still remain executable (given a new signature is provided)".

@alcueca alcueca requested a review from mds1 August 25, 2025 07:48
@alcueca
Copy link
Contributor

alcueca commented Aug 25, 2025

Reviewed at Design Review meeting on Wednesday, August 20

Copy link
Contributor

@wildmolasses wildmolasses left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i love the spirit of the TimelockGuard and think it's a good design. a few questions, thanks!

a norm.

### Time Critical Transactions
Some multisigs may face scenarios where they need to be able to execute transactions very quickly
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one scenario for which ive seen a need for time critical transactions is when a mistake is made and some kind of timely surgical recovery is possible. are we making the assumption that the new review period via TimelockGuard delay implies no mistakes? or are we assuming that they can be acceptably managed via Pause?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bingo, we realized this as well in our threat modelling yesterday. We might have to rethink the feature.

The Pause does not cover all possible safety incidents, so we need an emergency response path.

Copy link

@JBTestingOP JBTestingOP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

random review

Comment on lines +34 to +35
- Optimism Foundation (`LivenessModule` user)
- Optimism Security Council (`LivenessModule` user)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Optimism Foundation (`LivenessModule` user)
- Optimism Security Council (`LivenessModule` user)
- Optimism Foundation (`TimelockGuard` user)
- Optimism Security Council (`TimelockGuard` user)

<!-- Identify the solution requirements and any additional design constraints from the Context and
Problem Statement section in a bulleted list. -->

- Mitigate the impact of a malicious majority of owners capable to execute a single transaction.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Elsewhere it was stated that the TimelockGuard cannot mitigate this scenario.


- Mitigate the impact of a malicious majority of owners capable to execute a single transaction.
- Mitigate the impact of an honest majority approving a malicious or erroneous transaction.
- Maintain the ability to execute transactions quickly in a worst-case scenario. <-- NOT ADDRESSED
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on this comment, I think we do want to address this.

Suggested change
- Maintain the ability to execute transactions quickly in a worst-case scenario. <-- NOT ADDRESSED
- Maintain the ability to execute a predetermined set of emergency transactions quickly in a worst-case scenario.

I've said "predetermined set of emergency transactions" but it might be the case that we instead want to provide a mechanism for executing arbitrary transactions more quickly under some circumstances, this is important to clarify.

### Configuration

A transaction from the Safe configures the Guard by executing a transaction that optionally sets
a delay period. If the delay period is not set, the TimelockGuard is enabled with no delay.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any point in enabling the TimelockGuard with no delay?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants