Overview
Different protocols use different fee models for cross-chain swaps. This reference provides the exact formulas and calculations used by each protocol.THORChain Fee Structure
THORChain fees consist of three main components: affiliate fees, outbound fees, and liquidity fees (slippage).Fee Components
Formula
Example Calculation
Swap 1 BTC → ETH.USDC with 30 BPS affiliate fee and 150 BPS slippage:Basis Points (BPS) Explained
Slippage Calculation
Streaming Swap Fee Impact
Streaming swaps reduce slippage by splitting large swaps into smaller chunks:- Reduced price impact per sub-swap
- Better average execution price
- Lower total slippage for large amounts
MAYAChain Fee Structure
MAYAChain uses a similar fee model to THORChain with some differences.Fee Components
Same as THORChain but with MAYAChain-specific parameters:CACAO Decimal Handling
Critical: MAYA.CACAO uses 10 decimals instead of 8!Tolerance Parameter Validation
MAYAChain requires only one tolerance parameter:Chainflip Fee Structure
Chainflip uses multiple fee types with different multipliers.Fee Types
Formula
Example Calculation
DCA (Dollar Cost Averaging) Impact
Chainflip supports DCA to reduce price impact:Boost Fee
Optional boost fee for faster execution:Low Liquidity Warning
WhenlowLiquidityWarning: true:
Relay Fee Structure
Relay uses a comprehensive fee model with multiple components.Fee Components
Formula
Example Calculation
App Fee Configuration
Set custom affiliate fees:Price Impact Calculation
Relay differentiates between total impact and swap impact:Multi-Step Route Fees
Each step in a multi-hop route has separate fees:NEAR Fee Structure
NEAR uses a simplified fee model based on USD value difference.Formula
Example Calculation
Gas Fees
NEAR uses fixed gas amounts:Fee Comparison Example
Same swap across different protocols:Scenario: 1 BTC → ETH.USDC
Note: Actual fees vary based on network conditions, liquidity, and current rates.
Fee Optimization Strategies
Minimize Slippage
Choose Optimal Protocol
Balance Speed vs Cost
Best Practices
- Always display total fees in USD for user transparency
- Break down fee components to help users understand costs
- Show price impact separately from network fees
- Use protocol-recommended slippage for low liquidity pools
- Cache outbound fees from THORChain/MAYA APIs (update hourly)
- Account for decimal differences (especially MAYA.CACAO’s 10 decimals)
- Multiply BROKER fees by 1.5x for Chainflip calculations
- Compare effective rates (output/input) across protocols, not just fees
- Warn users about high price impact (>5%) before swap execution
- Update gas prices frequently (every 1-2 minutes) for accurate estimates