Skip to content

CONTRACTS: Implement Token Royalty System #504

@truthixify

Description

@truthixify

Description
Add royalty mechanism to automatically distribute fees to creators and stakeholders when tokens are transferred or sold.

Files to Modify

  • contracts/manage_hub/src/royalty.rs - Create royalty module
  • contracts/manage_hub/src/types.rs - Add royalty structures
  • contracts/manage_hub/src/membership_token.rs - Integrate royalty payments
  • contracts/manage_hub/src/lib.rs - Add royalty endpoints

Key Changes Required

  • Royalty Configuration - Set royalty percentages per token
  • Payment Distribution - Automatically distribute royalties on transfers
  • Multiple Recipients - Support multiple royalty recipients
  • Royalty History - Track all royalty payments
  • Update Mechanism - Allow updating royalty configurations
  • Query Functions - Add functions to retrieve royalty info

Acceptance Criteria

  • Implement set_royalty function with percentage and recipients
  • Add automatic royalty calculation on transfers
  • Support multiple royalty recipients with different percentages
  • Emit RoyaltyPaid events with payment details
  • Add get_royalty_info query function
  • Implement royalty payment history tracking
  • Validate royalty percentages (max 100%)
  • Support royalty-free transfers for specific cases

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave program

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions