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

feat: implement the security council multisig [11] #1536

Open
9 tasks
ClementWalter opened this issue Oct 25, 2024 · 1 comment
Open
9 tasks

feat: implement the security council multisig [11] #1536

ClementWalter opened this issue Oct 25, 2024 · 1 comment
Labels
epic A macro-issue that tracks multiple sub-issues and tasks

Comments

@ClementWalter
Copy link
Member

ClementWalter commented Oct 25, 2024

Why

See conception document:
security-council-multisig-and-guardians.pdf

We need to write a contract able to manage different thresholds for different functions.

Note: this contracts will have signers that can be Argent or Braavos multisigs, this is somehow a merged multisig contract.

What

// Constants
const pause_threshold = 50% 
const emergency_execution_threshold = 75%
const unpause = 66%
const revoke_guardian = 66% 
const cancel_proposal_threshold = 50%

// Storage
struct Storage {
  protocol_handler: ContractAddress,
  operator_proposals: ContractAddress
  members: Vec<ContractAddress>,
  call_hash_by_member: Map<(felft,u32), Map<ContractAddress, felt252>>
};

// External function
fn emergency_execution(valid_until: u64, call: Call);
fn transfer_ownership(valid_until: u64, new_owner: ContractAddress);
fn hard_pause(valid_until: u64);
fn unpause(valid_until: u64);
fn cancel_proposal(valid_until: u64, proposal_id: felt252);

fn change_operator(valid_until: u64, new_operator: ContractAddres);
fn change_security_council(valid_until: u64, new_security_council: ContractAddres);
fn change_gas_price_admin(valid_until: u64, new_gas_admin: ContractAddres);
fn add_guardian(valid_until: u64, guardian_to_add: ContractAddres);
fn remove_guardian(valid_until: u64, guardian_to_remove: ContractAddres);

in body, functions should look like:

   if tx.timestamp > valid_until
        panic!()
   }
   assert tx.sender in members;
   // some other logic

   // compute call hash
   let hash = poseidon(selector, args)
   assert has not in call_hash_by_members
   call_hash_by_members.push(hash, tx.sender)

Issues

Tasks

@ClementWalter ClementWalter added the epic A macro-issue that tracks multiple sub-issues and tasks label Oct 25, 2024
@ClementWalter ClementWalter moved this to 📅 Next sprint in Kakarot on Starknet Oct 25, 2024
@ClementWalter ClementWalter changed the title feat: implement the security council multisig feat: implement the security council multisig [10] Oct 25, 2024
@obatirou
Copy link
Collaborator

obatirou commented Oct 25, 2024

Added the cancel_proposal function + operator_proposal: ContractAddress to the requirements:
it is need as the operator will execute the proposals from a TimelockController in which the SC multisig will have the CANCELLER role

@obatirou obatirou changed the title feat: implement the security council multisig [10] feat: implement the security council multisig [11] Oct 25, 2024
@kkrt-labs kkrt-labs deleted a comment Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic A macro-issue that tracks multiple sub-issues and tasks
Projects
No open projects
Status: 🔖 Current sprint
Development

No branches or pull requests

2 participants