DEX Protocol
Dynamic Trading Fees
This page explains the implementation of dynamic trading fees for the USDC-USDT DEX Pool (#2), wstETH-ETH(#1) and USDC-ETH(#12)
Introduction
Dynamic trading fees were introduced to optimize trading volume while maintaining sustainable rewards for Smart Vault participants, following the execution of IGP#84.
The Dynamic trading fees are also applied on wstETH-ETH(#1) and USDC-ETH(#12) after the execution of IGP#89.
Background
The USDC-USDT DEX Pool (#2) faced volume challenges that required a strategic solution. After careful analysis, we identified two potential approaches:
- Flat Fee Reduction: Lower the fee to a static 0.003%
- Dynamic Fee Structure: Implement a variable fee system based on price deviation
Similarly the dynamic fees have also been applied for wstETH-ETH(#1) and USDC-ETH(#12) in order to benefit the smart collateral and smart debt vault users with most optimized trading APR by micromanaging the trading fees.
How Dynamic Fees Work
The dynamic fee system uses a mathematical function based on the 3x² - 2x³ curve, which provides a smooth, responsive fee adjustment based on price deviation from peg.
Core Mechanics
- Fee Range: Fees dynamically adjust between 0.003% (minimum) and 0.01% (maximum)
- Price Deviation: Fees scale based on how far the USDC/USDT pool price deviates from 1.0
- Mathematical Model: The 3x² - 2x³ curve ensures fees increase proportionally to market volatility
Visual Representation
The fee structure can be visualized with:
- Y-axis: Trading fees (ranging from 0.003% to 0.01%)
- X-axis: Price deviation from 1.0 (e.g., 0.4% deviation means current price is 1.004)
Implementation Example
| Price Deviation | Applied Fee |
|---|---|
| 0.000% (at peg) | 0.003% |
| 0.100% | ~0.004% |
| 0.200% | ~0.006% |
| 0.300% | ~0.008% |
| 0.400%+ | 0.010% |
Benefits of Dynamic Fees
This implementation offers several advantages:
- Enhanced Market Efficiency: Lower fees during stable market conditions encourage trading and arbitrage resulting in higher volumes
- Volatility Protection: Higher fees during price deviations restricts the change of pool price and makes it stay in range
- Balanced Incentives: Optimizes between trading volume and tradingAPR
Future Considerations
The protocol governance continues to monitor this implementation and may propose adjustments based on:
- Market conditions
- Competitive landscape
- Feedback from traders and liquidity providers