Skip to content

Conversation

Subham2804
Copy link
Contributor

@Subham2804 Subham2804 commented Sep 4, 2025

Overview

Implements staking-based fee discounts for Mars Credit Manager users based on their MARS token staking tier.

Key Features
8-tier system: 0% to 80% fee discounts based on MARS staked (10k to 1.5M+ tokens)
Applies to: Swap fees and perpetual trading fees
Integration: Queries DAO staking contract for user voting power
Implementation
New staking.rs module with StakingTierManager
Updated swap.rs and perp.rs to apply discounts
New query endpoints for tier information
Benefits
Incentivizes long-term MARS staking
Configurable tier thresholds and discounts
No breaking changes to existing functionality

@Subham2804 Subham2804 changed the title Add Fee rate change Add Staking Tier Discount on Fees Sep 4, 2025
@Subham2804 Subham2804 marked this pull request as ready for review September 6, 2025 03:18
Copy link
Collaborator

@markonmars markonmars left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! That was a much heavier lift than we thought but in general looks really good.

I think we need to add some more test coverage around modifying fees while a user is in a position, and the position modification in general, so that we have more confidence that there are no side effects from the changes.

@markonmars markonmars requested review from piobab and removed request for markonmars September 22, 2025 03:30
@Subham2804 Subham2804 merged commit 1bc4361 into master Oct 3, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants