Difference between revisions of "How-to: Verify SNS decentralization swap proposal"

From Internet Computer Wiki
Jump to: navigation, search
(Created page with "The process of launching an SNS for a dapp goes through the following main stages: * '''Stage 1:''' A developer makes a call to the SNS wasm modules canister on the NNS to get...")
 
Line 1: Line 1:
 
The process of launching an SNS for a dapp goes through the following main stages:
 
The process of launching an SNS for a dapp goes through the following main stages:
* '''Stage 1:''' A developer makes a call to the SNS wasm modules canister on the NNS to get an SNS. The SNS canisters are installed on the SNS subnet based on the initial parameters chosen by the developer (e.g., initial neurons, number of tokens). The developer hands over the control of the dapp to the SNS.
+
* '''Stage 1:''' A developer makes a call to the SNS wasm modules canister on the NNS requesting to get an SNS. The SNS canisters are installed on the SNS subnet based on the initial parameters chosen by the developer (e.g., initial neurons, number of tokens). The developer hands control of the dapp over to the SNS.
* '''Stage 2:''' An NNS proposal is created to start a decentralization sale for the SNS. In addition to the initial parameters with which the SNS was installed, this proposal specified additional parameters for the decentralization sale.  
+
* '''Stage 2:''' An NNS proposal is created to start a decentralization sale for the SNS. In addition to the initial parameters set when the SNS was installed, this proposal specifies additional parameters for the decentralization sale.  
* '''Stage 3:''' If the NNS proposal is adopted, the decentralization sale is started.
+
* '''Stage 3:''' If the NNS proposal is adopted, the decentralization sale starts immediately.
  
 
This page contains information for NNS neuron holders to consider when voting in '''Stage 2'''. Specifically, it explains how the parameters in the NNS proposals can be interpreted and verified, and how SNS canisters can be queried to learn whether the SNS's configurations are valid.
 
This page contains information for NNS neuron holders to consider when voting in '''Stage 2'''. Specifically, it explains how the parameters in the NNS proposals can be interpreted and verified, and how SNS canisters can be queried to learn whether the SNS's configurations are valid.

Revision as of 09:43, 25 November 2022

The process of launching an SNS for a dapp goes through the following main stages:

  • Stage 1: A developer makes a call to the SNS wasm modules canister on the NNS requesting to get an SNS. The SNS canisters are installed on the SNS subnet based on the initial parameters chosen by the developer (e.g., initial neurons, number of tokens). The developer hands control of the dapp over to the SNS.
  • Stage 2: An NNS proposal is created to start a decentralization sale for the SNS. In addition to the initial parameters set when the SNS was installed, this proposal specifies additional parameters for the decentralization sale.
  • Stage 3: If the NNS proposal is adopted, the decentralization sale starts immediately.

This page contains information for NNS neuron holders to consider when voting in Stage 2. Specifically, it explains how the parameters in the NNS proposals can be interpreted and verified, and how SNS canisters can be queried to learn whether the SNS's configurations are valid. All this information is available on chain and can be accessed via (as yet) a manual process where there are two options to interact with the relevant canister: using the DFX tool, or using the Internet Computer Dashboard. Below, there are step by step instructions describing how to proceed and, whenever canister calls are involved, explanations for DFX and dashboard interactions are given.

Step 1: Verify the Parameters for the Decentralization Sale in the NNS proposal

As mentioned above, some of the parameters for the decentralization sale are set in the NNS proposal. To verify them, you can look at the field Params in the NNS proposal (e.g. in the NNS frontend dapp or on the dashboard). These parameters are submitted as part of the proposal and represent the information with which the NNS governance canister will open the decentralization sale if the proposal is adopted. You can check if the parameters match with those submitted in the proposal summary. In contrast to the parameters here, the summary can be freely chosen by the proposer and should not be trusted.

This is what the different entries mean:

  • minParticipantsIcpE8s is the minimum amount of ICP that a sale participant has to invest for a valid participation. The value is given in fractions of 10E-8 of an ICP, which means that you have to remove eight zeros to convert this to an ICP value: In the example, 10000000 e8s = 0.1 ICP.
  • maxIcpE8s is the maximum number of ICP that the decentralization sale will collect. If this maximum is reached, the sale will be finished. The value is given in fractions of 10E-8 of an ICP.
  • swapDueTimestampSeconds denotes a timestamp when the decentralization sale (previously called “swap”) will be finished in case that the maximum ICP is not reached before this time. The unit of this parameter is in seconds from the Unix epoch. You can use an online converter to convert this to a human readable date and time.
  • minParticipants is the minimum number of sale participants for the decentralization sale to be considered successful. If the sale ends and there are less participants, the sale failed.
  • snsTokensE8s is the number of SNS tokens that are sold in the initial decentralization sale. The value is given in fractions of 10E-8 of an SNS token. This value should match the “sales supply allocated to initial decentralization sale” that the SNS was initialized with. This can be checked in Step 3.
  • maxParticipantIcpE8s is the maximum contribution that an individual sale participant can make. The value is given in fractions of 10E-8 of an ICP.
  • minIcpE8s is the minimum number of ICP that the decentralization sale will collect. The value is given in fractions of 10E-8 of an ICP.

Step 2: Verifying the SNS canisters

The proposal payload contains the canister ID of the decentralization sale that it will call if the proposal is adopted. A good proposal summary will contain the canister IDs of the other SNS canisters as well as that of the dapp controlled by the SNS. The next step is to verify that the provided decentralization sale is indeed part of an SNS composed of the canisters claimed in the proposal summary.