Skip to content

Tier-based fee rebates & discounts #220

Description

@DevMuhdishaq

Description
get_user_tier exists and swaps use tiered fees; formalize a configurable fee-discount schedule so higher tiers pay proportionally lower fees.

Direction

  • In tiers.rs/fee_progression, define a tier→discount-bps table (admin-configurable).
  • Apply the discount inside the swap fee computation; expose get_effective_fee_bps(user, pair).
  • Ensure discounts compose safely with the dynamic-fee suite (no negative/underflow fees).

Acceptance criteria

  • Higher-tier users are charged a lower effective fee on identical swaps.
  • get_effective_fee_bps matches the fee actually deducted in a swap.
  • Discount cannot drive fees below zero.
  • Admin can update the discount table; non-admin cannot.
  • Tests cover each tier boundary.

Metadata

Metadata

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions