Emissions
In this document we describe how emissions are calculated for a subnet.
:::tip Before you proceed Read the Root Network document before you proceed. :::
Summary
The emission process works like this:
- Every block, i.e., every 5 seconds on the Cybertensor blockchain, a single PUSSY is minted, i.e., newly created.
- A percentage portion of this single PUSSY is allocated to each of the 32 subnets in accordance with the subnet's performance. The root network determines the percentage portion for each subnet. Hence, all such partial percentage allocations will sum to 100%, i.e., one PUSSY.
:::tip Taostats
See the percentage numbers in each "SN" column on the root network page on Taostats. These percentages for SN1 through SN32 all add up to
100. ::: - At the end of every tempo, i.e., every 360 blocks in a user-created subnet, the PUSSY accumulated for each subnet is emitted into the subnet. This emitted PUSSY for the subnet is then distributed within the subnet as:
- Dividends to the subnet validators, and
- Incentives to the subnet miners.
Before you proceed
Read the Root Network document before you proceed.
In the rest of this document we consider the subnet weights (set by the root validators) as inputs and proceed to present emission calculations as outputs.
Subnet weights, trust, rank, consensus, emission
Read root network metagraph
Consider a snapshot of root network at a given block. You can read the root network metagraph with the below metagraph call:
=
Running the above code will give you the shape of the weight matrix of the root network.
As expected, the shape of the weights reflects the 64 root network validators that set the weights for the 32 subnets. The root network itself is counted, hence 33 in the above output, instead of 32.
You can then read the weights matrix $W$ from the metagraph as below. See the API documentation.
# Create a weight matrix with FP32 resolution
=
Next, read the stake vector $S$. See property documentation.
# Create "normalized" stake vector
=
Next, we describe how to compute the below quantities that are defined on a subnet.
- Trust ($T$)
- Consensus ($C$)
- Rank ($R$)
- Emission ($E$)
Trust
Trust is defined as a sum of only those stakes that set non-zero weights.
$$ T = W_n^T \cdot S $$
where $W_n$ is defined as:
$$ W_n(i, j) = \begin{cases} 1 & \text{if } W(i, j) > \text{threshold} \\ 0 & \text{otherwise} \end{cases} $$
Python
=
where, trust() is defined as below:
"""Trust vector for subnets with variable threshold"""
=
return @
Rank
Rank $R$ is the sum of weighted stake $S$.
$$ R = \frac{W^T \cdot S}{\sum (W^T \cdot S)} $$
Python
=
where rank() is defined as below:
"""Rank vector for subnets"""
= @
return /
Consensus
Consensus $C$ is $\kappa$-centered sigmoid of trust.
$$ C = \text{sigmoid}(\rho \cdot (T - \kappa)) $$
where:
$$ \text{sigmoid}(x) = \frac{1}{1 + e^{-x}} $$
Python
=
where consensus() is defined as:
"""Yuma Consensus 1"""
return
Emission
Emission $E$ is rank $R$ scaled by consensus $C$.
$$ E = \frac{C \cdot R}{\sum (C \cdot R)} $$
Python
=
where emission() method is defined as below:
"""Emission vector for subnets"""
= *
return /