|
| 1 | +# Weight Copying in Bittensor |
| 2 | + |
| 3 | +This page explains **weight copying**—a free-riding behavior where validators copy other validators' work instead of independently evaluating miners. This article covers how weight copying works, why it's problematic, how Bittensor's [commit-reveal](./commit-reveal.md) mechanism prevents it, and best practices for subnet owners. |
| 4 | + |
| 5 | +## What is weight copying? |
| 6 | + |
| 7 | +In Bittensor subnets, validators are supposed to independently evaluate miners and set weights based on their performance. These weights determine miner emissions through [Yuma Consensus](../learn/yuma-consensus.md). |
| 8 | + |
| 9 | +**Weight copying** occurs when a validator reads the publicly available weight matrix and copies (or derives from) other validators' weights instead of doing their own evaluation work. This allows them to: |
| 10 | +- Avoid the computational cost of evaluation |
| 11 | +- Avoid the development cost of building good evaluation systems |
| 12 | +- Still earn validator dividends by appearing to participate in consensus |
| 13 | + |
| 14 | +While this might seem like a minor optimization, it undermines the entire incentive mechanism and can lead to cascading failures in subnet quality. |
| 15 | + |
| 16 | +## The problem with weight copying |
| 17 | + |
| 18 | +### 1. Degraded subnet quality |
| 19 | + |
| 20 | +Validators are the quality control mechanism for subnets. When validators copy weights instead of independently evaluating miners: |
| 21 | +- Bad miners can persist longer than they should |
| 22 | +- Good innovations from new miners take longer to be recognized |
| 23 | +- The subnet's ability to produce quality output degrades over time |
| 24 | + |
| 25 | +### 2. Unfair validator rewards |
| 26 | + |
| 27 | +Weight copiers earn dividends without doing the work. This creates several problems: |
| 28 | +- Honest validators who invest in good evaluation systems earn less per TAO staked |
| 29 | +- Delegators may unknowingly stake to weight copiers instead of honest validators |
| 30 | +- The economic incentive to build better validation systems is weakened |
| 31 | + |
| 32 | +### 3. Centralization pressure |
| 33 | + |
| 34 | +If weight copying is more profitable than honest validation, rational actors will copy weights. This can lead to: |
| 35 | +- Most validators becoming weight copiers |
| 36 | +- Only 1-2 validators doing real evaluation work |
| 37 | +- Effective centralization of subnet governance |
| 38 | + |
| 39 | +### 4. Consensus manipulation |
| 40 | + |
| 41 | +Sophisticated weight copiers can actually shift consensus in harmful ways (explained below), potentially taking bribes from miners or extracting value through strategic weight setting. |
| 42 | + |
| 43 | +## How weight copying works: The optimized strategy |
| 44 | + |
| 45 | +Weight copiers don't just blindly copy one validator—they use an **optimized strategy** that actually gives them *higher* returns than any single honest validator: |
| 46 | + |
| 47 | +### The stake-weighted averaging attack |
| 48 | + |
| 49 | +1. **Read the current weight matrix**: Weight copiers wait for weights to be publicly revealed |
| 50 | +2. **Calculate stake-weighted consensus**: They compute what Yuma Consensus will calculate as the "center" of opinion |
| 51 | + ``` |
| 52 | + For each miner i: |
| 53 | + consensus_weight[i] = Σ(validator_weight[i] × validator_stake) / Σ(validator_stake) |
| 54 | + ``` |
| 55 | +3. **Submit the consensus weights**: By submitting weights that match the predicted consensus, they maximize their vtrust (validator trust score) |
| 56 | +4. **Earn maximum dividends**: Higher vtrust → higher dividends per TAO staked → higher APY |
| 57 | + |
| 58 | +### Why this works |
| 59 | + |
| 60 | +In Yuma Consensus, validators are rewarded based on how well their weights align with the emerging consensus. By calculating the stake-weighted average, weight copiers can predict consensus better than any individual honest validator who might have some disagreement with others. |
| 61 | + |
| 62 | +**Result**: Weight copiers achieve higher validator dividends per stake than honest validators, making weight copying more profitable than honest work. |
| 63 | + |
| 64 | +### Example scenario |
| 65 | + |
| 66 | +Imagine two honest validators: |
| 67 | +- **Validator A**: 1M TAO staked, weights miner 1 as `1.0` (excellent) |
| 68 | +- **Validator B**: 2M TAO staked, weights miner 1 as `0.5` (mediocre) |
| 69 | + |
| 70 | +**Honest validators** submit their true evaluations and will have some divergence from final consensus. |
| 71 | + |
| 72 | +**Weight copier** calculates: |
| 73 | +``` |
| 74 | +consensus = (1.0 × 1M + 0.5 × 2M) / (1M + 2M) = 0.67 |
| 75 | +``` |
| 76 | + |
| 77 | +The weight copier submits `0.67` for miner 1, perfectly matching where consensus will land, and earns higher vtrust than either honest validator. |
| 78 | + |
| 79 | +## Advanced weight copying: Consensus manipulation |
| 80 | + |
| 81 | +With enough stake, weight copiers can do even worse: |
| 82 | + |
| 83 | +### Shifting consensus for profit |
| 84 | + |
| 85 | +A weight copier with significant stake can: |
| 86 | +1. Calculate where consensus *would* be without them |
| 87 | +2. Shift their weights to move consensus in a desired direction |
| 88 | +3. Accept bribes from miners to shift consensus their way |
| 89 | + |
| 90 | +**Example**: A miner might pay a weight copier to give them higher weights, knowing that the copier's stake will shift overall consensus upward, resulting in higher miner emissions. |
| 91 | + |
| 92 | +### Why this is hard to detect |
| 93 | + |
| 94 | +- The weight copier is still "participating" in consensus |
| 95 | +- Their weights might look reasonable on the surface |
| 96 | +- Only sophisticated analysis can detect the manipulation pattern |
| 97 | + |
| 98 | +## How commit-reveal prevents weight copying |
| 99 | + |
| 100 | +The [commit-reveal mechanism](./commit-reveal.md) solves weight copying by introducing a time delay between when weights are set and when they're publicly visible: |
| 101 | + |
| 102 | +### The concealment period |
| 103 | + |
| 104 | +1. Validators set weights normally |
| 105 | +2. Weights are encrypted using time-lock encryption |
| 106 | +3. Weights remain hidden for a configured number of tempos (the `commit_reveal_period`) |
| 107 | +4. Weights are automatically revealed after the concealment period |
| 108 | +5. Revealed weights are used in Yuma Consensus calculations |
| 109 | + |
| 110 | +### Why weight copiers can't win |
| 111 | + |
| 112 | +When weights are concealed for one or more tempos: |
| 113 | +- Weight copiers only have access to **stale weights** from previous tempos |
| 114 | +- If miner performance has changed since those old weights were set, the old weights are inaccurate |
| 115 | +- Copying stale weights causes validators to **diverge from consensus** rather than align with it |
| 116 | +- Lower alignment → lower vtrust → lower dividends |
| 117 | +- **Weight copying becomes unprofitable** |
| 118 | + |
| 119 | +### The requirement: Dynamic scoring |
| 120 | + |
| 121 | +Commit-reveal only works if **miner performance actually changes** over the timescale of the concealment period. If: |
| 122 | +- Miner rankings are static |
| 123 | +- Performance is completely predictable |
| 124 | +- No new miners register or old miners improve |
| 125 | + |
| 126 | +Then even stale weights will be accurate, and weight copying can still work. |
| 127 | + |
| 128 | +**Solution**: Subnet owners should design subnets that demand continuous miner improvement, ensuring that weights from yesterday are less accurate than fresh evaluations today. |
| 129 | + |
| 130 | +## Historical context: The CRv3 bug |
| 131 | + |
| 132 | +Understanding how weight copying evolved helps explain why the current system works the way it does. |
| 133 | + |
| 134 | +### Commit-reveal v3 (CRv3): The same-tempo vulnerability |
| 135 | + |
| 136 | +In the third version of commit-reveal: |
| 137 | +- Validators committed weights (encrypted) |
| 138 | +- Validators revealed weights (decrypted) **in the same tempo** |
| 139 | +- Both operations happened before the epoch calculation |
| 140 | + |
| 141 | +### The exploit |
| 142 | + |
| 143 | +Weight copiers discovered they could: |
| 144 | +1. Wait for honest validators to reveal their weights (still in the same tempo) |
| 145 | +2. Quickly calculate the stake-weighted consensus |
| 146 | +3. Submit their own weights before the epoch calculation at the end of the tempo |
| 147 | +4. Still achieve higher vtrust than honest validators |
| 148 | + |
| 149 | +Despite weights being "concealed," the same-tempo reveal gave weight copiers enough time to copy and submit. |
| 150 | + |
| 151 | +### The fix: Commit-reveal v4 (CRv4) |
| 152 | + |
| 153 | +CRv4 fixed this by: |
| 154 | +- Using [Drand time-lock encryption](https://drand.love/docs/timelock-encryption/) for automatic reveals |
| 155 | +- Ensuring reveals happen at the *start* of the next tempo |
| 156 | +- Making the reveal timing cryptographically guaranteed (no manual validator action) |
| 157 | +- Eliminating the window for weight copiers to act |
| 158 | + |
| 159 | +See [Commit-Reveal documentation](./commit-reveal.md) for full technical details. |
| 160 | + |
| 161 | +## The decline of weight copying |
| 162 | + |
| 163 | +Since the deployment of CRv4 and increased subnet owner awareness, weight copying has become significantly less profitable: |
| 164 | + |
| 165 | +### Statistics (as of late 2024) |
| 166 | + |
| 167 | +Weight copying validator collective: |
| 168 | +- **Alpha stake**: Decreased from ~8M TAO to ~4.5M TAO |
| 169 | +- **Subnet coverage**: Decreased from 50+ subnets to ~35 subnets |
| 170 | +- **Validator count**: Major weight copying operations show declining participation |
| 171 | + |
| 172 | +This decline demonstrates that commit-reveal, when properly configured, effectively neutralizes the weight copying advantage. |
| 173 | + |
| 174 | +### Why some weight copiers persist |
| 175 | + |
| 176 | +Despite the declining profitability: |
| 177 | +1. **Some subnets don't enable commit-reveal** (it's optional, not mandatory) |
| 178 | +2. **Some subnets have static scoring** (weights don't change much over time) |
| 179 | +3. **Short-term profit extraction** is still possible before delegators move stake |
| 180 | +4. **Information asymmetry** means some delegators don't yet understand the problem |
| 181 | + |
| 182 | +## Best practices for subnet owners |
| 183 | + |
| 184 | +### 1. Enable commit-reveal (strongly recommended) |
| 185 | + |
| 186 | +Set these hyperparameters: |
| 187 | +``` |
| 188 | +commit_reveal_weights_enabled: true |
| 189 | +commit_reveal_period: 1 # Start with 1 tempo |
| 190 | +``` |
| 191 | + |
| 192 | +**Why**: While technically optional, commit-reveal should be considered essential for any subnet that wants to avoid weight copying. |
| 193 | + |
| 194 | +See [Commit-Reveal configuration guide](./commit-reveal.md#configuring-commit-reveal). |
| 195 | + |
| 196 | +### 2. Ensure dynamic miner evaluation |
| 197 | + |
| 198 | +Design your subnet so that: |
| 199 | +- Miner performance changes frequently (at least every few tempos) |
| 200 | +- New miners can demonstrate improvements |
| 201 | +- Task difficulty or evaluation criteria evolve over time |
| 202 | +- Validators must continuously evaluate to maintain accurate weights |
| 203 | + |
| 204 | +**Example**: Text generation subnets that rotate prompts daily, or prediction markets that constantly have new questions. |
| 205 | + |
| 206 | +### 3. Configure appropriate commit-reveal periods |
| 207 | + |
| 208 | +**General guidance**: |
| 209 | +- **Fast-changing subnets** (daily performance shifts): 1-2 tempo concealment is sufficient |
| 210 | +- **Medium-changing subnets** (weekly performance shifts): 3-5 tempo concealment |
| 211 | +- **Slow-changing subnets** (monthly performance shifts): Consider if commit-reveal is right fit, or redesign subnet to be more dynamic |
| 212 | + |
| 213 | +**Rule of thumb**: The concealment period should be shorter than the typical time it takes for miner rankings to significantly change. |
| 214 | + |
| 215 | +### 4. Monitor validator behavior |
| 216 | + |
| 217 | +Watch for signs of weight copying: |
| 218 | +- Validators with suspiciously high vtrust relative to their evaluation quality |
| 219 | +- Validators whose weights perfectly track consensus with no leading/lagging |
| 220 | +- Validators who only submit weights shortly after reveals (if you can observe this) |
| 221 | +- Validators registered on many subnets but with minimal evaluation infrastructure |
| 222 | + |
| 223 | +### 5. Educate your validator community |
| 224 | + |
| 225 | +Make sure validators understand: |
| 226 | +- Why commit-reveal is enabled |
| 227 | +- How to configure their systems properly |
| 228 | +- The immunity period requirements (see below) |
| 229 | +- That they should continue calling `set_weights()` normally (commit-reveal is transparent) |
| 230 | + |
| 231 | +### 6. Set adequate immunity periods |
| 232 | + |
| 233 | +**Critical requirement**: `immunity_period` (in blocks) must be longer than `commit_reveal_period × tempo` |
| 234 | + |
| 235 | +If immunity period is too short, newly registered miners may be deregistered before their weights are revealed and counted. |
| 236 | + |
| 237 | +**Formula for updating**: |
| 238 | +``` |
| 239 | +new_immunity_period = (new_commit_reveal_period × tempo - old_commit_reveal_period × tempo) + old_immunity_period |
| 240 | +``` |
| 241 | + |
| 242 | +See [Commit-Reveal and Immunity Period](./commit-reveal.md#commit-reveal-and-immunity-period). |
| 243 | + |
| 244 | +## Why not make commit-reveal mandatory? |
| 245 | + |
| 246 | +There's ongoing debate in the Bittensor community about whether commit-reveal should be mandatory for all subnets. |
| 247 | + |
| 248 | +### Arguments for mandatory commit-reveal |
| 249 | + |
| 250 | +1. **Eliminates weight copying as a viable strategy** across the entire network |
| 251 | +2. **Levels the playing field** for honest validators |
| 252 | +3. **Improves overall network quality** by ensuring real evaluation work |
| 253 | +4. **Simpler for subnet owners** (one less decision to make) |
| 254 | +5. **Aligns with long-term network health** over short-term flexibility |
| 255 | + |
| 256 | +### Arguments for optional commit-reveal |
| 257 | + |
| 258 | +1. **Subnet autonomy**: Owners should control their own subnet mechanics |
| 259 | +2. **Experimentation**: Some subnets might find novel uses for immediate weight visibility |
| 260 | +3. **Edge cases**: Subnets using Yuma v1 or other specialized configurations might not need it |
| 261 | +4. **Transition period**: Forced upgrades can disrupt existing operations |
| 262 | + |
| 263 | +### Current status |
| 264 | + |
| 265 | +As of now, commit-reveal remains **optional**. However, the recommendation from core developers is to enable it unless you have a specific, well-understood reason not to. |
| 266 | + |
| 267 | +## Detection and analysis |
| 268 | + |
| 269 | +### For delegators: Identifying weight copiers |
| 270 | + |
| 271 | +If you're delegating TAO, watch for these red flags: |
| 272 | +- Validator registered on many subnets (40+) without corresponding infrastructure |
| 273 | +- High validator APY without clear explanation of evaluation methodology |
| 274 | +- Validator started earning immediately upon registration (no ramp-up period) |
| 275 | +- Declining stake over time as informed delegators move away |
| 276 | + |
| 277 | +### For researchers: Analysis tools |
| 278 | + |
| 279 | +The Bittensor blockchain is fully transparent. You can: |
| 280 | +- Analyze weight submission timing patterns |
| 281 | +- Compare validator weights to consensus over time |
| 282 | +- Calculate vtrust correlations across validators |
| 283 | +- Identify clusters of validators with suspiciously similar weight patterns |
| 284 | + |
| 285 | +## The bigger picture |
| 286 | + |
| 287 | +Weight copying is one example of a broader category of challenges in decentralized incentive mechanisms: |
| 288 | + |
| 289 | +### Free-riding vs. value creation |
| 290 | + |
| 291 | +Any system that rewards participation must: |
| 292 | +- Make it possible to verify that real work was done |
| 293 | +- Make copying or faking work more expensive than doing real work |
| 294 | +- Ensure that short-term extraction is less profitable than long-term contribution |
| 295 | + |
| 296 | +### Progressive hardening |
| 297 | + |
| 298 | +Bittensor's approach has been: |
| 299 | +1. Launch with simple, elegant mechanism |
| 300 | +2. Observe what attacks emerge in practice |
| 301 | +3. Add targeted defenses (like commit-reveal) |
| 302 | +4. Continue evolving as new patterns appear |
| 303 | + |
| 304 | +This is healthier than trying to design perfect mechanisms upfront, which often creates unnecessary complexity or misses real-world attack vectors. |
| 305 | + |
| 306 | +## Related documentation |
| 307 | + |
| 308 | +- [Commit-Reveal mechanism](./commit-reveal.md) - Full technical details on how commit-reveal works |
| 309 | +- [Yuma Consensus](../learn/yuma-consensus.md) - Understanding the consensus algorithm that weight copying tries to game |
| 310 | +- [Subnet Hyperparameters](../subnets/subnet-hyperparameters.md) - How to configure commit-reveal and immunity periods |
| 311 | +- [Weight Copying technical paper (PDF)](pathname:///papers/BT_Weight_Copier-29May2024.pdf) - Academic analysis |
| 312 | +- [Blog: Weight Copying in Bittensor](https://blog.bittensor.com/weight-copying-in-bittensor-422585ab8fa5) - Community-focused explanation |
| 313 | + |
| 314 | +## Summary |
| 315 | + |
| 316 | +Weight copying is a sophisticated free-riding strategy where validators earn rewards without doing evaluation work. Through stake-weighted consensus prediction, weight copiers historically earned higher returns than honest validators. |
| 317 | + |
| 318 | +**Commit-reveal v4 effectively neutralizes weight copying** by ensuring validators only have access to stale weights, making copying unprofitable as long as miner performance changes over time. |
| 319 | + |
| 320 | +**Subnet owners should enable commit-reveal** with appropriate concealment periods and ensure their subnets demand continuous miner improvement. This maintains the integrity of the incentive mechanism and ensures that validator rewards go to those doing real evaluation work. |
| 321 | + |
| 322 | +The decline of weight copying following CRv4 deployment demonstrates that well-designed cryptographic mechanisms can effectively solve economic attacks in decentralized systems. |
| 323 | + |
0 commit comments