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
Getting an SNS
There are two main ways to deploy an SNS:- NNS-Provided SNS
- Self-Deployed 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
2. Decentralization Swap
The swap canister facilitates the initial token distribution:- Minimum and maximum ICP to raise
- SNS token distribution percentages
- Neuron parameters (dissolve delay, etc.)
- Swap duration and conditions
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 Dapp Canister
Upgrade Dapp Canister
Upgrade one of the controlled dapp canisters to a new WASM version.
Transfer SNS Treasury Funds
Transfer SNS Treasury Funds
Transfer SNS tokens or ICP from the SNS treasury to another account.
Manage Nervous System Parameters
Manage Nervous System Parameters
Modify SNS configuration parameters such as voting thresholds, proposal costs, or neuron parameters.
Add/Remove Controlled Canisters
Add/Remove Controlled Canisters
Change which canisters are under SNS control.
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
Deploying an SNS
Using the SNS CLI
Testing Before Launch
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
Managing an SNS
Once launched, the SNS is managed by its community:Creating Proposals
Voting on Proposals
Token holders participate in governance:- Direct Voting
- Automatic Following
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
SNS vs NNS Comparison
| Aspect | NNS | SNS |
|---|---|---|
| Scope | Entire Internet Computer | Individual dapp |
| Token | ICP (native utility token) | Custom SNS token |
| Control | Network infrastructure, subnets, nodes | Dapp canisters and configuration |
| Deployment | Single instance (genesis) | Multiple instances (one per dapp) |
| Governance | IC-wide proposals | Dapp-specific proposals |
Best Practices
Design Clear Tokenomics
Design Clear Tokenomics
- Define fair token distribution
- Set appropriate dissolve delays
- Balance decentralization with efficiency
- Consider long-term sustainability
Test Thoroughly
Test Thoroughly
- Deploy to testnet first
- Simulate various governance scenarios
- Test edge cases and failure modes
- Validate upgrade mechanisms
Engage Your Community
Engage Your Community
- Communicate clearly about governance
- Provide documentation and guides
- Foster active participation
- Be transparent about changes
Plan for Evolution
Plan for Evolution
- Build upgrade mechanisms
- Allow parameter adjustments
- Design for flexibility
- Consider future governance needs
Source Code Reference
rs/sns/governance/: SNS governance canisterrs/sns/root/: SNS root canister for managing upgradesrs/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