Skip to main content

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

Default Slippage: 150 BPS (1.5%) Maximum Slippage: 9999 BPS (99.99%)

Streaming Swap Fee Impact

Streaming swaps reduce slippage by splitting large swaps into smaller chunks:
Benefits:
  • 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

When lowLiquidityWarning: 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

  1. Always display total fees in USD for user transparency
  2. Break down fee components to help users understand costs
  3. Show price impact separately from network fees
  4. Use protocol-recommended slippage for low liquidity pools
  5. Cache outbound fees from THORChain/MAYA APIs (update hourly)
  6. Account for decimal differences (especially MAYA.CACAO’s 10 decimals)
  7. Multiply BROKER fees by 1.5x for Chainflip calculations
  8. Compare effective rates (output/input) across protocols, not just fees
  9. Warn users about high price impact (>5%) before swap execution
  10. Update gas prices frequently (every 1-2 minutes) for accurate estimates