Skip to main content
A Service Nervous System (SNS) is an algorithmic DAO that allows developers to create decentralized, token-based governance systems for their dapps. Similar to how the Network Nervous System (NNS) controls the Internet Computer, SNSs enable decentralized control of individual dapps.

Overview

The SNS provides a turnkey solution for dapp developers to hand over control of their applications to a community of token holders. This enables:
  • Decentralized decision-making for dapp upgrades and configuration
  • Token-based governance with voting and rewards
  • Community-driven development and management
  • Transparent proposal and execution mechanisms
The SNS framework is implemented in rs/sns/ and mirrors many concepts from the NNS while being dapp-specific.

Architecture

SNS Canisters

An SNS consists of five core canisters working together:

Governance Canister

Enables decentralized decision making through proposals and voting

Root Canister

Responsible for upgrading other SNS canisters and controlled dapp canisters

Ledger Canister

Determines balances and transactions for the SNS-specific governance token

Index Canister

Provides a map from ledger accounts to relevant transactions

Swap Canister

Facilitates initial decentralization swap (token distribution)

Control Hierarchy

Governance Canister (Top-level controller)

Root Canister

├── Other SNS Canisters (Ledger, Index, Swap)
└── Dapp Canisters (Your application canisters)
The governance canister controls the root canister, which in turn controls all other SNS canisters and the dapp canisters that the SNS manages.

Getting an SNS

There are two main ways to deploy an SNS:
Get an SNS provided as a system function by the IC through an NNS proposal. This is the recommended approach for production dapps.Benefits:
  • Integrated with IC infrastructure
  • Automatic decentralization swap
  • Built-in security guarantees
  • Community validation through NNS proposal

SNS Lifecycle

1. Preparation Phase

1

Design Tokenomics

Define token distribution, voting parameters, and governance rules
2

Test SNS Locally

Deploy and test your SNS in a local development environment
3

Prepare Dapp

Ensure your dapp canisters are ready for decentralized control
4

Create NNS Proposal

Submit a proposal to the NNS for SNS deployment (if using NNS-provided SNS)

2. Decentralization Swap

The swap canister facilitates the initial token distribution:
Participants contribute ICP

Swap canister collects contributions

Once swap conditions are met:
    ├── Participants receive SNS tokens
    └── SNS governance becomes active

Dapp control transfers to SNS
Swap Parameters:
  • Minimum and maximum ICP to raise
  • SNS token distribution percentages
  • Neuron parameters (dissolve delay, etc.)
  • Swap duration and conditions
The decentralization swap is a one-time event. Carefully plan your token distribution and swap parameters.

3. Active Governance

After the swap completes, the SNS becomes fully operational:
  • Token holders create neurons by staking SNS tokens
  • Neurons can vote on proposals
  • Proposals can upgrade dapp canisters
  • Voting rewards are distributed to participating neurons

Governance Features

Proposals

SNS governance supports various proposal types:
Upgrade one of the controlled dapp canisters to a new WASM version.
// Proposal includes:
// - Target canister ID
// - New WASM binary
// - Upgrade arguments
// - Execution mode
Transfer SNS tokens or ICP from the SNS treasury to another account.
// Proposal specifies:
// - Amount to transfer
// - Recipient account
// - Token type (SNS token or ICP)
Modify SNS configuration parameters such as voting thresholds, proposal costs, or neuron parameters.
// Examples:
// - Voting reward rate
// - Proposal rejection fee
// - Minimum dissolve delay for voting
Change which canisters are under SNS control.
// Proposal includes:
// - Canister ID to add/remove
// - Updated control configuration

Voting Mechanics

SNS voting follows the same principles as NNS voting: Key Features:
  • Voting power based on staked tokens and dissolve delay
  • Liquid democracy through neuron following
  • Wait-for-quiet algorithm for decision making
  • Voting rewards for participation
// From rs/sns/governance/
// SNS inherits core governance logic from NNS
// with dapp-specific customizations

Deploying an SNS

Using the SNS CLI

# Create SNS configuration file
sns init-config-file

# Edit sns_init.yaml with your parameters:
# - Token name and symbol
# - Initial token distribution
# - Governance parameters
# - Swap parameters

Testing Before Launch

Always test your SNS thoroughly before launching to mainnet. Use the SNS testnet environment.
Testing Checklist:
  • Deploy SNS to local replica or testnet
  • Test proposal submission and voting
  • Verify dapp canister upgrades work correctly
  • Test swap mechanics with test tokens
  • Validate neuron creation and management
  • Review token distribution and governance parameters
For detailed testing instructions, see the official SNS testing guide.

Managing an SNS

Once launched, the SNS is managed by its community:

Creating Proposals

// Neuron holders submit proposals
// Each proposal includes:
// - Action (upgrade, transfer funds, etc.)
// - Rationale and description
// - Execution parameters

Voting on Proposals

Token holders participate in governance:
Vote directly on proposals through:
  • NNS dapp frontend
  • sns-quill CLI tool
  • Custom frontends

Monitoring SNS Health

Key Metrics:
  • Total staked tokens
  • Active neurons count
  • Proposal activity
  • Voting participation rate
  • Treasury balances
For detailed management guidance, see the SNS management documentation.

SNS vs NNS Comparison

AspectNNSSNS
ScopeEntire Internet ComputerIndividual dapp
TokenICP (native utility token)Custom SNS token
ControlNetwork infrastructure, subnets, nodesDapp canisters and configuration
DeploymentSingle instance (genesis)Multiple instances (one per dapp)
GovernanceIC-wide proposalsDapp-specific proposals

Best Practices

  • Define fair token distribution
  • Set appropriate dissolve delays
  • Balance decentralization with efficiency
  • Consider long-term sustainability
  • Deploy to testnet first
  • Simulate various governance scenarios
  • Test edge cases and failure modes
  • Validate upgrade mechanisms
  • Communicate clearly about governance
  • Provide documentation and guides
  • Foster active participation
  • Be transparent about changes
  • Build upgrade mechanisms
  • Allow parameter adjustments
  • Design for flexibility
  • Consider future governance needs

Source Code Reference

// Implementation in rs/sns/
// - governance/: SNS governance logic
// - root/: Root canister for upgrades
// - swap/: Decentralization swap mechanism
// - ledger/: SNS-specific token ledger (separate repo)
Key Directories:
  • rs/sns/governance/: SNS governance canister
  • rs/sns/root/: SNS root canister for managing upgrades
  • rs/sns/swap/: Decentralization swap canister

Resources

SNS Documentation

Official SNS integration guide

SNS Checklist

Complete checklist for SNS deployment

Testing Guide

How to test your SNS before launch

Network Nervous System

Learn about the NNS governance system

Build docs developers (and LLMs) love