Subnet emissions -> Equivalent alpha airdrop#1
Open
igoraxz wants to merge 3 commits into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.