Skip to content

Recycle transaction fees instead of rewarding block authors - #3053

Open
UnArbosFive wants to merge 6 commits into
mainfrom
revert-block-author-transaction-fees
Open

Recycle transaction fees instead of rewarding block authors#3053
UnArbosFive wants to merge 6 commits into
mainfrom
revert-block-author-transaction-fees

Conversation

@UnArbosFive

@UnArbosFive UnArbosFive commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Motivation

Restore transaction-fee handling so block-producing validators do not receive transaction-fee revenue. Transaction fees are recycled by reducing TAO issuance. Existing AMM swap-fee behavior is unchanged.

Changes

  • Recycle native TAO transaction fees and tips instead of crediting the block author.
  • For Alpha-paid transaction fees, swap the charged Alpha to TAO and atomically recycle the exact TAO output directly from the subnet account.
  • Recycle both EVM base fees and priority fees through the same TAO fee handler.
  • Remove the transaction-fee dependency on block authorship.
  • Rename transaction-fee tests and comments to use "recycle" where issuance is reduced.

Issuance invariants

Tests verify that:

  • Balances total issuance and Subtensor total issuance remain equal.
  • Both issuance ledgers decrease by the exact charged or converted TAO amount.
  • Block-author balances remain unchanged.
  • Alpha swap and TAO recycling changes roll back atomically on failure.
  • Alpha-paid fees work without a block author and when the payer has zero TAO.

Verification

  • cargo fmt --all -- --check
  • cargo test --package subtensor-transaction-fee --lib
  • SKIP_WASM_BUILD=1 cargo test --package node-subtensor-runtime --test evm_transaction_fee
  • cargo clippy --package subtensor-transaction-fee --all-targets -- -D warnings

@vercel

vercel Bot commented Aug 5, 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 5, 2026 10:51pm

Request Review

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

🛡️ AI Review — Skeptic (security review)

VERDICT: SAFE

VERY HIGH account-signal scrutiny (34-day-old account, zero public repos), mitigated by repository admin status and substantive merged work; no Gittensor association found. Branch targets main.

Static analysis confirms that native and EVM fee imbalances reduce both issuance ledgers consistently, while Alpha-paid fees are converted and recycled atomically from the subnet account. No dependencies, origins, storage layout, CI paths, or AI-review trust-boundary files are changed.

Findings

No findings.

Conclusion

No malicious behavior or security vulnerability was found in the current diff.


🔍 AI Review — Auditor (domain review)

VERDICT: 👍

Gittensor association UNKNOWN; newer GitHub account but established repository administrator with substantial contributions. Overlapping PRs address distinct changes.

The implementation consistently recycles native TAO, Alpha-paid, and EVM fees without rewarding block authors. Tests cover issuance consistency, authorless Alpha payments, zero-TAO payers, and atomic rollback.

The description matches the implementation, the runtime spec version is bumped to 444, and no migration is required. Static inspection found no issue requiring runtime confirmation or an auto-fix.

Findings

No findings.

Conclusion

The change is coherent, appropriately tested, and preserves the relevant issuance and atomicity invariants. It is ready to merge.

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@mcjkula

mcjkula commented Aug 5, 2026

Copy link
Copy Markdown

Why is the TAO being recycled, but the TAO from the ALPHA burned? Why wouldn't we also recycle the TAO from the ALPHA-paid fee (it says // Sell the Alpha fee and send the resulting TAO to the burn account.)? Also in multiple places it calls the recycling of TAO "burn", can we please not add more code that conflates the two? It's already difficult enough to understand when "burn" means burn or actually recycling @UnArbosFive

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@UnArbosFive UnArbosFive changed the title Burn transaction fees instead of rewarding block authors Recycle transaction fees instead of rewarding block authors Aug 5, 2026
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@UnArbosFive
UnArbosFive marked this pull request as draft August 5, 2026 16:51
@UnArbosFive UnArbosFive added the no-spec-version-bump PR does not contain changes that requires bumping the spec version label Aug 5, 2026
@UnArbosFive UnArbosFive removed the no-spec-version-bump PR does not contain changes that requires bumping the spec version label Aug 5, 2026
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@UnArbosFive
UnArbosFive marked this pull request as ready for review August 5, 2026 22:31
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants