Skip to content

Add protocol fee collection on every buy and sell trade execution #888

Description

@Chucks1093

Summary

Implement protocol fee deduction on every buy and sell transaction, routing the fee to the protocol revenue pool for distribution to stakers.

Scope

  • Fee percentage configurable by admin in contract storage
  • Fee deducted from trade amount before bonding curve calculation
  • Fee transferred to protocol revenue pool address atomically
  • FeeCollected event emitted with trade ID, amount, and fee
  • Fee percentage capped at configurable maximum to protect traders

Acceptance Criteria

  • Fee deducted correctly from every buy and sell transaction
  • Fee routed to protocol revenue pool atomically with trade
  • FeeCollected event emitted with correct fields
  • Fee percentage update restricted to admin
  • Cap enforced on fee percentage to prevent admin abuse

ETA

24 hours

Activity

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

Metadata

Metadata

Assignees

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