Dynamic Fees
HyperAMM uses a dynamic fee model that adjusts to real-time market conditions. Fees are composed of four components, each serving a specific purpose.
Fee Components
1. Base Fee
A minimum fee applied to all swaps. This covers the baseline cost of hedging and ensures LPs always earn a minimum return.
2. Imbalance Fee
Adjusts based on the pool's current liquidity balance. When a swap would push the pool further from its ideal composition, the fee increases to discourage further imbalance. Swaps that help rebalance the pool receive a discount.
3. Market Impact Fee
Scales with order size relative to available liquidity. Larger trades incur higher fees to compensate LPs for the increased hedging cost and slippage risk. The sensitivity is controlled by a miFactor parameter calibrated off-chain from order book analysis.
4. Premium Adjustment
Protects the pool when the perpetual mark price deviates from the oracle (spot) price or when the settlement stablecoin depegs. Unlike the other fee components, this is not added as a fee — it adjusts the price at which the pool quotes swaps, ensuring the pool is not mispriced relative to Core markets.
How Fees Adjust
The fee engine uses real-time data from multiple sources:
- Oracle prices — Spot and perpetual mark/oracle prices for pricing and premium calculations
- Core delta — Current hedge position size for imbalance calculations
- MIFactor — Pre-calibrated market impact parameter maintained by an off-chain keeper
- Mark-oracle spread — Perpetual mark price vs. oracle price for premium adjustments
Fees are calculated per-swap and displayed to users before they confirm the trade.
What This Means for Users
For Traders
- Small swaps in the direction that rebalances the pool get the best rates
- Large swaps or swaps that increase imbalance cost more
- Total fee is always visible in the swap quote before confirmation
For LPs
- Dynamic fees ensure LPs are compensated for the actual cost and risk of each trade
- Higher volatility and larger order flow generate higher fees
- Fee revenue is automatically distributed proportionally to all LP token holders
Fee Configuration
Fee parameters are configured per-pool by the protocol and can be adjusted via governance. Key parameters include:
- Base fee percentage
- Market impact factor (MIFactor) — calibrated from order book depth
- Imbalance penalty and discount caps
- Maximum stable price divergence (circuit breaker for stablecoin depegs)
Next Steps
- Oracle-Based AMM — How prices feed into fee calculations
- Liquidity Pools — How fees contribute to LP returns