Exponential Moving Averages (EMAs) in Bittensor
The exponential moving average (EMA) is a mathematical technique for tracking a dynamic quantity, such as a token price, over time. Specifically, EMA is a weighted moving average that exponentially decreases the weight of older data point. This extracts a signal reflecting where the value has spent most of its time most recently, stabilizing or 'smoothing' the constant noise of rapid, largely random fluctuations.
Bittensor uses EMAs to smooth two critical dynamical values during the emission process:
-
Emissions to each subnet are determined by an EMA-smoothed representation of subnet price each tempo. This protects emissions from price volatility or intentional manipulation.
-
Emissions to participants of each subnet are determined by EMAs of instantaneous validator-miner bond-strengths. This plays an important role in ensuring that validators and miners are fairly rewarded for innovation, as measured by eventual consensus (rather than immediate consensus) about miner weights.
Mathematical definition
The EMA of a changing value at a given time is determined by weighted average of the current value and the EMA at the last time step. The parameter factor, or 'smoothing factor' is called .
The alpha parameter controls how quickly the EMA responds to changes:
- Small (e.g., 0.01): Very slow response, high stability, takes many periods for significant changes
- Large (e.g., 0.5): Fast response, lower stability, quickly incorporates new information
- = 1: No smoothing (immediate response to current value)
Note that this alpha parameter is distinct from and unrelated to the usage of 'alpha' to refer to subnet-specific currencies.
Subnet Price Emission Smoothing
This use of EMA smoothing protects the network's economic model from price manipulation by making emissions extremely slow to respond to price changes.
How It Works: The price EMA uses a sophisticated dynamic alpha calculation to ensure that new subnets have even slower price adaptation than mature ones.
The value for base_alpha in the above is currently ~0.0003 for Bittensor mainnet ("finney").
See:
Validator-Miner Bond Smoothing
This smoothing function ensures that relationships between validators and miners evolve gradually, preventing sudden manipulation while rewarding validators who discover promising miners early.
Basic Bond EMA (Liquid Alpha Disabled)
Default Mode: Single for all validator-miner pairs
- Default : ~0.1 (10%)
- Response Time: 7-22 blocks for significant changes (~1-4 minutes)
- Formula The EMA of the bond (BondEMA)of a validator i for a miner j, at time t, is the -weighted average of the instantaneous bond and the previous timestep's BondEMA:
Advanced Bond EMA (Liquid Alpha Enabled)
Consensus-Based Mode: Dynamic per validator-miner pair based on consensus alignment
- Range: Dynamic between _low and _high (default: 0.7 to 0.9)
- Sigmoid Steepness: Controls transition rate between _low and _high (default: 1000)
- Individual Alpha: Each validator-miner pair gets its own value
- Response Time: 1-13 blocks depending on consensus alignment (~12 seconds to 2.6 minutes)