Skip to content

Feat/ Move Stake Limit - #3084

Merged
unarbos merged 5 commits into
release-448from
feat/move-stake-limit
Aug 18, 2026
Merged

Feat/ Move Stake Limit#3084
unarbos merged 5 commits into
release-448from
feat/move-stake-limit

Conversation

@UnArbosSix

@UnArbosSix UnArbosSix commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Motivation

Moving stake between different hotkeys and subnets currently lacks the slippage protection available to limited stake swaps. This PR adds a price-limited move operation so callers can require a minimum destination-alpha/origin-alpha ratio and choose fill-or-kill or partial execution.

Closes #3081.

Changes

  • Adds the move_stake_limit runtime extrinsic and dispatch implementation.
  • Adds benchmarking and weight accounting for the new operation.
  • Exposes the call through chain extensions, ink!, the staking V2 EVM precompile and ABI, proxy filters, transaction-fee handling, Rust/Python SDK interfaces, and generated calls.
  • Enables default slippage protection for cross-subnet Python move_stake intents.
  • Adds pallet, chain-extension, precompile, SDK, fee, indexer, and end-to-end test coverage, including fill-or-kill and partial-fill behavior with distinct hotkeys.

Behavioral impact

For cross-subnet moves, limit_price is the minimum acceptable destination-alpha per origin-alpha ratio scaled by 1e9. With allow_partial = false, the call fails atomically when the requested amount cannot execute within the limit. With allow_partial = true, it moves only the amount executable before crossing the limit. Same-subnet moves continue to transfer stake directly between hotkeys.

The Python move_stake intent now selects this limited call by default for cross-subnet moves, using the current origin/destination price ratio and configured tolerance. Users may explicitly disable slippage protection.

Runtime and migration

This is a runtime API/extrinsic change with no storage migration. runtime/src/lib.rs bumps spec_version from 447 to 448.

Testing

Added focused coverage for runtime dispatch, full and partial limit behavior, chain-extension dispatch, EVM precompile dispatch, transaction fees, SDK policy and call construction, generated/indexer compatibility, and a zombienet end-to-end flow.

@vercel

vercel Bot commented Aug 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
subtensor Ready Ready Preview Aug 18, 2026 4:43pm

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

eco-tests changed — indexer review required

This PR modifies files under eco-tests/. and may affect downstream indexing.
cc @evgeny-s — please review manually

Changed files
  • eco-tests/src/tests_mentat_indexer.rs

@github-actions

github-actions Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

🛡️ AI Review — Skeptic (security review)

VERDICT: SAFE

VERY HIGH account-tier scrutiny (47-day-old account, zero public repos), mitigated by repository write access, substantial merged work, matching primary authorship, and no Gittensor association; feat/move-stake-limit → main.

The added interfaces preserve signed-coldkey authorization and delegate to the established stake-transition path with bounded weight accounting. The latest ABI-vendoring commit introduces no dependency or review trust-boundary changes, and spec_version remains correctly bumped to 448.

Findings

No findings.

Prior-comment reconciliation

  • b9754bac: addressedruntime/src/lib.rs increments spec_version from 447 to 448.

Conclusion

No malicious behavior or security vulnerability was found in the static review. The previously resolved runtime-version concern remains addressed.


🔍 AI Review — Auditor (domain review)

VERDICT: 👍

Gittensor association: UNKNOWN. Active repository contributor with write access and substantial recent merged work; reviewed with full runtime/economic scrutiny.

The implementation consistently exposes move_stake_limit across the runtime, chain extension, EVM precompile and ABI, SDKs, proxy filters, fee handling, and generated interfaces. It reuses the established limited stake-transition path, includes fill-or-kill and partial-fill coverage, adds a benchmark and weight, and bumps spec_version to 448.

No meaningful duplicate implementation was identified among the overlapping open PRs. Static review was sufficient; no runtime confirmation or auto-fix was needed.

Findings

No findings.

Conclusion

The change is internally consistent, appropriately tested, and follows the established slippage-limited staking design without introducing a substantive correctness issue.

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: VULNERABLE

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@UnArbosSix UnArbosSix added the skip-cargo-audit This PR fails cargo audit but needs to be merged anyway label Aug 18, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@UnArbosSix
UnArbosSix changed the base branch from main to release-448 August 18, 2026 19:53
@unarbos
unarbos merged commit 126a5ba into release-448 Aug 18, 2026
100 of 104 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-cargo-audit This PR fails cargo audit but needs to be merged anyway

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add price-protected cross-hotkey stake moves (move_stake_limit and full variant)

2 participants