Skip to content

Conversation

@QGarchery
Copy link
Collaborator

Credits to the Certora team !

@QGarchery QGarchery self-assigned this Nov 21, 2025
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ExecutableAt and RevertsTimelocked share a lot of logic. I think it would be better if we merge the two into a single spec file, checking that the helper function reverts if and only if the original function reverts.

Then it would be more clear that what we checked is an equivalent function that "just" has the reverting statements (the require statements notably). And makes me wonder whether we should keep such verification job or just forget about it entirely

Comment on lines +166 to +167
// Check currentTime < min(time1, time2)
fb(e, args);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think it's very important that it's clear that this min(time1, time2) is greater than the computed time in earliestExecutionTimeIncreases. This way we know that the function can't be called before that computed time, even with other interactions in between. (it was clear in the original spec in Metamorpho, because the same variable was used)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

btw just checking currentTime < time2 is enough, no ?

}

// Abdicated functions cannot be called
rule abdicatedFunctionsMustRevert(env e, method f, calldataarg args)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This one is already verified in AbdicatedFunctions, although it's nice to factorize the functionTimelocked helper

}

// Function must revert if not submitted for execution
rule mustRevertIfNotSubmitted(env e, method fb, method f, calldataarg args)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

probably not necessary if we already have revert conditions (we know that it needs to be submitted)

}

// Submit correctly sets executableAt based on timelock
rule submitSetsCorrectExecutableAt(env e, bytes data) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It feels a little bit out of place in this spec file, instead it would be best in a file that checks that functions sets the expected variables IMO

}

// Function must revert if revoked
rule revokePreventsFutureExecution(env e, method revokeFb, method f, calldataarg args)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

same (almost), because essentially what we prove here is that revoke sets the executableAt at 0

@QGarchery
Copy link
Collaborator Author

Closing, I will split this work and reopen PRs

@QGarchery QGarchery closed this Nov 27, 2025
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.

4 participants