Fees and Wait Times

Swap Fees and Delay

Fee Types

Users pay up to four two kinds of fees when conducting a swap.
  1. 1.
    Layer1 Network Fees (gas): paid by the user when sending the asset to THORChain to be swapped. This is controlled by the user's wallet.
  2. 2.
    Slip Fee: protects the pool from being manipulated by large swaps. Calculated as a function of transaction size and current pool depth. The slip fee formula is explained here and an example implementation is here.
  3. 3.
    Affiliate Fee - (optional) a percentage skimmed from the inbound amount that can be paid to exchanges or wallet providers.
  4. 4.
    Outbound Fee - the fee the Network pays on behalf of the user to send the outbound transaction. Usually ~3x the inbound fee.
The Swap Quote endpoint will calculate and show all fees.
See the fees section for full details.

Refunds and Minimum Swap Amount

If a transaction fails, it is refunded, thus it will pay the outboundFee for the SourceChain not the DestinationChain. Thus devs should always swap an amount that is a maximum of, (plus an added buffer to account for potential gas spikes):
  1. 1.
    The Destination Chain outboundFee, or
  2. 2.
    The Source Chain outboundFee, or
  3. 3.
    $1.00 (the minimum outboundFee).
The outbound fee for each chain is returned on the Inbound Addresses endpoint, priced in the gas asset of that chain.
So, the steps to determine the minimum swappable amount for a pair:
  1. 1.
    Retrieve the outbound_fee for the source chain and destination chain from the Inbound Addresses endpoint
  2. 2.
    Convert both outbound_fees to the input asset of the swap using the Flat Exchange Rate
  3. 3.
    Take the max of those two values
  4. 4.
    Add a 50% buffer to that amount to allow for gas spikes and inbound confirmation time

Wait Times

There are four phases of a transaction sent to THORChain each taking time to complete.
  1. 1.
    Layer1 Inbound Confirmation - assuming the inboundTx will be confirmed in the next block, it is the source blockchain block time.
  2. 2.
    Observation Counting - time for 67% THORChain Nodes to observe and agree on the inboundTx.
  3. 3.
    Confirmation Counting - for non-instant finality blockchains, the amount of time THORChain will wait before processing to protect against double spends and re-org attacks.
  4. 4.
    Outbound Delay - dependent on size and network traffic. Large outbounds will be delayed.
  5. 5.
    Layer1 Outbound Confirmation - Outbound blockchain block time.
Wait times can be between a few seconds up to an hour. The assets being swapped, the size of the swap and the current network traffic within THORChain will determine the wait time.
The Swap Quote endpoint will calculate points 3 and 4.
See the Delays section for full details.