Skip to content

Subnet emissions -> Equivalent alpha airdrop#1

Open
igoraxz wants to merge 3 commits into
mainfrom
2025-12-29-ym67
Open

Subnet emissions -> Equivalent alpha airdrop#1
igoraxz wants to merge 3 commits into
mainfrom
2025-12-29-ym67

Conversation

@igoraxz

@igoraxz igoraxz commented Dec 29, 2025

Copy link
Copy Markdown
Owner

No description provided.

igoraxz added a commit that referenced this pull request Jun 19, 2026
…open guard, safer recycle

Acts on an external PR audit:
- #1 terminal settlement order-dependence: price every position's K_D/cover
  against ONE frozen pre-settlement reserve snapshot (spec §11.1) instead of
  reserves mutated by earlier positions' escrow restoration. Short + long.
  Adds order-independence regression tests (short + long) vs the frozen snapshot.
- opentensor#7 warm-EMA open guard: reject open_short/open_long with ColdEmaNotAllowed when
  pEMA==0 (fresh subnet); removes the cold-EMA griefing surface. Converts the
  prior cold-EMA-open test to expect rejection-then-admit-after-warm.
- opentensor#8 recycle_custody_tao: withdraw-then-reduce-issuance (is_ok-gated) so a capped
  withdraw shortfall can never desync TotalIssuance.
- docs: mark in-kind close + fee-pool divergence + warm-EMA gate in DESIGN.md.
- #4 long terminal equity survival verified already handled (settle-before-destroy
  ordering + dereg_long_equity_survives_full_dissolve_path); no code change.

78 derivatives tests + 1261 full pallet suite pass.

Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
igoraxz added a commit that referenced this pull request Jun 19, 2026
…micity + guards

Acts on the second external audit:
- #1 (blocker) split-neutrality: terminal cover is now priced ONCE on the
  aggregate liability (q_sigma / d_sigma) against the frozen snapshot and
  allocated per-position pro-rata (ceiling), so the convex CPMM buyback can no
  longer be gamed by splitting a liability across coldkeys (Σ k_i ≥ K(ΣQ)).
  Short + long; adds split-neutrality + order-independence (aggregate) tests.
- #3 dissolve atomicity: do_dissolve_network is now #[transactional] so a
  failure in destroy_alpha_in_out_stakes / clear_protocol_liquidity rolls back
  the derivative terminal settlement.
- #5 hard compile-time MAX_POSITIONS_CEILING (1024) clamped in both
  max-positions setters, bounding dereg/decay work regardless of governance.
- #6 quote_open_short/long now mirror the open rejections (cold EMA, below-min,
  capacity) so quotes are unavailable exactly when an open would reject.
- #4 tiny-pEMA capacity self-limiting test; #2 doc: terminal K_D is
  derivative-internal CPMM accounting (conservative), now split-neutral.

80 derivatives tests + 1264 full pallet suite pass.

Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
igoraxz added a commit that referenced this pull request Jun 19, 2026
… doc reconcile

Acts on the third external review:
- #1 add dereg_settlement_rolls_back_on_later_failure: proves the (already
  present) #[transactional] on do_dissolve_network rolls back terminal settlement
  (position + custody + aggregate) when a later dissolve leg errors.
- #2 terminal settlement transfer failures are no longer silent: the
  custody-invariant-breach branches log::error! loudly (kept best-effort so the
  dereg sweep always completes; the emitted equity already reflects only what was
  actually paid, so no silent underpayment/false claim).
- #3 reconcile DESIGN.md to ONE authoritative model: derivative lifecycle legs
  are one-sided reserve mutations (CPMM-internal accounting), terminal K_D is
  CPMM-internal not fee/weight-aware live swap, sim_swap is read-only-quote-only,
  fee/weighted divergence is an accepted launch approximation gated by trading games.

81 derivative tests pass; fmt + clippy clean.

Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
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