Skip to content

Add Tribal Council and Optimistic Governance pods#582

Merged
thomas-waite merged 45 commits intofeat-governance-upgradefrom
feat-deploy-pods
Mar 15, 2022
Merged

Add Tribal Council and Optimistic Governance pods#582
thomas-waite merged 45 commits intofeat-governance-upgradefrom
feat-deploy-pods

Conversation

@thomas-waite
Copy link
Contributor

@thomas-waite thomas-waite commented Mar 9, 2022

Summary

Introduces OptimisticGovernancePods to the protocol. Specifically adds the TribalCouncil, a candidate base pod, factories to deploy both and make the process more scaleable/manageable and an FIP script together with e2e tests.

There is further functionality that will be added in seperate PRs:

  • TribalCouncil council role based authority: TribalCouncil should be able to delegate certain roles to protocol tier pods. It should also be able to revoke these and cancel transactions on child pod timelocks.
  • TribalCouncil membership: Members for the Tribal Council will be voted on through snapshot and then added here. 9 Ethereum addresses will be added
  • Details about the nature of the first pod: A future PR will add exact details and roles to the first protocol pod. It will also update ENS names
  • (possible) Support controller upgrades from Orca

Timelock details

In general, the more executive and powerful a contract or role, then the longer the associated timelock should be. As pods get more and more specific and isolated timelock requirements should decrease.

Specifically:

  • TribalCouncil timelock: 4 days
  • Protocol/product tier timelock: 2 days

@thomas-waite thomas-waite self-assigned this Mar 9, 2022
@thomas-waite thomas-waite requested a review from a team as a code owner March 9, 2022 21:30
/// @param minDelay Delay on the timelock
/// @param publicExecutor Non-permissioned smart contract that
/// allows any address to execute a ready transaction
function createOptimisticTimelock(
Copy link
Contributor

Choose a reason for hiding this comment

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

what about vetoing? The "cancel" functionality should be exposed by some kind of veto controller and veto tribe role imo.

Copy link
Contributor

@Joeysantoro Joeysantoro Mar 11, 2022

Choose a reason for hiding this comment

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

Imagining a contract like the PublicExecutor called the VetoController which stores a mapping of which addresses can veto which pods or which roles can veto which pods and exposes the "cancel" functionality through them.

Copy link
Contributor

Choose a reason for hiding this comment

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

Probably not required for this MVP

Copy link
Contributor Author

@thomas-waite thomas-waite Mar 11, 2022

Choose a reason for hiding this comment

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

Love it, was breaking this out into a seperate PR to ease reviewing load.

More broadly, torn whether it makes more sense to include in one PR - so you get a wholistic overview, but arguably harder to review - or whether these things should be piecemeal in smaller feature PRs


/// @notice Validate that a member can be removed from a pod by the admin
/// Note: Orca sets the memberTokenID to be the podId
function testRemovePodMember() public {
Copy link
Contributor

Choose a reason for hiding this comment

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

how would the DAO remove a pod member?

Copy link
Contributor Author

@thomas-waite thomas-waite Mar 11, 2022

Choose a reason for hiding this comment

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

PodAdmins can remove pod members.

The DAO is the podAdmin of the TribalCouncil so can remove members from the TribalCouncil by calling memberToken.burn(memerToRemove, podId) (there's an e2e test validating this)

The TribalCouncil in turn is the podAdmin of child pods. It in turn can remove any member from a childPod by calling the burn function.

There isn't a direct way at the moment for the DAO to remove members from child pods - it's devolved in this implementation to the TribalCouncil. Is that something we want to add?

Copy link
Contributor

Choose a reason for hiding this comment

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

The DAO absolutely should have the ability to remove members of child pods imo

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed. Individual pods only support one podAdmin address - adding another PR to make the podAdmin a smart contract, which itself will have a relaying method exposed to the intended pod admin as well as the TribeDAO.

In this way, we can have the podAdmin (Tribal Council) and TRIBE DAO able to add/remove members

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is implemented here: #587

Copy link
Contributor

@xklob xklob left a comment

Choose a reason for hiding this comment

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

Overall looks great! Are we importing a bunch of stuff from Orca by copying-pasting? If so, can we use git submodules instead?

@thomas-waite thomas-waite changed the base branch from develop to feat-governance-upgrade March 14, 2022 16:14
@thomas-waite thomas-waite merged commit bf4b4d1 into feat-governance-upgrade Mar 15, 2022
@thomas-waite thomas-waite deleted the feat-deploy-pods branch March 15, 2022 21:26
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

Comments