Skip to content

feat: v2 partnerid changes#169

Open
twx-virtuals wants to merge 3 commits into
mainfrom
feat/partner-tax-split
Open

feat: v2 partnerid changes#169
twx-virtuals wants to merge 3 commits into
mainfrom
feat/partner-tax-split

Conversation

@twx-virtuals
Copy link
Copy Markdown
Contributor

@twx-virtuals twx-virtuals commented May 29, 2026

Note

High Risk
Changes on-chain fund distribution after tax swaps; misconfiguration or a zero partner recipient could misroute asset token payouts.

Overview
AgentTaxV2 now supports partner / referrer fee splits on tax swaps. Admins map a bytes32 partnerId to a payout address and, per agent token, set partnerId plus partnerFeeRate (basis points). After a successful swap, post-swap asset is split among protocol (feeRate), partner, and creator (remainder), with transfers and PartnerFeeDistributed events.

New admin entry points: setPartnerRecipient, setTokenPartnerConfig (requires recipient when rate > 0; enforces feeRate + partnerFeeRate ≤ 10000), and updateFeeSplit for the global protocol rate. A view getTokenPartnerConfig exposes per-token partner settings.

Reviewed by Cursor Bugbot for commit 57c9b16. Configure here.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 57c9b16. Configure here.

Comment thread contracts/tax/AgentTaxV2.sol
koo-virtuals
koo-virtuals previously approved these changes May 29, 2026
Comment thread contracts/tax/AgentTaxV2.sol
Comment thread contracts/tax/AgentTaxV2.sol Outdated
Comment thread contracts/tax/AgentTaxV2.sol
Comment thread contracts/tax/AgentTaxV2.sol
Comment thread contracts/tax/AgentTaxV2.sol
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.

2 participants