Miner incentive tao outflow#5
Draft
igoraxz wants to merge 1 commit into
Draft
Conversation
7fdad8f to
081d48c
Compare
Count miner emission as virtual user outflow in net TaoFlow, so a subnet that routes miner emission to wallets it controls and holds it does not gain emission share without the sell pressure a subnet pays when its miners sell. Genuine sales of that alpha are counted exactly once. - Every miner incentive (all UIDs) is counted as outflow at emission, valued at the moving (EMA) alpha price (smoothed -> resists epoch-block dump/pump), into the signed SubnetMinerIncentiveFlow accumulator whose EMA (SubnetEmaMinerIncentiveFlow) is subtracted from user flow. - Miner alpha staked to a wallet is tagged with a per-position TAO credit MinerOriginCredit((netuid,hotkey,coldkey)) equal to the value counted. - On a genuine sale (unstake_from_subnet) the credit is consumed pro-rata and reversed out of SubnetMinerIncentiveFlow; the real sale is recorded at realized price, so each emission unit counts once (at emission if held, at realized value if sold). Pro-rata + TAO reversal is exact for fungible share-pool alpha (no clamp; correct under appreciation and dilution); the price-limit refund restores credit for the unsold portion (rounded so reversal never over-counts). - decrease_stake_for_hotkey_and_coldkey_on_subnet returns the consumed credit; callers route it -- sale reverses, same-subnet transfer and hotkey/coldkey swaps carry it to the destination (merging), burn/recycle/dust discard it. - Owner/burn-hotkey emission is counted but uncredited (destroyed, never sold). - MinerIncentiveFlowEnabled (default on) gates the user-flow subtraction; the EMA is always kept warm. sudo_set_miner_incentive_flow_enabled (root, call index 96). Dereg clears the credit map; positions with no credit default to zero. Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
081d48c to
334d53a
Compare
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.
Summary
Counts miner emission as virtual user outflow in net TaoFlow, so a subnet that routes miner emission to wallets it controls and holds it does not gain emission share without the sell pressure a subnet pays when its miners sell. Genuine sales of that alpha are counted exactly once (no double-counting).
Why
Net TaoFlow allocates emission by
user_flow - protocol_cost, whereuser_flowis an EMA of buys minus sells. Miner emission that is held (not sold) creates no sell pressure, so a subnet that diverts miner emission to a controlled wallet and holds it keeps a higheruser_flowthan a subnet whose miners receive and sell their emission. Counting miner emission as virtual outflow removes that asymmetry.Mechanism
incentive(all UIDs) is counted as outflow at emission time, valued at the moving (EMA) alpha price (smoothed over a window, so a flash dump or pump at the epoch block cannot move it), and accumulated into the signedSubnetMinerIncentiveFlow. Its EMA (SubnetEmaMinerIncentiveFlow) is subtracted from the subnet's user flow.MinerOriginCredit((netuid, hotkey, coldkey))equal to the value counted at emission.unstake_from_subnet), the credit is consumed pro-rata and reversed out ofSubnetMinerIncentiveFlow. The real sale is recorded as user outflow at its realized price, so each unit of emission contributes to outflow once: at emission if held, or at the realized sale value if sold.decrease_stake_for_hotkey_and_coldkey_on_subnetreturns the credit it consumed; callers route it: a sale reverses it, a same-subnet transfer and hotkey/coldkey swaps carry it to the destination position (merging), and burn/recycle/dust removal discards it (the emission-time count stands, since destroyed alpha is never sold).MinerIncentiveFlowEnabled(default on) gates the subtraction from user flow; the EMA is always updated so toggling causes no shock.sudo_set_miner_incentive_flow_enabled(root, call index 96) is the kill switch. Subnet deregistration clears the credit map for the netuid. Positions with no recorded credit default to zero, so their alpha counts as outflow on sale.Invariant
Per position, lifetime credit reversed on sales is at most the lifetime credit recorded at emission (consumption is floored, i.e. conservative). Equivalently: miner emission is counted as outflow once — at emission if held, or via the realized sale otherwise — and never twice.
🤖 Generated with Claude Code