-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Add CANCEL_ROLE to TimelockController #2980
Comments
Hello @cygnusv This is definitely an interesting discussion, but changes like that will take time to make. In the meantime, I believe you could fix that by having an Ownable or AccessControl contract, that would be a proposer for the timelock, and which only function (on top of the Ownable or AccessControl) would be a cancel forwarder. That way your council could cancel through this relayer, but not propose. |
…y power to the TimelockController See OpenZeppelin/openzeppelin-contracts#2980
We can add a In the meantime, there is a somewhat hacky workaround you can implement as an override: function cancel(bytes32 id) public virtual override onlyRole(CANCEL_ROLE) {
bool isProposer = hasRole(PROPOSER_ROLE, msg.sender);
if (!isProposer) _grantRole(PROPOSER_ROLE, msg.sender);
super.cancel(id);
if (!isProposer) _revokeRole(PROPOSER_ROLE, msg.sender);
} (Note: This requires the latest version of OZ Contracts for the internal grant and revoke functions.) |
@cygnusv We've been thinking about adding a cancel role, how did you solve this in your governor? Who has the ability to cancel? |
@frangio We decided to add a cancel role in the Governor contract and implement |
I see. And in practice who has veto power? |
In the Threshold DAO, it was decided that a council multisig has veto power in case there's a dangerous proposal (see https://forum.threshold.network/t/threshold-network-dao-proposal-v2/57) |
🧐 Motivation
In the forthcoming Threshold Network DAO, there's a council with veto power over proposals. The only way to allow this with current implementation of
TimelockController
would be to grant the council thePROPOSER_ROLE
, but this council shouldn't be able to make proposals, according to our governance design. We need something like aCANCEL_ROLE
that's different fromPROPOSER_ROLE
andEXECUTION_ROLE
. This feature could also be a solution for the "Proposer fight" problem that's discussed in the documentation.Discussion
I wanted to do this by creating a contract that inherits from
TimelockController
, but since its variables and functions are marked as private it's being difficult. In particular, we need to further restrict the cancel operation to a different role than proposers, but the modifier incancel()
forces us to override it and re-implement it, and we encounter the problem of_timestamps
being private.Anyway, if you find this interesting, I'd love to help, since I'm working on that anyway.
The text was updated successfully, but these errors were encountered: