Bittensor alpha-token wrapper (ERC-1155 vault + staking precompile integration).
src/AlphaVault.sol— ERC-1155 vault that wraps staked alphasrc/DepositMailbox.sol— minimal-proxy mailbox for per-user depositssrc/SubnetClone.sol— minimal-proxy stake holder for a single subnetsrc/ValidatorRegistry.sol— admin-managed registry of target validator weights per subnetsrc/interfaces/— Bittensor precompile interfaces (IStaking, IMetagraph, IAddressMapping) + IValidatorRegistrytest/— Foundry tests + mocks for the precompiles
Subtensor dissolves subnets asynchronously. While cleanup is in progress, the vault temporarily freezes share-priced operations for the affected netuid so they cannot price or distribute an incomplete TAO refund.
The blackout is scoped by netuid because Subtensor's precompile does not identify the registration generation being dissolved. As a result, an older, already-dissolved position can also be temporarily non-redeemable while a successor on the same netuid is dissolving. Redemption resumes when that cleanup completes. This conservative availability tradeoff avoids adding per-generation finalization storage and its gas cost to every unwrap.
forge install foundry-rs/forge-std --no-commit
forge install OpenZeppelin/openzeppelin-contracts --no-commit
forge build
forge test