Skip to content

Commit

Permalink
add formatting to README
Browse files Browse the repository at this point in the history
  • Loading branch information
cmontecoding committed Sep 29, 2023
1 parent e923e64 commit c198723
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
33 changes: 17 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
- Council member can step down at any time (except during a scheduled election), triggering a single election to replace the member


Notes for Continued Implementation:
# Notes for Continued Implementation:

- common ideas: scheduled elections cancel current elections, and halt new elections from starting during its 3 week time frame. Also community re-elections can't start if one was started within the last 3 weeks
- explanation: this is to prevent sticky elections - results are applied from elections when finalizeElection() is called, so if a new election were to start and end before the previous one is finalized, the results of the previous election could be finalized and applied now (making the results of the new election overwritten, which is undesired)
Expand Down Expand Up @@ -69,26 +69,27 @@ Notes for Continued Implementation:
- At the end, AutomatedVoting needs upgradeability
- details not specified yet

Safe Integration:
AutomatedVoting will inherit from GovernorModule which will have the module logic
The starting and finalizing of elections should remove and add members to the safe as needed
GovernorModule will be able to add owners, remove owners, change threshold, and swap owners (for full elections)
Threshold is default 3/5 but needs to be changed according to the number of owners. There should always be a majority threshold.
5 owners --> 3/5
4 owners --> 3/4
3 owners --> 2/3
2 owners --> 2/2
1 owner --> 1/1
A guard (Safe hook) will have to be put in place after enabling the module to prevent any owners from removing the module and circumenting the governance process

Tentative Deployment Process:
## Safe Integration:
- AutomatedVoting will inherit from GovernorModule which will have the module logic
- The starting and finalizing of elections should remove and add members to the safe as needed
- GovernorModule will be able to add owners, remove owners, change threshold, and swap owners (for full elections)
- Threshold is default 3/5 but needs to be changed according to the number of owners. There should always be a majority threshold.
- 5 owners --> 3/5
- 4 owners --> 3/4
- 3 owners --> 2/3
- 2 owners --> 2/2
- 1 owner --> 1/1
- A guard (Safe hook) will have to be put in place after enabling the module to prevent any owners from removing the module and circumenting the governance process

## Tentative Deployment Process:
1. Deploy ```AutomatedVoting.sol```
2. Enable ```AutomatedVoting.sol``` as a module on the safe
3. Add a guard to the safe to prevent owners from removing the module/other exploits

Relevant contracts for fundamental understanding: ```StakingRewardsV2.sol```, ```Safe.sol```, ```OwnerManager.sol```, ```ModuleManage.sol```, and ```GuardManager.sol```
## Relevant contracts for fundamental understanding:
```StakingRewardsV2.sol```, ```Safe.sol```, ```OwnerManager.sol```, ```ModuleManage.sol```, and ```GuardManager.sol```

TLDR: High Level Overview of TODO:
## TLDR: High Level Overview of TODO:
1. finish minor TODOs in the AutomatedVoting.sol code (add/fix tests as neccesary)
2. finish implementing GovenorModule and test
3. Implement a Safe hook (guard) and test
Expand Down
3 changes: 2 additions & 1 deletion src/GovernorModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,9 @@ contract GovernorModule {
}

/// @notice this is to add one owner to the safe when a replacement election ends
/// @dev threshold is justed according to the number of owners
/// @dev threshold is adjusted according to the number of owners
/// should always be majority
/// exact thresholds are listed in README.md
function addSingleOwner(address owner) internal {
addOwnerWithThreshold(owner, 1);
}
Expand Down

0 comments on commit c198723

Please sign in to comment.