Skip to content

Add co-creator revenue split so teams can share creator fees automatically on every trade #516

Description

@Chucks1093

Summary

Many creators work in teams or with collaborators. Currently the entire creator fee goes to one address. A co-creator split lets the creator register a partner address and a split percentage at registration so the contract automatically divides the creator fee between them on every buy and sell — no manual sharing needed.

Scope

  • Add optional co_creator: Option<CoCreatorConfig> to register_creator
    • CoCreatorConfig { address: Address, share_bps: u32 }
    • share_bps is the co-creator's share of the creator fee (e.g. 3000 = 30%)
    • share_bps must be between 1 and 9999 inclusive
  • On every buy and sell, split the creator fee: share_bps portion to co-creator, remainder to creator fee recipient
  • Add get_co_creator(creator_id) -> Option<CoCreatorConfig> view function
  • Emit CoCreatorFeeEarned { creator_id, co_creator, amount, ledger } on each trade where a co-creator receives a fee
  • Co-creator config is immutable after registration
  • None means all creator fees go to the creator fee recipient as before

Acceptance Criteria

  • Co-creator receives correct share of creator fee on buy and sell
  • Remaining creator fee goes to the creator fee recipient
  • Split sums to 100% of the creator fee with no leakage
  • get_co_creator returns correct config
  • CoCreatorFeeEarned event emitted on every qualifying trade
  • Invalid share_bps (0 or 10000+) reverts at registration

ETA: 24 hours


Coordinate on Telegram

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official Campaign

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions