Skip to content

Referral Fee Auto-Distribution at Settlement #263

@Luluameh

Description

@Luluameh

Background
Issue 52 designs a referral program. This issue implements the on-chain settlement logic: referral fees should be paid out automatically when a referred expert earns from a session.
Goal
During settle_session, if the expert has a referrer, calculate and transfer the referral commission atomically.
Acceptance Criteria

  • Referral commission = expert_earnings * referral_bps / 10000.
  • Deducted from platform fee, not expert earnings.
  • Commission only applies for the first 50 sessions of a referred expert (configurable).
  • Emits ReferralCommissionPaid { referrer, referee, amount }.
    Key Files
    contracts/src/lib.rs, contracts/src/governance.rs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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