Skip to main content

Governance

Enabling governance on a custom core requires all changes to be approved by member votes. This governance approach resembles SNS governance, where a minimum of 33% of votes is needed, with at least 50%+ required for majority approval to execute proposals directly.

Voting Power​

Each member has a single ballot for voting. Multi-ballot voting may be introduced at a later stage.

Default Rules​

When governance is enabled, there are some default rules that can be modified through proposals:

  • Proposal Duration: 2 days
  • Aliases Enabled: true
  • Governance Type: None (not currently used)

Proposal Types​

Once governance is enabled, members can propose various actions to manage the custom core. New types of proposals may be added or modified over time.

ManageConfig​

EnableGovernance(bool)​

Enable or disable governance.

true  // Enable governance
false // Disable governance

Default: false

SetProposalDurationNanos(u64)​

Set the duration of a proposal.

u64 // Duration in nanoseconds

Default: 2 days (172_800_000_000_000 nanoseconds)
Minimum: 12 hours (43_200_000_000_000 nanoseconds)
Maximum: 4 days (345_600_000_000_000 nanoseconds)

ManageMember​

Add(Principal)​

Add a new member.

Principal // Member to add

Remove(Principal)​

Remove an existing member.

Principal // Member to remove

ManageDapps​

Register(Principal)​

Register a canister with the custom core.

Principal // Canister to register

Requirements:

  • The custom root canister must control the canister being added.
  • The proposal creator must control the canister being added.
  • Any existing controllers will be removed upon acceptance.

Deregister(Principal, Principal)​

Deregister a canister and assign a new controller.

Principal // Canister to deregister
Principal // New controller for the canister

Upgrade(InstallCodeArgument)​

Upgrade a canister’s code.

InstallCodeArgument // See [InstallCodeArgument documentation](https://docs.rs/ic-cdk/latest/ic_cdk/api/management_canister/main/struct.InstallCodeArgument.html)

New(u64, InstallCodeArgument) (Not Implemented)​

Deploy a new canister with specified cycles.

u64 // ICP in e8s used for cycles
InstallCodeArgument {
mode: CanisterInstallMode,
canister_id: CanisterId,
wasm_module: WasmModule,
arg: Vec<u8>,
}

TransferOwner(Principal)​

Transfer the ownership of the custom core to another principal.

Note: Ownership can only be transferred to an existing member.

ManageMetadata​

Update(UpdateMetadata)​

Update metadata for the custom core project.

UpdateMetadata {
url: Option<String>,
logo: Option<String>,
name: Option<String>,
description: Option<String>,
}

Note: Fields set to None are ignored.

TokenTransfer​

IcrcTransfer(Principal, TransferArg)​

Initiate a transfer of ICRC tokens.

Principal // ICRC-supported token ledger
TransferArg {
from_subaccount: Option<Subaccount>,
to: Account,
fee: Option<NumTokens>,
created_at_time: Option<u64>,
memo: Option<Memo>,
amount: NumTokens,
}