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

Gov: prevent proposals moving from Expired to Queued due to Grace Period change #764

Open
eladmallel opened this issue Jul 24, 2023 · 0 comments
Labels

Comments

@eladmallel
Copy link
Collaborator

eladmallel commented Jul 24, 2023

Based on an issue found by C4 as part of the DAO V3 audit: code-423n4/2023-07-nounsdao-findings#55.

In this part of the proposal state function:

} else if (block.timestamp >= proposal.eta + getProposalTimelock(ds, proposal).GRACE_PERIOD()) {
    return NounsDAOStorageV3.ProposalState.Expired;
} else {
    return NounsDAOStorageV3.ProposalState.Queued;
}

Notice that if GRACE_PERIOD changes (e.g. by upgrading the timelock), a proposal can move from the Expired state back to the Queued state. This might have the undesirable effect of a proposal the DAO thought would not be executed, being executed unexpectedly.

A straightforward solution would be to capture a proposal's expiration timestamp when it is queued, similar to how a proposal's ETA (when it can be executed) is captured.

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

No branches or pull requests

1 participant