Subnet Deregistration
This page details the process by which subnets can become deregistered from Bittensor network, with an eye to the implementation of the functionality in the Subtensor codebase that makes up Bittensor's blockchain layer.
See also Learn Bittensor: Subnet Deregistration
Subnet deregistration is a mechanism that manages the lifecycle of subnets within the Bittensor network. It ensures network quality by removing underperforming subnets, clearing room for new subnet registrations within the 128 subnet limit.
The subnet deregistration feature deployed on September 17, 2025, with a 7-day delay before the first registrations can occur.
Subnet deregistration addresses network efficiency issues:
- Removes underperforming subnets that consume TAO emissions without providing value.
- Unlocks TAO resources locked in underperforming subnet pools
Parameter | Value | Description |
---|---|---|
Subnet Limit | 128 | Maximum number of occupied subnet slots |
Immunity Period | 4 months (864000 blocks) | Protection period from subnet deregistration |
Rate Limiting | 4 days (28800 blocks) | Minimum time between registrations/deregistrations |
The Automated Deregistration Process
Trigger
The process begins when the subnet limit is reached and a new subnet attempts to register.
Source: do_register_network()
Selection Criteria
The subnet to deregister is the subnet with lowest EMA (Exponential Moving Average) price among non-immune subnets.
Source code: get_network_to_prune()
The subnet price EMA uses the standard EMA formula:
Where is calculated dynamically based on subnet age:
- base_alpha: ~0.0003 for Bittensor mainnet ("finney")
- blocks_since_start: Number of blocks since subnet registration
- halving_blocks: Halving period for the subnet
This EMA value is recalculated for the subnet each time the coinbase function runs.
See also:
- Navigating Subtensor Codebase: Coinbase Implementation
- Exponential Moving Averages (EMAs) in Bittensor.
Immunity Protection
Network immunity period is currently 4 months from registration block.
- Formula:
current_block < registered_at + network_immunity_period
- Source code: Immunity check
Rate Limiting
Deregistration can occur at most every once every 4 days (coordinated with registration rate).
- Block-based timing: 28800 blocks ≈ 4 days at 12s/block
- Source code
Special Cases and Edge Conditions
All Subnets Immune
If all subnets are still within their immunity period, the system will:
- Return
None
fromget_network_to_prune()
- Registration fails with
SubnetLimitReached
error - No subnet is deregistered until at least one becomes eligible
Tied EMA Prices
When multiple subnets have identical EMA prices:
- Select the subnet with the earliest registration timestamp
- Implementation: Tie-breaking logic
Token Liquidation
When a subnet is deregistered, all alpha tokens in that subnet are liquidated and the subnet's TAO pool is distributed to alpha holders and to refunding the subnet owner for their lock cost minus the emissions they've received.
Takeaways
Distribution Method: Largest-remainder for fair rounding Owner Protection: Owner gets refund minus emissions already received Immediate Effect: All alpha tokens are destroyed and cannot be recovered
Liquidation Steps
-
Dissolve Liquidity Pools: All liquidity pools in the subnet's AMM pools are dissolved
-
Calculate Owner Refund: The subnet owner's refund is calculated as:
refund = max(0, lock_cost - owner_received_emission_in_tao)
Where
owner_received_emission_in_tao
is the TAO value of the owner's cut of all emissions received during the subnet's lifetime. -
Enumerate alpha Holders: All alpha token holders and their stake amounts are collected
-
Extract TAO Pool: The subnet's TAO pool (
SubnetTAO
) is extracted for distribution -
Distribution: TAO is distributed proportionally to alpha holders:
- Each holder receives:
(holder_alpha_value / total_alpha_value) * pool_tao
- TAO is credited directly to each holder's coldkey free balance
- Each holder receives:
Source Code: