Skip to content

Add SN7 and SN74 subnet alpha assets with hub pairs (PR2) - #708

Open
LandynDev wants to merge 15 commits into
feat/alpha-backing-familyfrom
feat/alpha-assets
Open

Add SN7 and SN74 subnet alpha assets with hub pairs (PR2)#708
LandynDev wants to merge 15 commits into
feat/alpha-backing-familyfrom
feat/alpha-assets

Conversation

@LandynDev

@LandynDev LandynDev commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Add SN7 and SN74 subnet alpha as swappable assets, paired with the hubs only (sol<->sn7, tao<->sn7, sol<->sn74, tao<->sn74). Stacked on #707.

Registry

  • CHAIN_SN7 / CHAIN_SN74: TAO's env prefix, clock and reorg depth; netuid + backing_family='tao'. constants.family() is the Python twin of backing.rs::family (prefix rule; a test pins registry rows to it). LAUNCH_ALPHAS launches the hub pairs.
  • hub_leg / declarable_backings / canonical_pair learn the family rule: the literal hub anchors, else the family-bearing leg (an alpha is its own scoring family, spec §6). LAUNCH_PAIRS stays in canonical order (pinned). Alpha<->spoke pairs are deliberately absent — they mint new scoring families and are gated behind [BLOCKED: emissions redesign] Activate alpha-spoke pairs (PR3) #709.

Asset

  • assets/alpha.py: first real use of the Asset/Chain seam — Alpha binds the existing Tao as its chain. Settlement = a top-level SubtensorModule.transfer_stake (matched by name, no pallet indices) whose extrinsic emitted ExtrinsicSuccess AND StakeTransferred, with the alpha amount read from the call args (the event carries the TAO-equivalent). Sends pick the hotkey holding the most alpha, mev_protection=False, per-asset dedup.
  • Tao's block-window scan, cursor scanner and prior-send resolution are lifted into chain-level methods parametrized by the asset's decoder; Tao's own paths are thin, behaviour-identical wrappers.
  • can_deliver_to / delivery_refused / cancel_evidence read TransferToggle and SubtokenEnabled (subnet-level, not user-weaponizable — spec §4.5).

Cover check (spec §5)

  • swap_intake.leg_value is the Python twin of LegBind: exact legs first, a declared alpha leg is valued at spot via Alpha.value_rao. Same function sizes collateral_amount at intake, gates the user's deposit, and gates the validator's initiate vote. Binary, no tolerance.

CLI: alw miner quotes --sn7-price / --sn74-price derive from LAUNCH_ALPHAS; the alpha address IS the TAO address — no new flags, no new env vars.

Tests: uv run pytest (full suite) + ruff. Testnet validates the full mechanism on sn7<->tao (spec §9).

Emissions: hub pairs land inside the existing sol/tao families — 31 -> 35 pairs, alpha share 0%.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant