Skip to main content
SUBMIT A PRSUBMIT AN ISSUElast edit: Feb 20, 2025

Yuma Consensus

Introduction

Yuma Consensus is a critical algorithmic process within Bittensor. Its responsibility is to compute validator and miner emissions from validators' rankings of miners. It inputs the varied perspectives of each of the validators within a subnet—each of which consists of a rating of each miner whose work they've validated%mdash;and resolves this matrix of rankings (a ranking for each miner for each validator) into two emissions vectors, which determine the allocation of the subnet's emissions to miners and validators.

The output weight vector for miners is designed to represent the combined intelligence of the validators, which means weighting the inputs of the validators more depending on how trustworthy they appear to be in order to ignore the portion of the validation signal that is less trustworthy. The output weight vector for validators is meant to reward validators for being trustworthy, i.e. for giving reliable evaluations of miners. By design, miners should be rewarded by their combined evaluation by the community of validators, at the same time validators are being rewarded for evaluating miners in a way that predicts the convergence of other validators' evaluations.

Each of a subnet's validators submit a vector of weights indicating the utility of each miner they've evaluated. These weights are then aggregated into two emissions vectors: one each for miners and validators.

The process has two main steps:

  1. Consensus Clipping – Ensures no minority of validators can unfairly inflate (or deflate) any particular miner’s emissions.

  2. Bonding & Validator Rewards – Rewards validators who align with the consensus view and penalizes those who diverge excessively.

Miner Emissions

Clipping

For each miner jj, gather all validator weights WijW_{ij}. Sort them according to each validator’s stake SiS_i. We then find the maximum weight level supported by at least κ\kappa fraction of total stake (usually κ=0.5\kappa = 0.5):

Wj  =  argmaxw(iSi{Wijw}    κ).\overline{W_j} \;=\; \arg \max_{w} \Bigl(\, \sum_{i} S_i \,\cdot\, \bigl\{\,W_{ij}\,\ge w \bigr\} \;\ge\; \kappa \Bigr).

Any validator’s original weight WijW_{ij} above Wj\overline{W_j} is clipped to Wj\overline{W_j}. This clipping protects against collusive “self-boosting” by a few validators.

Aggregating miner rankings

Miner emissions are based on an aggregate ranking which is the summed rankings of validators, weighted by validators' stake.

Rj  =  iSiWij,R_j \;=\; \sum_{i} S_i \,\cdot\, \overline{W_{ij}},

where Wij\overline{W_{ij}} is the post-clip weight. We normalize across all miners to get each miner’s incentive share, which is the proportion they receive of the subnet's miner-emissions (41% of overall emissions).

Ij  =  RjkRk.I_j \;=\; \frac{\,R_j\,}{\sum_{k} R_k}.

Validator Emissions & Bonds

Penalty for Out-of-Consensus Weights:

A validator whose raw weight WijW_{ij} greatly exceeds the consensus Wj\overline{W_j} does not just see it clipped for miner incentives; it can also affect that validator’s bond. A penalty factor β\beta determines how much a validator’s inflated weighting is “slashed” when calculating bonds:

Wij~  =  (1β)Wij  +  βWij.\widetilde{W_{ij}} \;=\; (1-\beta)\,W_{ij} \;+\;\beta\,\overline{W_{ij}}.

Bonding Mechanics:

The instant bond ΔBij\Delta B_{ij} is a fraction of the validator’s stake Si\,S_i allocated to miner jj, normalized by the total for that miner:

ΔBij=SiWij~kSkWkj~.\Delta B_{ij} = \frac{\,S_i \,\cdot\, \widetilde{W_{ij}}\,}{ \sum_{k} S_k \,\cdot\, \widetilde{W_{kj}} }.

This then updates an exponential moving average (EMA) bond, typically:

Bij(t)=αΔBij  +  (1α)Bij(t1).B_{ij}^{(t)} = \alpha \,\Delta B_{ij} \;+\; (1-\alpha)\,B_{ij}^{(t-1)}.

The EMA smooths out abrupt swings in validator behavior and rewards consistent alignment with the consensus.

Validator Rewards:

Each miner jj pays out IjI_j in emission. A validator ii earns from miner jj an amount proportional to the bond BijB_{ij}. Summed across all miners, the validator’s total dividend DiD_i is:

Di  =  j(Bij×Ij).D_i \;=\; \sum_{j} \Bigl(\,B_{ij} \,\times\, I_j\Bigr).

The validators collectively receive the ξ\xi-fraction of total emission; thus validator ii receives

ξ×Di\xi \times D_i

out of the subnet’s emission pool.

In essence, validators who stay near consensus build stronger EMA bonds and thus claim higher rewards, while any attempt to overstate a miner’s performance (or understate honest miners) leads to penalty in both the aggregator process (via clipping) and in bonding (via β\beta slashing).

The Bittensor API is designed to enable subnet owners to write their own incentive mechanisms. These incentive mechanisms allow the subnet validators to express their own subjective preferences about what the network should learn. Such an approach:

  1. Facilitates the economic market in which producers (subnet miners) are constantly driven to make their knowledge output more useful in terms of speed, intelligence and diversity.
  2. And also decentralizes Bittensor's governance across multiple diverse stakeholders, ensuring that no single group has full control over what is learned.

Weights

A subnet validator in a subnet expresses their perspective about how performant subnet miners in the subnet are, through a set of weights wiw_i.

Such weights wiw_i are aggregated across all the subnet validators in the subnet, to produce a weight matrix WW. Subnet validators learn their row in WW by running the validator module and continuously verifying the responses produced by the subnet miners in terms of speed, intelligence and diversity.

Example

For example, the below code prints the WW matrix of a subnet with the netuid of 1. You can print such WW matrix for any other subnet by passing its netuid.

import bittensor as bt
subnet = bt.metagraph( netuid = 1, lite = False)
print ('weights', subnet.W )

Ranks, trust, consensus, incentive

The Yuma Consensus algorithm translates the weight matrix WW into incentives for the subnet's miners and validators.

However, radical divergence from consensus view points is dangerous, especially if bad actor validators manipulate incentives in ways that benefits themselves, for example, lying about the value produced by miners.

To avoid this scenario Bittensor uses a mechanism called Yuma Consensus. The Yuma Consensus incentivizes subnet validators to produce miner-value evaluations that are in agreement with those of other subnet validators, weighted by stake.

The below example code prints the values of S, subnet validator stake, and W, subnet validator weights for a subnet with the netuid of 1:

import bittensor as bt
subnet = bt.metagraph( netuid = 1, lite = False)
print ('subnet 1 validator stake', subnet.S )
print ('subnet 1 validator weights', subnet.W )