How do Fees Work in THORChain?
This is an example of swapping ERC-20 USDC (also identified as ETH.USDC in THORChain) to native BTC.
The yellow boxes are inputs/fees paid from users’ wallets.
The blue boxes are paid automatically by THORChain on users’ behalf, but taken from the users’ swap amount.
Introduction
The underlying concept is that THORChain validator nodes monitor and operate addresses (vaults) on each of the connected external blockchains (BTC, ETH/ERC20, BNB/BEP2, BCH, LTC and DOGE currently), as well as controlling the accounting of all the native RUNE and synths within the THORChain blockchain itself. Everything happens in a decentralized on-chain manner.
Inbound Fees
The way to communicate with THORChain is via on-chain transactions which include specifically formatted instructions in the memo field. And this is why the inbound transaction fee is always paid from your own wallet. It doesn’t make sense for “THORChain to subtract the inbound fee from my swap amount”, because if you don’t pay the inbound fee yourself, the inbound transaction will not be executed on the blockchain, and THORChain will never receive your instructions. For example, if you want to swap some ERC-20 USDC on THORChain, you must have ETH in your wallet to pay for the inbound gas fee to send the USDC to THORChain’s vault address.
This inbound transaction also applies to the instruction to withdraw from your Liquidity Pool (LP). This withdrawal instruction is also an on-chain transaction, and therefore needs the relevant gas fees to be paid from your wallet. Specifically, for symmetrical and RUNE-asymmetrical LPs, the withdrawal instruction transaction must be from the THORChain blockchain (gas paid in native RUNE); while for asset-asymmetrical LPs, the withdrawal instruction transaction will be from the respective asset blockchain.
Network / Slippage Fees
For every activity/transaction in THORChain (e.g. swaps, adding/withdrawing liquidity) there is a network fee which is currently 0.02 RUNE.
When you do swaps (or asymmetrical LP deposits/withdrawals), there is a slippage component. Update: there are streaming swaps now!
Both of these fees will be deducted from your outbound asset, thus you are not paying these fees directly from your wallet.
Outbound Fees
When you receive an asset from THORChain (be it from a swap or a LP withdrawal), this is again an on-chain transaction sent by THORChain from one of its addresses/vaults to your wallet. Operationally, THORChain pays the actual gas fee needed for this transaction on your behalf (which you can check on a block explorer), but will deduct a portion of your outbound asset to cover for this.
Digging deeper, THORChain will deduct approximately three times the estimated gas fee for a fast transaction on the respective blockchain, from your outbound asset. One-third of this is used for the actual on-chain transaction, and two-thirds is income for the LP and Reserves. This LP and Reserves income is eventually used for protocol expenses, such as block emissions and node churning.
Update: In May-2023, the outbound fee was adjusted to be dynamic, and expected to be generally 1.5x the estimated gas fee for a fast transaction on the respective blockchain, with a lower bound of USD1 equivalent. Read here for more details: https://crypto-university.medium.com/lpu-thorchain-updates-may-2023-7062dc260bb2
Affiliate Fees
Some interfaces may choose to charge an affiliate fee, which is the “service charge” paid to the specific interface. The core THORChain protocol does not profit from this. Affiliate fees are a percentage of the inbound asset, and may be different from interface to interface. Some interfaces may offer different user tiers, allowing for discounted or no affiliate fees.
Final Thoughts
And there you have it! Hopefully, this will shed light to common issues such as “Why is my outbound quantity lower than expected?”, or “Why is my LP withdrawal transaction failing?”…
Happy LP-ing!
Feel free to hop into the TC University Discord to chat about this, or any other THORChain questions that you may have.
Explore THORChain: Website, X, Telegram, Developer Discord.
Explore Maya Protocol, the first friendly fork of THORChain: Website, X, Discord, Telegram.
Decentralized, permissionless, non-custodial, trust-minimized, open-sourced, economic-secured, non-wrapped, native-to-native cross-chain swaps, savings and soon, lending!