Skip to content

fix: recycle treasury emission share when treasury is disabled or unregistered - #975

Closed
aliangm wants to merge 3 commits into
entrius:testfrom
aliangm:fix-treasury-recycle
Closed

fix: recycle treasury emission share when treasury is disabled or unregistered#975
aliangm wants to merge 3 commits into
entrius:testfrom
aliangm:fix-treasury-recycle

Conversation

@aliangm

@aliangm aliangm commented May 4, 2026

Copy link
Copy Markdown
Contributor

Description:

Summary

  • When ISSUES_TREASURY_UID is set to RECYCLE_UID (treasury disabled per constants.py:215) or the treasury neuron is not registered on the metagraph, the 15% treasury share was silently dropped instead of being recycled.
  • Pools 1 (OSS) and 2 (issue discovery) already fall through to recycle_extra when empty; pool 3 (treasury) now does the same so total emissions consistently sum to 100%.
  • Also replaces the ISSUES_TREASURY_UID > 0 guard with the more direct ISSUES_TREASURY_UID != RECYCLE_UID to match the intent stated in the constants comment.

Test plan

  • Validator with treasury UID registered: 15% still flows to treasury, recycle pool unchanged.
  • Validator with ISSUES_TREASURY_UID = RECYCLE_UID: recycle UID receives 25% + 15% = 40% (plus any unclaimed OSS/issue-discovery share).
  • Validator where treasury UID is not in metagraph: same as above — 15% flows to recycle.
  • Sum of emitted weights equals 1.0 in all three cases.

Fixes #974

aliangm added 2 commits May 5, 2026 04:55
…egistered

When ISSUES_TREASURY_UID is set to RECYCLE_UID (disabled) or the treasury
neuron is not registered on the metagraph, the 15% share was silently
dropped. Now it falls through to the recycle pool, matching the behavior
of pools 1 and 2 so total emissions sum to 100%.
@xiao-xiao-mao xiao-xiao-mao Bot added the bug Something isn't working label May 4, 2026
@anderdc

anderdc commented May 8, 2026

Copy link
Copy Markdown
Collaborator

These paths don't fire in production — ISSUES_TREASURY_UID is hardcoded with no runtime override, and on mainnet UIDs are reused so UID 111 stays in the metagraph. Closing.

@anderdc anderdc closed this May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disabled/unregistered treasury silently drops 15% emissions instead of recycling

2 participants