Internet Computer

NNS Dapp, Internet Identity, Web3 Terminology, and NFTs

What should I know before setting up an SNS on the Internet Computer?

Understanding the SNS Launch Process

For each SNS, the decentralization sale is realized in a separate decentralization sale canister that exists during the SNS's launch, and is owned by the IC which will run the sale. In more detail, it is controlled by the NNS root canister.

  • The sale canister is set up at the start with a defined amount of SNS tokens to be distributed publicly.

  • During the decentralization sale, participants can send ICP to the sale canister to contribute to the dapp’s funding.

  • At the sale’s end the collected ICP are “swapped” for the SNS tokens; the participants get SNS tokens and the SNS gets the collected ICP. Each sale participant will receive their portion of the pool of SNS tokens, pro-rated by their share of the overall number of ICP contributed. For example, if the sale canister initially held 1000 SNS tokens and 500 ICP tokens were collected during the decentralization sale, then the exchange rate would be 2:1 and each participant would get 2 SNS tokens for each ICP token they contributed.

Apart from distributing the tokens to many participants, the decentralization sale sets a market price for the SNS token and every sale participant receives SNS tokens at that price.

For further reading on the SNS process, check out these resources.

 

Preparations

A successful launch of an SNS does not only depend on technical aspects. In fact, it is advisable that before taking any technical steps, you take some non-technical preparation steps and define what the SNS that you are about to request from the IC should achieve. You may want to spend some time defining non-technical goals of the SNS and the dapp that will be controlled by it. To provide some tips on what considerations you should not forget, we list a few of them on this page.

 

These considerations include things like:

  • product-market fit
  • user scalability
  • risks and mitigation plans
  • regulatory approvals

 

A technical preparation that you may want to explore is the ability to integrate parts of the interaction with the SNS decentralization sale, with SNS governance, or with the ledger and index canister in your dapp. As this is work independent of preparing the launch, find more information on separate pages for the ledger canister integration and the index canister integration.

 

  1. Set the initial parameters: For initializing an SNS for your dapp, you first choose the initial parameters of the SNS. This includes both initial parameters of the governance and ledger (e.g., token name). For an idea of how to set additional parameters, check out this IC Developer Doc
  2. Ask the SNS-W to install the SNS canisters: When all parameters are specified, you make a call to the SNS wasm modules canister on the NNS to install an SNS with the specified parameters. At this point, the SNS canisters exist but are not yet fully functional - the SNS is in pre-decentralization-sale mode. At this point, the SNS ledger only has two accounts with liquid tokens, the treasury that is owned by the SNS governance canister and which can be used in the future according to the SNS community's wishes, and some pre-allocated tokens to be used in the initial decentralization sale.
  3. Dapp control handover: Before the decentralization sale, the SNS root canister must be set as the controller of the dapp and other developers are removed from the list of controllers. This entails "registering" the dapp with the SNS so that SNS root is aware that it controls these canisters, and this registration is done by SNS proposal.
  4. Ask the IC to start the decentralization sale: The decentralization sale is started by an NNS proposal that can be submitted by anyone and is decided on by the IC community. The NNS proposal defines the conditions for the decentralization sale, for example how many ICP tokens should at least and at most be collected. When voting on the proposal, the NNS neurons can check the sale parameters and whether the dapp’s control has been handed over to the SNS. The NNS proposal thus also serves as a safeguard where the wisdom of the crowd can detect potentially malicious SNSs before they trick users into investing in them. If the NNS proposal is adopted, the sale is started. If the NNS proposal is rejected, the SNS launch is aborted and the dapp’s control is handed back to the original developers of the dapp.
  5. Decentralization sale: When the sale starts, the sale canister holds the number of SNS tokens that were specified. End users can participate in the decentralization sale by transferring ICP tokens to the sale canister.
  6. SNS genesis: When the decentralization sale ends, it is first established whether it was successful, e.g., enough ICP have been collected. If the sale was successful, the exchange rate is determined and all SNS tokens are given to the sale participants in neurons. Once all neurons are created, the SNS should be under decentralized control and the pre-decentralization-sale mode is reverted. Thus, the governance canister is set to be fully functional. If the sale is unsuccessful, the decentralization attempt failed and everything is reverted to the state before the SNS launch attempt, including that the dapp’s control is handed back to the original developers of the dapp, and the collected ICP are refunded to the sale participants.

Furthermore, you may want to test the SNS before completing this process. For more information on how to best test your dapp, check out this Developer Doc.

 

Updated