TotalHotkeyShares

Storage Map v233 → current

Total shares held by hotkey stakers.

Explore chain
Queried by: validatorsdelegatorsstakersanalytics

The Big Picture

Shares are the internal accounting unit for tracking proportional ownership. When you stake, you receive shares proportional to your contribution. TotalHotkeyShares is the sum of all shares - divide your shares by this to get your ownership percentage.

Why This Matters

What's your share of this validator? (Your shares / TotalHotkeyShares) = your percentage. This determines your cut of any emissions the validator earns.

Example Scenario

Query TotalHotkeyShares(hotkey=validator_X) returns 10000000000. You have 1000000000 shares. Your ownership = 1B / 10B = 10%. You receive 10% of emissions after validator take.

Common Questions

How are shares different from alpha?
Shares track proportional ownership. Alpha is the stake itself. Share prices can vary - early stakers might get more shares per alpha if the pool has grown.
Can I have a large share of a small validator?
Yes. A small validator has fewer TotalHotkeyShares, so the same stake gives you a larger percentage. Higher risk (validator may underperform) but potentially higher share of earnings.

Use Cases

  • Calculate your percentage ownership of a validator
  • Track share dilution as new delegators join
  • Build share-based emission calculators
  • Analyze stake distribution fairness
  • Research delegator dynamics

From Chain Metadata

DMAP ( hot, netuid ) --> total_alpha_shares | Returns the number of alpha shares for a hotkey on a subnet.

Purpose & Usage

Purpose

Track proportional ownership for rewards - the denominator for share-based calculations.

Common Query Patterns

  • Query by hotkey
  • Calculate individual share percentages
  • Track share dilution over time

Query Keys

#NameTypeDescription
1
key1
AccountId key1 (AccountId) (hex -> SS58)
2
key2
u16 key2 (u16)

Stored Value

value (FixedU128)

Relationships

Code Examples

import { ApiPromise, WsProvider } from "@polkadot/api";
import { stringCamelCase } from "@polkadot/util";

const provider = new WsProvider("wss://entrypoint-finney.opentensor.ai:443");
const api = await ApiPromise.create({ provider });

// Query TotalHotkeyShares storage
const key1 = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const key2 = 0;

const result = await api.query
  [stringCamelCase("SubtensorModule")]
  [stringCamelCase("TotalHotkeyShares")](
  key1,
  key2
);

console.log("TotalHotkeyShares:", result.toHuman());

On-Chain Activity

Write Frequency
●●●●●● Ultra-High >10M est. writes

>10M estimated writes

#5 most written storage item

Write Source User Extrinsics

Modified via user-submitted extrinsics

As of block 7,429,232

Runtime Info

View Source
Pallet
SubtensorModule
Storage Kind
Map
First Version
v233
Current Version
v393