52 [THOR] Slippage

    Loading...
    Loading...

    Intro to slippage

    One of the most common pieces of advice DeFi newcomers receive from “veterans” is “watch out for slippage.” But what does it actually mean?

    What is slippage?

    Imagine wanting to buy 10 apples at the market and seeing that the various apple vendors are selling them for $1 each. That’s a $10 cost — easy. But what if there was breaking news that apples cure COVID-19 and the price skyrocketed to $100/apple? Now you’re out $1,000 for the same 10 apples. When trading crypto, the volatility in asset price can create such a situation where the executed price is different from the quoted and expected price. Slippage is the expected % difference between these quoted and executed prices.

    Low liquidity can also cause increased slippage, which is why larger orders tend to face higher slippage. In this analysis, we're looking at this type of slippage.

    To facilitate cross-chain swaps, THORChain pairs RUNE with every asset i.e. RUNE is always one of the assets in all liquidity pools. THORChain calls this the continuous liquidity pools (CLP) model of liquidity. The CLP is arguably one of the most important features of THORChain, with the following benefits:

    • Provides “always-on” liquidity to all assets in its system.
    • Allows users to trade assets at transparent, fair prices, without relying on centralised third-parties.
    • Functions as source of trustless on-chain price feeds for internal and external use.
    • Democratises arbitrage opportunities.
    • Allows pools prices to converge to true market prices, since the fee asymptotes to zero.
    • Collects fee revenue for liquidity providers in a fair way.
    • Responds to fluctuating demands of liquidity.

    By having RUNE on one side of each pool, $RUNE becomes a settlement bridging asset allowing swaps between any two other assets. If each pool is comprised of two assets eg. BTC:ETH then there will be a scaling problem with n*(n-1)/2 possible connections.

    Methodology

    I looked at the swap fees two ways.

    • First, I rounded each swapped amount to the nearest 100
    • Then, I calcuated the average slippage fee across all pools.
    • In the last graph, I calculated the average slippage fee in each of the pools so we can see how each of the pools behave.

    Insights

    • We can observe that as the swapped amount increases, the floor of average slippage increases. From less than 1%, the lowest slippage at amounts near $1M USD is around 2-3%.
    • Beyond 150K USD swapped, we start seeing outliers with slippage as high as 70%.
    • When the slippage is represented as bars, we can see the bars get higher and higher as the amount swapped gets higher (x-axis)
    Loading...

    Insights for slippage in pools

    • When we view the slippage by pools, we see a pattern of differnet pools have different slippage slopes as amount increases.
    • For e.g.
      • 1 - the ETH.ETH (represented by green) has the lowest slippage slope with increase in amount.
      • 2 - BNB.ETH pool (blue) has a higher slope than ETH.ETH
      • 3 - ETH.WBTC pool (orange) has a higher slope than both the above pools
      • 4 - ETH.ALPHA pool has an almost vertical slope! Even a swap of $1000 USD in this pool leads to 3% slippage!

    Conclusion

    1. Generally, slippage increases as the amount increases
    2. Slippage is also dependend on the liquidity in the pool. Higher the liquidity, lower the slippage (as we saw with ETH.ETH vs ETH.ALPHA).