50. Swap n' Slippage

    How does the size of a swap affect the slippage in Thorchain network?

    First of all, what are the size of swap and the slippage?

    • The size of a swap is the total amount moved in that specific swap. In this case, we will take into account the amount swap in USD to be evaluated in an equal manner for all the Thorchain swaps.
    • The slippage is a factor that determines whether or not you will be able to perform a transaction when buying tokens of a cryptocurrency. It is the percentage of variation in the price of the token that you are willing to assume at the time of the transaction.

    Now that we are in context and know both metrics, we will explore if these are correlated or not and what factors could impact to this. To do that, we will explore the following:

    • Daily average size swap and slippage correlation over the last 3 months
    • Correlation between two metrics
    • Comparison of top 100 swap size and top 100 low swap size slippages
    • Pools as a factor to affect slippage

    Daily average size swap and slippage

    To study this part, I have plotted the daily average swap and slippage over last 90 days, as well as its scatter plot correlation.

    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...

    If we take a look at the trend lines, we can see how they are similar. Despite some points, when swap volume average is high, the slippage is high as well and on the other way around. In fact, taking a look at the scatter plot, we can see that there is a positive correlation between both metrics. Even though, some points are out of the range.

    Correlation between swap volume size and slippage

    To corroborate this results in a global manner (taking into account all retrospective data), we will compute the correlation between both taking into account the whole swaps done in Throchain so far.

    The sign of the correlation coefficient indicates the direction of the relationship. For this kind of data, we can consider correlations above 0.4 to be relatively strong; correlations between 0.2 and 0.4 are moderate, and those below 0.2 are considered weak. Then, we can say that a high-moderate positive correlation are there between both metrics, as previously stayed.

    High and lows swap size comparison

    In this part, we will compare the average slippage of top 100 highest swaps and the top 100 lowest to determine if it affects or not.

    As we can see, the average slippage for top 100 are below 4, while the average for top 100 lowest swaps are around 0.15, which is so different. Then, we can say that the swap size affect the slippage in a positive correlation.

    Study of pool effects

    Finally, we will investigate if swapping in a pool affect as well the slippage. To do that, we will take a look at the average swap size of each pool and its corresponding average slippage.

    We can see how the pools with highest and lowest average swap size have the lower slippages, while the pools that have a moderate average swap size have the highest slippage values, indicating that the pool also affects the slippage.

    Loading...