BasketShares
Storage Map v441 → currentMap (validator_hotkey) to total fund shares outstanding for that basket.
Explore chainThe Big Picture
Decoupling entitlement from composition is what lets holdings be rebalanced, or converted to TAO when a subnet dissolves, without touching anyone claim.
Why This Matters
Shares are the unit that makes a fund fair. Because deposits mint at the pre-deposit NAV, someone joining late cannot dilute you and you cannot free-ride on their entry.
Example Scenario
A fund holds 1,000 TAO of realizable NAV against 1,000,000 shares, so one share is worth 0.001 TAO. A 100 TAO dividend deposit mints roughly 100,000 new shares at that same price, leaving every existing holder worth exactly what they were.
Common Questions
- How do I turn shares into a TAO figure?
- Divide fund NAV by BasketShares for share price, or query root_basket_owed for your position.
- Do shares move when I change root stake?
- Outstanding shares do not. Your entitlement is rebased through the BasketClaimed watermark so accrued yield is neither granted nor destroyed.
Use Cases
- Compute share price alongside fund NAV
- Track fund size over time
From Chain Metadata
MAP ( validator_hotkey ) --> total outstanding basket fund shares `P`. A validator's beta basket is a single fund: its holdings are the escrow stake positions `(hotkey, escrow, netuid)` across subnets (the root slot is the fund's TAO/cash position), and its net asset value `N` is the realizable (slippage-aware) TAO value of those holdings. Stakers' entitlements are denominated in *fund shares*, never in any particular subnet's alpha: deposits mint `value_added * P / N` shares, where `value_added` is the realizable NAV the deposit actually added (so existing holders are neither diluted nor taxed with the deposit's buy slippage), and redemption pays the staker's owed share fraction `owed / P` of every holding, sold pro-rata. Direct deposits (`stake_into_basket`) mint the same way, credited via the signed [`BasketClaimed`] watermark. Because entitlement is decoupled from composition, holdings can be rebalanced (validator-directed trading, dissolution conversions) without touching any staker's claim.
Purpose & Usage
Purpose
Denominator of the fund. Deposits mint shares against the realizable NAV they added; a claim redeems the staker owed fraction of every holding.
Common Query Patterns
- Query by validator hotkey to size the fund
- Pair with BasketRate to compute a staker entitlement
Notes
- Deposits mint value_added * P / N shares, so existing holders are neither diluted nor charged the deposit slippage
- Entitlement is a fraction of the whole fund, never a claim on specific alpha
Query Keys
| # | Name | Type | Description |
|---|---|---|---|
| 1 | validator_hotkey | AccountId [u8; 32] | validator_hotkey (AccountId, hashed key component) (hex -> SS58) |
Stored Value
total (u64)
RAO -> TAO (/ 10^9)
Default Value
Absent keys read as this value — querying a key that has never been written returns this default, not an error or empty result.
Relationships
Related Events
Code Examples
import { createClient, Binary } from "polkadot-api";
import { getWsProvider } from "polkadot-api/ws";
import { sub } from "@polkadot-api/descriptors"; // generated by: npx papi add sub -w wss://entrypoint-finney.opentensor.ai:443
const client = createClient(getWsProvider("wss://entrypoint-finney.opentensor.ai:443"));
const api = client.getTypedApi(sub);
// Query BasketShares storage
const validator_hotkey = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const result = await api.query.SubtensorModule.BasketShares.getValue(validator_hotkey);
console.log("BasketShares:", result);Runtime Info
View Source- Pallet
- SubtensorModule
- Storage Kind
- Map
- First Version
- v441
- Current Version
- v472