-
Notifications
You must be signed in to change notification settings - Fork 18
BIT-0015: Subnet Owner Emission Splitting #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
vstam1
wants to merge
1
commit into
opentensor:main
Choose a base branch
from
taofu-labs:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,196 @@ | ||
# BIT-0015: Subnet Owner Emission Splitting | ||
|
||
- **BIT Number:** 0015 | ||
- **Title:** Subnet Owner Emission Splitting | ||
- **Author(s):** vstam1 | ||
- **Status:** Draft | ||
- **Type:** Subtensor | ||
- **Created:** 11-08-2025 | ||
- **Updated:** 11-08-2025 | ||
- **Requires:** - | ||
- **Replaces:** - | ||
|
||
## Abstract | ||
|
||
This proposal introduces a subnet owner key emission splitting system that allows subnet owners to automatically distribute their alpha emissions among multiple sub-owner-keys using proportional shares. Building on the existing childkey delegation framework, this system enables subnet owners to define a list of sub-owner-keys that receive a predetermined portion of the owner's cut from subnet emissions. This enhancement supports collaborative development models, multi-party ownership structures, and separation of ownership control from reward distribution without requiring complex external smart contracts. | ||
|
||
## Motivation | ||
|
||
Currently, subnet owners receive their alpha rewards as a single, indivisible payment through the `owner_cut` distribution mechanism. This creates several limitations in the Bittensor ecosystem: | ||
|
||
1. **Limited Collaboration Models**: Multiple developers, investors, or contributors cannot automatically receive their share of subnet rewards, requiring manual redistribution or complex external arrangements. | ||
|
||
2. **Rigid Ownership Structure**: The current system forces all ownership benefits to flow to a single entity, preventing natural business partnerships and investment structures where multiple parties should share in the success. | ||
|
||
3. **Separation of Concerns**: Owners cannot easily separate their control functions from reward distribution, limiting possibilities for treasury management, automated distributions, or smart contract integrations. | ||
|
||
4. **Manual Distribution Overhead**: Any reward sharing currently requires manual transfers, | ||
creating operational burden, operational security (security) issues and potential disputes. | ||
|
||
The existing childkey delegation system already provides a proven model for proportional stake distribution that can be adapted for owner rewards, making this enhancement a natural extension of existing Bittensor functionality. | ||
|
||
## Specification | ||
|
||
### New Storage Items | ||
|
||
```rust | ||
/// Maps netuid to a vector of (proportion, sub_owner_account) | ||
pub(super) type OwnerEmissionSplits<T: Config> = StorageMap< | ||
_, | ||
Blake2_128Concat, | ||
NetUid, | ||
Vec<(u64, T::AccountId)>, // (proportion, sub_owner_coldkey) | ||
ValueQuery, | ||
>; | ||
|
||
/// Pending owner emission splits (with cooldown mechanism) | ||
pub(super) type PendingOwnerEmissionSplits<T: Config> = StorageMap< | ||
_, | ||
Blake2_128Concat, | ||
NetUid, | ||
(Vec<(u64, T::AccountId)>, u64), // (splits, cooldown_block) | ||
OptionQuery, | ||
>; | ||
``` | ||
|
||
### New Extrinsic | ||
|
||
```rust | ||
pub fn schedule_owner_emission_splits( | ||
origin: OriginFor<T>, | ||
hotkey: T::AccountId, | ||
netuid: NetUid, | ||
splits: Vec<(u64, T::AccountId)>, | ||
) -> DispatchResult | ||
``` | ||
|
||
### Modified Owner Cut Distribution | ||
|
||
```rust | ||
// Distribute the owner cut with splits support | ||
if let Ok(owner_coldkey) = SubnetOwner::<T>::try_get(netuid) { | ||
if let Ok(owner_hotkey) = SubnetOwnerHotkey::<T>::try_get(netuid) { | ||
let splits = OwnerEmissionSplits::<T>::get(netuid); | ||
|
||
if splits.is_empty() { | ||
// Original behavior - all to owner | ||
log::debug!( | ||
"owner_hotkey: {:?} owner_coldkey: {:?}, owner_cut: {:?}", | ||
owner_hotkey, | ||
owner_coldkey, | ||
owner_cut | ||
); | ||
let real_owner_cut = Self::increase_stake_for_hotkey_and_coldkey_on_subnet( | ||
&owner_hotkey, | ||
&owner_coldkey, | ||
netuid, | ||
owner_cut, | ||
); | ||
|
||
// If the subnet is leased, notify the lease logic that owner cut has been distributed. | ||
if let Some(lease_id) = SubnetUidToLeaseId::<T>::get(netuid) { | ||
Self::distribute_leased_network_dividends(lease_id, real_owner_cut); | ||
} | ||
} else { | ||
// Distribute among splits | ||
Self::distribute_owner_cut_with_splits( | ||
&owner_hotkey, | ||
&owner_coldkey, | ||
netuid, | ||
owner_cut, | ||
splits, | ||
); | ||
} | ||
} | ||
} | ||
``` | ||
|
||
### Execution of Scheduled Changes | ||
|
||
Similar to childkey delegation, scheduled emission splits are executed during the epoch process. The system automatically processes pending splits that have passed their cooldown period during the `block_step()` function execution, ensuring splits are activated in a systematic and secure manner without requiring additional user intervention. | ||
|
||
### Stake Allocation | ||
|
||
All sub-owners stake to the owner hotkey, maintaining the existing staking structure while enabling proportional emission distribution. This ensures compatibility with current validator and consensus mechanisms. | ||
|
||
## Rationale | ||
|
||
### Design Decision: Building on Childkey System | ||
|
||
This proposal leverages the existing childkey delegation framework for several reasons: | ||
|
||
1. **Proven Architecture**: The childkey system already handles proportional distributions, validation, and storage patterns that work well for this use case. | ||
|
||
2. **Consistent User Experience**: Users familiar with childkey delegation will immediately | ||
understand the owner splitting mechanism. | ||
|
||
3. **Reusable Components**: Cooldown mechanisms can be adapted from the existing system. | ||
|
||
### Alternative Approaches Considered | ||
|
||
1. **External Smart Contract Distribution**: While possible, this approach would require subnet | ||
owners to implement complex ownership logic in smart contracts and manage the interaction | ||
between Subtensor and EVM systems. Additionally, smart contracts would need to be maintained | ||
and updated as the Bittensor protocol evolves, creating compatibility risks with the fast-changing | ||
system. This also creates a high entry barrier for subnet owners who may not be experts in | ||
blockchain development, limiting participation to those with advanced technical skills or | ||
requiring expensive external development resources. | ||
|
||
2. **Immediate Effect Changes**: Adding a cooldown period (similar to childkeys) prevents rapid manipulation and provides stability. | ||
|
||
### Limitations and Trade-offs | ||
|
||
- **Maximum 10 Split Recipients**: Prevents excessive gas costs and storage bloat while supporting most practical use cases. This is more flexible than the childkey system's 5-child limit since each subnet has only one owner compared to multiple validators. | ||
- **Cooldown Period**: Adds delay but prevents abuse and ensures stability. | ||
- **No Nested Splits**: Sub-owners cannot further split their portions, keeping the system simple and preventing complex dependency chains. | ||
- **Leased Subnet Restrictions**: Subnets that are still in a lease period cannot set emission distributions, as the owner key remains under system ownership during the lease. Only after the lease period concludes and full ownership transfers to the beneficiary can emission splitting be configured. | ||
|
||
## Backwards Compatibility | ||
|
||
This proposal maintains full backwards compatibility: | ||
|
||
1. **Default Behavior Unchanged**: Subnets without configured splits continue to operate exactly as before, with all owner emissions flowing to the original owner. | ||
|
||
2. **Existing Storage Preserved**: No changes to existing storage items or data structures. | ||
|
||
3. **API Compatibility**: All existing RPC calls and queries continue to work unchanged. | ||
|
||
4. **Migration**: No migration is required. Existing subnets can optionally adopt the splitting system when ready. | ||
|
||
The only change is the addition of new extrinsics and storage, with the owner cut distribution logic enhanced to check for splits before proceeding with the original behavior. | ||
|
||
## Open Questions | ||
|
||
### Coldkey Swap Behavior | ||
|
||
When subnet ownership is transferred via coldkey swap, there are two potential approaches for handling existing emission splits: | ||
|
||
1. **Preserve Splits**: Sub-owners remain unchanged and can be altered by the new owner once the swap is completed. This provides continuity but may not reflect the new owner's intentions. | ||
|
||
2. **Clear Splits**: Sub-owner splits are automatically removed when the coldkey swap is scheduled, requiring the new owner to explicitly configure new splits. This ensures clean ownership transfer but disrupts existing arrangements. | ||
|
||
The implementation choice will need to balance continuity with security and clear ownership transfer expectations. | ||
|
||
|
||
## Security Considerations | ||
|
||
### Potential Attack Vectors | ||
|
||
1. **Owner Key Compromise**: If an owner's key is compromised, an attacker could redirect all future rewards. This risk exists in the current system and is not increased by this proposal. | ||
|
||
|
||
### Mitigations | ||
|
||
1. **Ownership Verification**: Only the verified subnet owner can set splits, using the same verification as other owner operations. | ||
|
||
2. **Cooldown Period**: Prevents rapid manipulation and gives time to detect unauthorized changes. | ||
|
||
3. **Rate Limiting**: The cooldown mechanism inherently provides rate limiting for changes. | ||
|
||
### Impact on Protocol Security | ||
|
||
This proposal does not affect the core consensus or economic security of Bittensor. It only modifies how existing owner rewards are distributed, without changing the total amount or the earning mechanism. | ||
|
||
## Copyright | ||
|
||
This document is licensed under [The Unlicense](https://unlicense.org/). |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally don't know if preserving the splits would make sense, given most of the time the coldkey swap is done to transfer the ownership from entity A to entity B.
In the case of the owner actually just swapping from coldkey A to coldkey B, it sounds less like a "problem" for them to rearrange the splits, than possibly a new owner not knowing of the existing splits, having their cut drained by the previous owner. (just an idea/worst case of malicious selling)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disagree here, as a subnet should be owned by the 'sub-owners', not the owner. IMO this feature is best used to get rid of the concept of a singular owner completely and instead have lots of fractional owners - i.e. decentralised ownership
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed /w Namoray here.
The whole point of adding an sn owner split is to split up the ownership of the subnet.
If an ownership transfer results in "full" transfer of the ownership the smaller owner shares are basically rendered to Null.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what I meant, isn't it? Should the underlying "SN owner" key be CK swapped (resulting in a full-transfer), then the sub-owners/splits should be removed/cleared.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Depending to whom the CK is swapped, I think he sub-owners should or should no be cleared. If its an internal transfer, clearing the sub-owners doesn't make sense and requires more operation burden. However, they should probably be cleared for a transfer to another party. Then the question is, when should the sub owners be cleared? During the scheduling of the transfer, or during the actual transfer 5 days layer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do agree that by default the sub-owners should be cleared. Maybe we can add an "is_internal" key to the swap_coldkey call that skips this. And clearing should happen during actual transfer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think trying to automate some clearing of sub-owners has very little pros and a huge con
If you do that, it removes the ability to have decentralised ownership. They aren't sub owners, and the implementation is then just a small convenience to prevent manual transfers, and I see little reason to implement that. There is still a 'true' owner key and all the ramifications of that.
If you don't have this small convenience, then you have actual true split ownership. Each coldkey are completely independent, and each actually own a fraction of the subnet, which is incredibly useful for legal & operational reasons + removes trust. It actually allows the decentralisation of that ownership.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea of having multiple "owners" (not just the emission splitting). Seems like a larger/different proposal though and then there is also this. A question though if there would be no "true" owner in case of multiple ones, how would the emission split be decided for example, just
0.18/n_owners
or can any one of them propose to change the split and requiresm of n_owners
to sign (multi-sig like)? I assume changing hyperparameters would then also bem of n_owners
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This proposal is mostly for splitting the ownership emissions from the ownership actions. For example you could already make your independent coldkey structure with a multisig, where you need a majority of the multisig signers to change hyperparams. However you would also need all signing for moving alpha around which is not optimal. You can look at the structure in the image below. We have implemented it for SN65, so this is already possible.
What my proposal tries to accomplice is to make the emission distribution simpler when dealing with multiple parties. When you are talking about a small convenience, in the case of the setup above, you would need multiple signatures for each alpha transfer. With this proposal you can make a distribution, and you would only need the signatures if you want to alter the distribution. So it is also a nice building block for building out more complicated voting structures later on, where the multisig is replaced with a full on chain governance system for example. Hope this clarifies the intention of the proposal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Emission splits could be as simple as; anyone can give away some or all of their share to another key.
And hyperparams would be X% of emissions required for example.
With what Vstam1 implemented combined with the subnet leasing feature, everything I described may already be achievable.