Skip to content

Commit 296b60b

Browse files
Subsub to mechanism (#97)
* wip * wip * wip * wip * wip
1 parent 4b197d6 commit 296b60b

File tree

4 files changed

+155
-9
lines changed

4 files changed

+155
-9
lines changed

docs/learn/anatomy-of-incentive-mechanism.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ Subnets can implement multiple incentive mechanisms to evaluate different aspect
2929
- **Enable specialized competition**: Miners can excel in specific mechanisms that match their capabilities
3030
- **Provide transparent control**: All emission distributions and mechanism configurations are visible on-chain
3131

32-
For detailed information about implementing and managing multiple incentive mechanisms, see [Multiple Incentive Mechanisms Within Subnets](../subnets/understanding-sub-subnets).
32+
33+
For detailed information about implementing and managing multiple incentive mechanisms, see [Multiple Incentive Mechanisms Within Subnets](../subnets/understanding-multiple-mech-subnets).
3334

3435
## Subnet creator responsibilities
3536

docs/resources/glossary.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,8 @@ A portion of the TAO emission received by the subnet miners when they provide va
268268

269269
A system that drives the behavior of subnet miners and governs consensus among subnet validators in a Bittensor subnet. Each subnet has one or more incentive mechanisms, which should be designed carefully to promote desired behaviors and penalize undesired ones. When multiple incentive mechanisms are used, each operates independently with separate bond pools for Yuma Consensus calculations, allowing subnet creators to distribute emissions across different types of work or evaluation criteria.
270270

271-
**See also:** [Anatomy of Incentive Mechanism](../learn/anatomy-of-incentive-mechanism.md), [Multiple Incentive Mechanisms Within Subnets](../subnets/understanding-sub-subnets.md), [Understanding Subnets](../subnets/understanding-subnets.md)
271+
272+
**See also:** [Anatomy of Incentive Mechanism](../learn/anatomy-of-incentive-mechanism.md), [Multiple Incentive Mechanisms Within Subnets](../subnets/understanding-multiple-mech-subnets), [Understanding Subnets](../subnets/understanding-subnets.md)
272273

273274
### Issuance
274275

@@ -324,7 +325,8 @@ A data structure that contains comprehensive information about the current state
324325

325326
A feature that allows subnets to implement multiple independent evaluation systems within a single subnet. Each mechanism operates with its own bond pool for Yuma Consensus calculations, enabling subnet creators to distribute emissions across different types of work or evaluation criteria. Validators must evaluate miners separately for each mechanism, and miner performance in one mechanism does not affect their rating in another.
326327

327-
**See also:** [Multiple Incentive Mechanisms Within Subnets](../subnets/understanding-sub-subnets.md), [Anatomy of Incentive Mechanism](../learn/anatomy-of-incentive-mechanism.md)
328+
329+
**See also:** [Multiple Incentive Mechanisms Within Subnets](../subnets/understanding-multiple-mech-subnets), [Anatomy of Incentive Mechanism](../learn/anatomy-of-incentive-mechanism.md)
328330

329331
### Miner Deregistration
330332

@@ -611,7 +613,9 @@ The task-performing entity within a Bittensor subnet. A subnet miner is a type o
611613

612614
The individual or entity responsible for defining the specific digital task to be performed by subnet miners, implementing one or more incentive mechanisms, and providing sufficient documentation for participation in the subnet. Subnet creators can configure multiple incentive mechanisms to distribute emissions across different types of work or evaluation criteria.
613615

614-
**See also:** [Create a Subnet](../subnets/create-a-subnet.md), [Subnet Creators btcli Guide](../subnets/subnet-creators-btcli-guide.md), [Multiple Incentive Mechanisms Within Subnets](../subnets/understanding-sub-subnets.md)
616+
617+
**See also:** [Create a Subnet](../subnets/create-a-subnet.md), [Subnet Creators btcli Guide](../subnets/subnet-creators-btcli-guide.md), [Multiple Incentive Mechanisms Within Subnets](../subnets/understanding-multiple-mech-subnets)
618+
615619

616620
### Subnet Protocol
617621

@@ -623,13 +627,17 @@ A unique set of rules defining interactions between subnet validators and miners
623627

624628
A component of an incentive mechanism that defines how subnet miners' responses are evaluated, aiming to align subnet miner behavior with the subnet's goals and user preferences. It is a mathematical object that converts miner responses into numerical scores, enabling continuous improvement and competition among miners. When multiple incentive mechanisms are used, each has its own scoring model for independent evaluation.
625629

626-
**See also:** [Anatomy of Incentive Mechanism](../learn/anatomy-of-incentive-mechanism.md), [Multiple Incentive Mechanisms Within Subnets](../subnets/understanding-sub-subnets.md), [Understanding Subnets](../subnets/understanding-subnets.md)
630+
631+
**See also:** [Anatomy of Incentive Mechanism](../learn/anatomy-of-incentive-mechanism.md), [Multiple Incentive Mechanisms Within Subnets](../subnets/understanding-multiple-mech-subnets), [Understanding Subnets](../subnets/understanding-subnets.md)
632+
627633

628634
### Subnet Task
629635

630636
A key component of any incentive mechanism that defines the work the subnet miners will perform. The task should be chosen to maximize subnet miner effectiveness at the intended use case for the subnet. When multiple incentive mechanisms are used within a subnet, each mechanism can define different tasks for miners to perform.
631637

632-
**See also:** [Understanding Subnets](../subnets/understanding-subnets.md), [Anatomy of Incentive Mechanism](../learn/anatomy-of-incentive-mechanism.md), [Multiple Incentive Mechanisms Within Subnets](../subnets/understanding-sub-subnets.md)
638+
639+
**See also:** [Understanding Subnets](../subnets/understanding-subnets.md), [Anatomy of Incentive Mechanism](../learn/anatomy-of-incentive-mechanism.md), [Multiple Incentive Mechanisms Within Subnets](../subnets/understanding-multiple-mech-subnets)
640+
633641

634642
### Subnet Weights
635643

@@ -955,15 +963,18 @@ The directory path where the generated Bittensor wallets are stored locally on t
955963

956964
A matrix formed from the ranking weight vectors of all subnet validators in a subnet, used as input for the Yuma Consensus module to calculate emissions to that subnet. When multiple incentive mechanisms are used, each mechanism has its own weight matrix for independent consensus calculations.
957965

958-
**See also:** [Yuma Consensus](../learn/yuma-consensus.md), [Consensus-Based Weights](../concepts/consensus-based-weights.md), [Multiple Incentive Mechanisms Within Subnets](../subnets/understanding-sub-subnets.md)
966+
967+
**See also:** [Yuma Consensus](../learn/yuma-consensus.md), [Consensus-Based Weights](../concepts/consensus-based-weights.md), [Multiple Incentive Mechanisms Within Subnets](../subnets/understanding-multiple-mech-subnets)
968+
959969

960970
### Weight Vector
961971

962972
A vector maintained by each subnet validator, with each element representing the weight assigned to a subnet miner based on its performance. When multiple incentive mechanisms are used, validators maintain separate weight vectors for each mechanism.
963973

964974
The ranking weight vectors for each subnet are transmitted to the blockchain, where they combine to form the [weight matrix](#weight-matrix) (or matrices when multiple mechanisms are used) that is input for Yuma Consensus.
965975

966-
**See also:** [Consensus-Based Weights](../concepts/consensus-based-weights.md), [Yuma Consensus](../learn/yuma-consensus.md), [Multiple Incentive Mechanisms Within Subnets](../subnets/understanding-sub-subnets.md)
976+
**See also:** [Consensus-Based Weights](../concepts/consensus-based-weights.md), [Yuma Consensus](../learn/yuma-consensus.md), [Multiple Incentive Mechanisms Within Subnets](../subnets/understanding-multiple-mech-subnets)
977+
967978

968979
## Y
969980

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
---
2+
title: "Multiple Incentive Mechanisms Within Subnets"
3+
---
4+
5+
import ThemedImage from '@theme/ThemedImage';
6+
import useBaseUrl from '@docusaurus/useBaseUrl';
7+
8+
# Multiple Incentive Mechanisms Within Subnets
9+
10+
This page explores how subnets can implement multiple incentive mechanisms to distribute emissions across different evaluation criteria.
11+
12+
For an introduction to incentive mechanisms in general, see [Understanding Incentive Mechanisms](../learn/anatomy-of-incentive-mechanism). For the basics of subnets, miners, validators, and the blockchain, see [Components of the Bittensor platform](../learn/neurons).
13+
14+
Historically, each subnet operates with a single **incentive mechanism**, a function that validators run to assign weights to miners based on the value of their work. Subnets can now support **multiple incentive mechanisms**, allowing a subnet creator to apportion the subnet's emissions across different evaluation criteria, each running Yuma Consensus _independently_ with separate bond pools to evaluate miners' performance on distinct tasks.
15+
16+
Each miner receives emissions separately from each incentive mechanism, so a miner's performance in one mechanism does not affect their rating in another, and their emissions for each epoch are summed across all mechanisms. Validators receive dividends as a weighted sum of their performance across all incentive mechanisms - they cannot choose which mechanisms to validate, and if they don't validate all mechanisms, they receive proportionally reduced emissions. Multiple incentive mechanisms don't change the total emissions to a subnet, but create a way for subnet creators to distribute those emissions to miners working on different tasks. This mechanism affords subnet creators a transparent, on-chain way to exercise fine-grained control over the work they are incentivizing, keeping miner effort focused on work that is most needed at a time.
17+
18+
Each incentive mechanism has its own:
19+
20+
- **Weight matrix**: Each validator sets weights for each miner on each of the subnet's incentive mechanisms.
21+
- **Independent bond pools**: Each mechanism maintains separate bonding relationships for Yuma Consensus calculations.
22+
- **Independent emissions**: Since they depend on weights set by validators, a miner's emissions from each mechanism are independent.
23+
- **Transparent on-chain data**: All incentive mechanism configurations and the flow of emissions are visible on-chain.
24+
- **Emission distribution**: Subnet creators can control what percentage of total emissions goes to each mechanism using the `sudo_set_subsubnet_emission_split` extrinsic. <!-- See: subtensor/pallets/admin-utils/src/lib.rs:1891-1910 -->
25+
26+
### Takeaways
27+
28+
1. **Same Validators, Same Stake**: All validators participate in all incentive mechanisms within a subnet with identical stake weights.
29+
2. **Same Miners**: All miners registered on a subnet can participate in any or all of its incentive mechanisms.
30+
3. **Owner-Controlled Proportions**: The holder of the _subnet creator_ key sets the emission distribution among incentive mechanisms.
31+
4. **Separate Bond Pools**: Each incentive mechanism maintains separate bonding relationships for independent Yuma Consensus calculations.
32+
33+
## What Should Stakers Know?
34+
35+
**Core Impact:**
36+
37+
- **No change to your staking mechanics**: Your stake is delegated to a validator on a subnet, and applies across all incentive mechanisms equally.
38+
- **Same total emissions**: The subnet's total emissions remain unchanged - multiple mechanisms only redistribute these emissions internally among miners and validators.
39+
- **Transparent allocation**: All emission proportions are visible on-chain, so you can see exactly how subnet owners are distributing emissions.
40+
41+
**What This Means for Your Strategy:**
42+
43+
- **No immediate action required**: Your existing staking strategy doesn't need to change
44+
- **Enhanced monitoring**: You may want to track individual mechanism performance to understand subnet health
45+
- **Risk assessment**: Factor in incentive mechanism design when evaluating subnet quality
46+
- **Community oversight**: Use transparency to hold subnet owners accountable for fair emission distribution
47+
48+
## What Should Miners Know?
49+
50+
**Automatic Participation:**
51+
52+
- **No separate registration**: When you register for a subnet, you are eligible to participate in any of its incentive mechanisms
53+
- **Same UID across all mechanisms**: You use the same UID for all incentive mechanisms within a subnet
54+
55+
**Performance Tracking:**
56+
57+
- **Independent scoring**: Your performance is independent across different mechanisms, e.g. mechanism 0 doesn't affect your rating in mechanism 1.
58+
- **Separate incentive columns**: You'll see individual incentive amounts for each mechanism in metagraph data.
59+
- **Cumulative emissions**: Your total emissions = sum of emissions from all mechanisms where you participate.
60+
61+
## What Should Validators Know?
62+
63+
### Core Changes
64+
65+
- **Separate weight setting**: You must set weights independently for each incentive mechanism.
66+
- **Independent evaluation**: Each mechanism requires separate assessment according to its specific criteria.
67+
- **Separate bond pools**: Each mechanism maintains independent bonding relationships for Yuma Consensus calculations.
68+
- **Same stake weight**: Your stake weight is identical across all mechanisms - no additional stake required.
69+
- **Weighted dividend calculation**: Your dividends are calculated as a weighted sum of your performance across all mechanisms. If you don't validate on all mechanisms, you will receive proportionally reduced emissions.
70+
71+
### Operational Changes
72+
73+
**1. Evaluation Workload:**
74+
75+
- **Multiple assessments**: You must evaluate miners separately for each mechanism's tasks
76+
- **Different criteria**: Each mechanism may have distinct evaluation standards
77+
78+
**2. Data Structure Changes:**
79+
80+
- **Two-dimensional weights**: Weights are now set for each miner on each mechanism.
81+
- **Separate incentive tracking**: Each mechanism tracks incentives independently
82+
- **Extended metagraph**: New columns for mechanism weights and incentives
83+
84+
## What Should Subnet Creators/Developers Know?
85+
86+
### Core Changes
87+
88+
- **Emission distribution**: You can control what percentage of total emissions goes to each incentive mechanism using the `sudo_set_subsubnet_emission_split` extrinsic. When the number of mechanisms is set, the emission distribution is reset to an even split, but you can set it again with custom proportions.
89+
90+
:::info
91+
The `sudo_set_subsubnet_emission_split` extrinsic accepts an optional vector parameter. If the parameter is `None`, the distribution is set to an even split. When it's not `None`, it reflects the proportion of emissions each mechanism gets. The proportion is calculated as `value / 65535`. For example, in a subnet with two mechanisms and vector `[13107, 52428]`, mechanism 0 gets 20% and mechanism 1 gets 80%. <!-- See: subtensor/pallets/subtensor/src/subnets/subsubnet.rs:173-175 -->
92+
:::
93+
94+
- **Incentive mechanism design**: You define the specific tasks and evaluation criteria for each mechanism
95+
- **Transparent configuration**: All mechanism settings are visible on-chain for community oversight
96+
- **Single subnet slot**: No need to register multiple subnets for multiple competitions
97+
- **Immediate mechanism number setting**: The number of mechanisms is set immediately when changed. <!-- See: subtensor/pallets/subtensor/src/subnets/subsubnet.rs:91-116 -->
98+
- **Rate limiting**: Subnet owners can set the number of mechanisms once per 7200 blocks to prevent frequent changes. <!-- See: subtensor/pallets/subtensor/src/lib.rs:1842-1844 -->
99+
100+
:::tip
101+
Ensure proportions sum to 100% when setting them, or the request will be rejected.
102+
:::
103+
104+
## Example Emissions Split
105+
106+
For each subnet, the subnet creator keeps 18% of emissions, 41% is allocated to miners, and 41% to validators and their stakers, unless the subnet creator has reduced their take. Of the 41% that goes to miners and validators, here is an estimated emission distribution across three incentive mechanisms for each 100 $\tau$ earned on the subnet:
107+
108+
- Mechanism 0 (60%): 100 $\tau$ _.41 _ .6 = 24.6
109+
- Mechanism 1 (30%): 100 $\tau$ _.41 _ .3 = 12.3
110+
- Mechanism 2 (10%): 100 $\tau$ _.41 _ .1 = 4.1
111+
112+
:::info Setting Custom Proportions
113+
To achieve the above distribution, the subnet owner would submit the `sudo_set_subsubnet_emission_split` extrinsic with the vector `[39321, 19660, 6554]` (calculated as 60% × 65535, 30% × 65535, 10% × 65535).
114+
:::
115+
116+
Note that a miner who excels in mechanism 0 but performs poorly in others might receive more emissions than a miner who performs moderately across all mechanisms, depending on the emission proportions and their relative performance.
117+
118+
## On-Chain Data Structure
119+
120+
Multiple incentive mechanisms extend the existing metagraph with additional columns:
121+
122+
```
123+
UID | Hotkey | Stake | Mechanism 0 Weights | Mechanism 1 Weights | Mechanism 0 Incentive | Mechanism 1 Incentive
124+
-----|--------|-------|---------------------|---------------------|----------------------|----------------------
125+
123 | 5ABC...| 1000 | [0.3, 0.2, 0.1...] | [0.1, 0.4, 0.2...] | 0.05 τ | 0.02 τ
126+
456 | 7DEF...| 800 | [0.2, 0.3, 0.2...] | [0.2, 0.3, 0.1...] | 0.03 τ | 0.04 τ
127+
```
128+
129+
## Backward Compatibility
130+
131+
- Existing subnets continue with only one incentive mechanism (mechanism 0) collecting all emissions by default
132+
- All existing API calls default to mechanism 0
133+
- No breaking changes to current functionality

sidebars.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ const sidebars = {
5151
"resources/questions-and-answers",
5252
"subnets/understanding-subnets",
5353
"learn/anatomy-of-incentive-mechanism",
54-
"subnets/understanding-sub-subnets",
54+
55+
"subnets/understanding-multiple-mech-subnets",
5556
"learn/neurons",
5657

5758
"learn/emissions",

0 commit comments

Comments
 (0)