Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

audit: Comp Timelock Doesn't Support Duplicate MetaTransaction Queueing #178

Closed
Orland0x opened this issue Jun 13, 2023 · 2 comments · Fixed by #212
Closed

audit: Comp Timelock Doesn't Support Duplicate MetaTransaction Queueing #178

Orland0x opened this issue Jun 13, 2023 · 2 comments · Fixed by #212
Assignees

Comments

@Orland0x
Copy link
Contributor

The execute function of the contract fails silently when trying to queue the same MetaTransaction
twice within the same proposal, due to the internal workings of the Compound Timelock contract.
If two identical MetaTransactions are present in the payload, the two queueing attempts will only be counted as one in Compound's Timelock. This can cause seemingly valid proposals to fail when executed after the timelock delay has elapsed.

@Orland0x
Copy link
Contributor Author

We have a salt inside the meta tx for this reason.

@pscott pscott self-assigned this Jun 19, 2023
@pscott
Copy link
Collaborator

pscott commented Jun 19, 2023

FIX:

Ensure there are not duplicate MetaTransaction (excluding the salt) by using an array in memory (complexity is O(n^2) but we don't expect the list to be long in the average scenario: and it's better to use an array in memory than a mapping in storage for the "normal" cases)

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 a pull request may close this issue.

2 participants