SNS overview
A Service Nervous Systems (SNS) is an advanced form of a decentralized autonomous organization (DAO). It is assumed that if you are reading this page you know what a DAO is and that you want to learn how you can hand over your dapp to an SNS DAO. If this is not (yet) the case, please refer to the SNS page or the high level introduction of how SNSs work.
Any dapp on the Internet Computer can be handed over to an SNS with the result that the dapp is owned and controlled by a community.
Each SNS includes a stake-based governance system, that orchestrates decision making and changes, and a ledger that defines a unique token for each SNS. The SNS framework also comes with a defined path how an SNS is launched. During a successful launch, an SNS is created, the governance control is distributed to users in a decentralization swap, initial funds are collected (in exchange for governance control), and the dapp's control is handed over to the new SNS.
Architecture
The core architecture of the SNS closely resembles the architecture of the Network Nervous System (NNS), the DAO that governs the Internet Computer. It includes a governance canister that enables decentralized decision making and a ledger canister that defines a token unique to each SNS. In contrast to the SNS, the NNS contains additional canisters that are important to run on the Internet Computer Protocol. (e.g., the cycles minting canister that is responsible for creating cycles, the registry that stores the network topology etc.). There are also a few canisters that only exist on the SNS, most notably the decentralization swap canister that is used during the launch process of an SNS.
SNS as a system functionality (connection to the NNS community)
SNSs are provided as a system functionality by the Internet Computer Protocol in that the code for the SNS canisters is maintained by the Internet Computer Protocol. (Learn about alternative ways to use the SNS code or how to create a DAO.) More concretely, this means that the NNS community approved the original SNS canisters' code and continuously approves new improved SNS versions.
SNS Wasm modules canister (SNS-W)
All approved SNS canister versions are stored on an NNS canister, called the SNS Wasm modules canister (SNS-W). When an SNS is created, SNS-W is involved and responsible for deploying the latest version of the SNS canister. When the SNS should be updated, this happens by an NNS proposal that adds a new version of the SNS canisters to SNS-W. Each SNS community can then simply decide - by SNS proposal - to adopt these new, approved versions in their SNS instance.
Customizing the SNS
Individual SNSs can nevertheless be customized by choosing parameters, called nervous system parameters, that can be configured to realize different forms of voting and tokenomics.
The SNS subnet
SNSs are hosted on an SNS subnet. Since this subnet exclusively hosts SNSs, this simplifies the verification for end users: users can simply verify that an SNS is running on the SNS subnet and infer that the underlying code has been approved by the NNS community as explained in the previous paragraph.
SNS canisters
The SNS consists of the following canisters:
- The governance canister.
- The ledger canister and archive canisters.
- The index canister.
- The root canister.
- The decentralization swap canister.
SNS governance canisters
The governance canister defines who can participate in governance decisions and automatically triggers the execution of these decisions. It stores proposals that are suggestions on how to evolve the dapp that the SNS governs and neurons that define who the governance participants are. Neurons facilitate stake-based voting as they contain staked SNS tokens. Anyone can be a participant in governance by staking SNS tokens in a neuron. When a proposal is adopted, the governance system automatically and autonomously triggers the execution of the proposal in the form calling a defined method. In most cases, these decisions are therefore executed fully on chain.
SNS ledger canister with archive and index
The ledger canister implements the ICRC-1 standard and contains a unique token that is different for each SNS. These kinds of tokens are called SNS tokens. In each SNS, this SNS's ledger stores which accounts own how many SNS tokens and the history of transactions between them. To keep the full ledger history even though a canister has limited memory, the ledger canister spawns archive canisters that store the ledger block history. Moreover, wallets and other frontends will need to show all transactions that are relevant for a given account. To facilitate this and ensure that not every frontend has to implement this themselves, the index canister provides a map of which transactions are relevant for a given account.
SNS root canister
The root canister is responsible for upgrading the other SNS canisters and the dapp canisters that the SNS governs.
SNS (decentralization) swap canister
The decentralization swap canister, or swap canister for short, is the main canister involved in the SNS launch. Users can provide ICP tokens to the swap and, if the swap is successful, they get staked SNS tokens (in SNS neurons) in return. Hence, the ICP and the SNS tokens are "swapped". This facilitates that 1) the SNS can collect initial funding and 2) the distribution of neurons and thus of voting power to many different participants, which makes the governance decentralized.
DAO alternatives
SNSs are protocol-provided DAOs on the Internet Computer. There are of course also other alternatives to getting a DAO.
These possibilities allow communities to choose between using DAOs that are provided as a service by ICP, where maintenance is as automated as possible, and DAOs that have full flexibility of how they can evolve.
Self-deploy the SNS code
A developer or a community can choose to self-deploy a DAO by reusing the publicly available open source code. They can deploy this code on a normal application subnet and manually upgrade it. They can then choose to follow the same SNS versions than protocol-provided SNSs follow or they can choose to deviate from this path. In this option, the DAO community has to be more active in implementing, testing and approving code versions. In exchange, they have more flexibility. One advantage of the protocol-provided SNSs over this option is that the verification of the code is easier as all SNSs on the SNS subnet run the same canister versions that are verified by the NNS community.
Build your own DAO / use other DAO frameworks
While this is conceptually similar to the above option, it is important to emphasize that there are of course other designs than what the SNS code implements that also realize a DAO. For most of these, the implications for the communities will be similar: The DAO communities will have to maintain the DAO versions or trust a third party to do so.
Launching an SNS
The SNS launch not only creates the SNS, but one of its main purposes is to decentralize the control of an SNS and thereby of the dapp that the SNS governs.
To achieve this, new tokens must be distributed to a large community to ensure proper decentralization of the voting power. There are of course many ways to do so.
The SNS provides one simple way to achieve this: a developer can hand over their dapp to the NNS and ask it to create an SNS and start a decentralization swap for it. The decentralization swap collects ICP from participants and distributes the voting power of the SNS among participants by swapping the ICP for (staked) SNS tokens.
The decentralization swap is a key concept explained in more detail below. Refer to this section for the detailed, technical stages of an SNS launch.
Decentralization swap
The launch of each SNS includes a separate decentralization swap canister that is owned and run by the Internet Computer Protocol. In more detail, it is controlled by the NNS root canister.
The swap canister is set up at the start with a defined amount of SNS tokens to be distributed publicly.
During the decentralization swap, participants can send ICP to the swap canister to contribute to the dapp’s funding.
At the swap's end the collected ICP are “swapped” for the SNS tokens; the participants get staked SNS tokens in the form of SNS neurons and the SNS gets the collected ICP in an SNS controlled treasury. Each swap 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 swap canister initially held 1000 SNS tokens and 500 ICP tokens were collected during the decentralization swap, then the exchange rate would be 2:1 and each participant would get 2 SNS tokens for each ICP token they contributed.
After a successful decentralization swap, SNS tokens are owned and the SNS is governed by a large community. The ICP that were collected are in an SNS-owned treasury.
Interacting with an SNS
To interact with or participate with an SNS, the following tools and interfaces can be used: