Summary
Every creator currently pays the same protocol fee regardless of how much trading volume they generate. Rewarding high-volume creators with a reduced protocol fee gives them more earnings and incentivizes growing the platform. The admin configures discount tiers by cumulative trade volume, and the contract automatically applies the lowest eligible fee rate to each creator.
Scope
- Add a
DiscountTier config to protocol state: a list of { min_volume: i128, fee_bps: u32 } entries sorted by min_volume ascending
- Track cumulative trade volume per creator: updated on every buy and sell, stored in creator state
- On each buy/sell, determine the applicable fee bps by finding the highest tier the creator's cumulative volume qualifies for
- Add
update_discount_tiers(tiers: Vec<DiscountTier>) admin-only function — replaces the full tier list
- Add
get_discount_tiers() -> Vec<DiscountTier> view function
- Add
get_creator_volume(creator_id) -> i128 view function returning cumulative trade volume
- Maximum 5 discount tiers
Acceptance Criteria
ETA: 24 hours
Coordinate on Telegram
Summary
Every creator currently pays the same protocol fee regardless of how much trading volume they generate. Rewarding high-volume creators with a reduced protocol fee gives them more earnings and incentivizes growing the platform. The admin configures discount tiers by cumulative trade volume, and the contract automatically applies the lowest eligible fee rate to each creator.
Scope
DiscountTierconfig to protocol state: a list of{ min_volume: i128, fee_bps: u32 }entries sorted bymin_volumeascendingupdate_discount_tiers(tiers: Vec<DiscountTier>)admin-only function — replaces the full tier listget_discount_tiers() -> Vec<DiscountTier>view functionget_creator_volume(creator_id) -> i128view function returning cumulative trade volumeAcceptance Criteria
ETA: 24 hours
Coordinate on Telegram