From e9bcd9b3560ec9550b5c4672d543381398ab92d9 Mon Sep 17 00:00:00 2001 From: Andre Popovitch Date: Mon, 8 Jan 2024 15:25:14 -0600 Subject: [PATCH 01/12] Update making-proposals.md to add info for critical proposals and MintSnsTokens --- .../sns/managing/making-proposals.md | 63 ++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/docs/developer-docs/integrations/sns/managing/making-proposals.md b/docs/developer-docs/integrations/sns/managing/making-proposals.md index 325c21a6d0..46a1c3fe0c 100644 --- a/docs/developer-docs/integrations/sns/managing/making-proposals.md +++ b/docs/developer-docs/integrations/sns/managing/making-proposals.md @@ -102,6 +102,7 @@ There are the following types: * [`TransferSnsTreasuryFunds`](#transfersnstreasuryfunds). * [`UpgradeSnsControlledCanister`](#upgradesnscontrolledcanister). * [`ManageSnsMetadata`](#managesnsmetadata). +* [`MintSnsTokens`](#mintsnstokens). All of the proposals used to manage an SNS are executed on the SNS governance canister so it helps to have for reference, what the [interface for the governance canister](https://sourcegraph.com/github.com/dfinity/ic@4732d8281404c0a7c1e0a91937ffd0e54f2beced/-/blob/rs/sns/governance/canister/governance.did) is. @@ -443,6 +444,52 @@ Then the resulting metadata will end like this where only the `description` fiel description : "UPDATED Sample SNS used for educational purposes"; ``` +### `MintSnsTokens` + +Each SNS can have SNS tokens in its treasury, but it also has the ability to mint new SNS tokens to a particular user. This is a ["critical" proposal type](#criticalproposals), which means it is subject to higher voting thresholds before it is accepted. + +#### Relevant type signatures + +```candid + type MintSnsTokens = record { + to_principal : opt principal; + to_subaccount : opt Subaccount; + memo : opt nat64; + amount_e8s : opt nat64; + }; + + type Subaccount = record { subaccount : vec nat8 }; +``` + +#### Putting it together + +Example in bash: + +```bash +quill sns make-proposal --proposal '( + record { + title = "Mint 41100 ICP to Foo Labs"; + url = "https://sns-examples.com/proposal/42"; + summary = "Mint 411 ICP to Foo Labs"; + action = opt variant { + MintSnsTokens = record { + + to_principal = opt principal "ozcnp-xcxhg-inakz-sg3bi-nczm3-jhg6y-idt46-cdygl-ebztx-iq4ft-vae"; + + to_subaccount = null; + + memo = null; + + amount_e8s = opt 4_110_000_000_000 : opt nat64; + }; + }; + }; +)' > message.json + +quill send message.json +``` + + ## Generic proposals Each SNS community might have functions that they would like to only execute if the SNS DAO agrees on it but that might be very dapp-specific. Generic proposals, also called generic functions or generic nervous system functions, allow a flexible way for SNS communities to define such functions. @@ -742,6 +789,20 @@ quill send message.json ``` +## Critical proposals + +Some proposal types are considered "critical". These are DeregisterDappCanisters, TransferSnsTreasuryFunds, and MintSnsTokens. Critical proposal types are handled differently to ensure they are only passed with broad community consensus. + +1. Voting Thresholds + + Non-critical proposals types can be passed if 3% of the total voting power votes yes and 50% of the exercised voting power votes yes. + + Critical proposals types can only be passed if 20% of the total voting power votes yes and 67% of the exercised voting power votes yes. + +2. Catchall following + + Users must set following explicitly for critical proposal types. + \ No newline at end of file +### Submit a generic proposal --> From e074e97f7ad8aee03a862eb283a5b0fa6ec4e1fb Mon Sep 17 00:00:00 2001 From: Andre Popovitch Date: Thu, 11 Jan 2024 10:50:23 -0600 Subject: [PATCH 02/12] Update docs/developer-docs/integrations/sns/managing/making-proposals.md Co-authored-by: Lara Schmid <73884086+LaraAS@users.noreply.github.com> --- .../integrations/sns/managing/making-proposals.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/developer-docs/integrations/sns/managing/making-proposals.md b/docs/developer-docs/integrations/sns/managing/making-proposals.md index 46a1c3fe0c..a63334e848 100644 --- a/docs/developer-docs/integrations/sns/managing/making-proposals.md +++ b/docs/developer-docs/integrations/sns/managing/making-proposals.md @@ -791,7 +791,8 @@ quill send message.json ## Critical proposals -Some proposal types are considered "critical". These are DeregisterDappCanisters, TransferSnsTreasuryFunds, and MintSnsTokens. Critical proposal types are handled differently to ensure they are only passed with broad community consensus. +Some proposal types are considered "critical". These are DeregisterDappCanisters, TransferSnsTreasuryFunds, and MintSnsTokens. Critical proposal types have a bit more strict rules to ensure they are only passed with broad community consensus. +In the following we list all differences to non-critical proposals. 1. Voting Thresholds From 05f791413a164d5e7e1970cf49d64053c00cc5fd Mon Sep 17 00:00:00 2001 From: Andre Popovitch Date: Thu, 11 Jan 2024 10:50:32 -0600 Subject: [PATCH 03/12] Update docs/developer-docs/integrations/sns/managing/making-proposals.md Co-authored-by: Lara Schmid <73884086+LaraAS@users.noreply.github.com> --- .../integrations/sns/managing/making-proposals.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developer-docs/integrations/sns/managing/making-proposals.md b/docs/developer-docs/integrations/sns/managing/making-proposals.md index a63334e848..420ae91620 100644 --- a/docs/developer-docs/integrations/sns/managing/making-proposals.md +++ b/docs/developer-docs/integrations/sns/managing/making-proposals.md @@ -800,7 +800,7 @@ In the following we list all differences to non-critical proposals. Critical proposals types can only be passed if 20% of the total voting power votes yes and 67% of the exercised voting power votes yes. -2. Catchall following +2. Catch-all following Users must set following explicitly for critical proposal types. From 4049abd749f715afcdaff6aa579dc83021e89836 Mon Sep 17 00:00:00 2001 From: Andre Popovitch Date: Thu, 11 Jan 2024 11:00:52 -0600 Subject: [PATCH 04/12] Update making-proposals.md --- .../sns/managing/making-proposals.md | 77 +++++++++++-------- 1 file changed, 45 insertions(+), 32 deletions(-) diff --git a/docs/developer-docs/integrations/sns/managing/making-proposals.md b/docs/developer-docs/integrations/sns/managing/making-proposals.md index 420ae91620..f45722b904 100644 --- a/docs/developer-docs/integrations/sns/managing/making-proposals.md +++ b/docs/developer-docs/integrations/sns/managing/making-proposals.md @@ -116,18 +116,20 @@ Below are the most important types for the purpose of this article: //proposals types for managing an SNS type Action = variant { - ManageNervousSystemParameters : NervousSystemParameters; - AddGenericNervousSystemFunction : NervousSystemFunction; - RemoveGenericNervousSystemFunction : nat64; - UpgradeSnsToNextVersion : record {}; - RegisterDappCanisters : RegisterDappCanisters; - TransferSnsTreasuryFunds : TransferSnsTreasuryFunds; - UpgradeSnsControlledCanister : UpgradeSnsControlledCanister; - DeregisterDappCanisters : DeregisterDappCanisters; - Unspecified : record {}; - ManageSnsMetadata : ManageSnsMetadata; - ExecuteGenericNervousSystemFunction : ExecuteGenericNervousSystemFunction; - Motion : Motion; + ManageNervousSystemParameters : NervousSystemParameters; + AddGenericNervousSystemFunction : NervousSystemFunction; + RemoveGenericNervousSystemFunction : nat64; + UpgradeSnsToNextVersion : record {}; + RegisterDappCanisters : RegisterDappCanisters; + TransferSnsTreasuryFunds : TransferSnsTreasuryFunds; + UpgradeSnsControlledCanister : UpgradeSnsControlledCanister; + DeregisterDappCanisters : DeregisterDappCanisters; + MintSnsTokens : MintSnsTokens; + Unspecified : record {}; + ManageSnsMetadata : ManageSnsMetadata; + ExecuteGenericNervousSystemFunction : ExecuteGenericNervousSystemFunction; + ManageLedgerParameters : ManageLedgerParameters; + Motion : Motion; }; ``` @@ -135,6 +137,29 @@ Below are the most important types for the purpose of this article: See the types in the code [here](https://sourcegraph.com/github.com/dfinity/ic@4732d8281404c0a7c1e0a91937ffd0e54f2beced/-/blob/rs/sns/governance/proto/ic_sns_governance/pb/v1/governance.proto?L405) - they are called “action” in the code. ::: +### Critical proposal types + +Some proposal types are considered "critical". These are DeregisterDappCanisters, TransferSnsTreasuryFunds, and MintSnsTokens. Critical proposal types have a bit more strict rules to ensure they are only passed with broad community consensus. +In the following we list all differences to non-critical proposals. + +1. Voting Thresholds + + Non-critical proposals types can be passed if 3% of the total voting power votes yes and 50% of the exercised voting power votes yes. + + Critical proposals types can only be passed if 20% of the total voting power votes yes and 67% of the exercised voting power votes yes. + +2. Catch-all following + + Voters can follow other neurons on critical proposal types, but each neuron has to make an active decision of following for each critical proposals type as the “All topics”-following is not applied to critical proposal types. Users who have multiple neurons can actively vote with just one of them and follow this one neuron with all their other neurons + +3. Voting period + + The voting period for critical proposal types is 5-10 days and cannot be changed by the SNS. In contrast, for non-critical proposals the default is 4-8 days and this can be adjusted by each SNS DAO. + + Critical proposal have a longer voting period to as they require a larger voting participation and it is therefore beneficial to give voters a bit more time to participate. + + As with all proposals, the [wait-for-quiet algorithm](https://wiki.internetcomputer.org/wiki/NNS_Canisters#Proposal_decision_and_wait-for-quiet) ensures that controversial proposals will have a longer voting period (up to 10 days for critical proposals) while proposals where everyone agrees on have a shorter voting period (5 days for critical proposals). + ### `Motion` A motion proposal is the only kind of proposal that does not have any immediate effect, i.e., it does not trigger the execution of a method as other proposals do. For example, it can be used for opinion polls before even starting certain features. @@ -250,6 +275,8 @@ The proposal `DeregisterDappCanisters` is the counterpart of `RegisterDappCanist If an SNS community decides that they would like to give up the control of a given dapp canister, they can use this proposal to do so. To this end, the proposal defines the canister ID of the dapp canister to be deregistered and a principal to whom the canister will be handed over to (i.e., this principal will be set as the new controller of the specified dapp canister). +This is a ["critical" proposal type](#criticalproposals), which means it is subject to higher voting thresholds before it is accepted. + #### Relevant type signatures ```candid @@ -287,8 +314,9 @@ quill send message.json ### `TransferSnsTreasuryFunds` -The SNS DAO has control over a treasury from which funds can be sent to other accounts by `TransferSnsTreasuryFunds` proposals. -To do so, one has to define the following arguments. +The SNS DAO has control over a treasury from which funds can be sent to other accounts by `TransferSnsTreasuryFunds` proposals. + +This is a ["critical" proposal type](#criticalproposals), which means it is subject to higher voting thresholds before it is accepted. #### Relevant type signatures @@ -446,7 +474,9 @@ Then the resulting metadata will end like this where only the `description` fiel ### `MintSnsTokens` -Each SNS can have SNS tokens in its treasury, but it also has the ability to mint new SNS tokens to a particular user. This is a ["critical" proposal type](#criticalproposals), which means it is subject to higher voting thresholds before it is accepted. +Each SNS can have SNS tokens in its treasury, but it also has the ability to mint new SNS tokens to a particular user. + +This is a ["critical" proposal type](#criticalproposaltypes), which means it is subject to higher voting thresholds before it is accepted. #### Relevant type signatures @@ -489,7 +519,6 @@ quill sns make-proposal --proposal '( quill send message.json ``` - ## Generic proposals Each SNS community might have functions that they would like to only execute if the SNS DAO agrees on it but that might be very dapp-specific. Generic proposals, also called generic functions or generic nervous system functions, allow a flexible way for SNS communities to define such functions. @@ -788,22 +817,6 @@ quill sns --canister-ids-file ./sns_canister_ids.json --pem-file $PEM_FILE make- quill send message.json ``` - -## Critical proposals - -Some proposal types are considered "critical". These are DeregisterDappCanisters, TransferSnsTreasuryFunds, and MintSnsTokens. Critical proposal types have a bit more strict rules to ensure they are only passed with broad community consensus. -In the following we list all differences to non-critical proposals. - -1. Voting Thresholds - - Non-critical proposals types can be passed if 3% of the total voting power votes yes and 50% of the exercised voting power votes yes. - - Critical proposals types can only be passed if 20% of the total voting power votes yes and 67% of the exercised voting power votes yes. - -2. Catch-all following - - Users must set following explicitly for critical proposal types. -