Overview
The NNS allows the Internet Computer network to be governed in an open, decentralized, and secure manner. It can:- Upgrade the protocol and software used by node machines
- Induct new node operators and machines into the network
- Create new subnets to increase network capacity
- Configure economic parameters for compute capacity pricing
- Freeze malicious canister software to protect the network
The NNS is implemented primarily in
rs/nns/ and consists of several specialized canisters working together to provide decentralized governance.Core Concepts
Neurons
Neurons are the fundamental voting entities in the NNS. Network participants create neurons by locking ICP tokens:- Locked ICP: Users stake ICP tokens to create neurons
- Dissolve Delay: Minimum time before tokens can be unlocked (up to 8 years)
- Voting Power: Derived from locked balance, dissolve delay, and age
- Rewards: Neurons earn newly minted ICP for participating in voting
Proposals
Proposals are the mechanism for making changes to the IC. The NNS accepts proposals and decides to adopt or reject them based on neuron voting activity. Proposal Types:- Network management (subnet creation, node administration)
- Protocol upgrades
- Economic parameter adjustments
- Service Nervous System (SNS) creation
- Canister management (stop, start, upgrade)
Proposal Lifecycle
- Submission: A neuron submits a proposal (with a fee if rejected)
- Voting: Neurons vote to adopt or reject
- Decision: The NNS determines outcome based on voting activity
- Execution: Adopted proposals invoke their corresponding system function
Governance Canister
The Governance canister is the heart of the NNS, managing proposals, neurons, and voting.Creating a Neuron
Neuron creation is a two-step process:Transfer ICP to Governance
User sends ICP tokens to a governance canister subaccount associated with their principal via the Ledger canister
Voting Mechanism
The NNS uses a liquid democracy model:- Measures “voting noise” from ongoing voting volume
- Waits for noise to fall below a threshold
- Tallies votes once activity stabilizes
- Allows decisions without requiring a voting quorum
Voting Rewards
Neuron owners earn rewards for participating in governance: Reward Factors:- Size of locked ICP balance
- Dissolve delay (higher = more rewards)
- Neuron age
- Voting participation rate
- Overall network voting activity
NNS Canisters
The NNS consists of multiple specialized canisters:Governance
Manages neurons, proposals, and voting logic
Registry
Stores network configuration and topology information
Ledger
Tracks ICP token balances and transactions
Root
Manages upgrades of other NNS canisters
Lifeline
Emergency canister for NNS recovery
Cycles Minting
Converts ICP to cycles for computation
Deployment
Local Deployment
To deploy NNS canisters locally for testing:Production Deployment
To production and testnets, NNS canisters are deployed by Ansible onto the NNS subnet.Interacting with the NNS
Using dfx
Manual interaction for testing:Using Candid Web UI
The Candid web server provides a user-friendly interface:Using ic-admin
For administrative operations:Example Scenarios
Subnet Creation Proposal
Upgrade Proposal
Source Code Reference
Key Files:rs/nns/governance/src/lib.rs: Core governance logic with neuron and proposal managementrs/nns/governance/src/voting.rs: Voting mechanisms and algorithmsrs/nns/governance/src/proposals/: Proposal type implementationsrs/nns/governance/src/neuron_store.rs: Neuron storage and indexing
Related Topics
Service Nervous System
Learn about SNS for dapp-specific governance
Canisters
Understand the canister execution model
Cryptography
Explore IC’s cryptographic foundations
State Management
Dive into state synchronization and persistence