Bot Swappers

    Question: Define bot swappers. How does the behaviour of bots differ from average swappers? For instance in terms of number of swaps, or in terms of distribution of swaps over a day. What percentage of swaps were executed by bots in the past 30 days? What pools and what pairs were most popular among bot swappers in the past 30 days.

    Introduction

    Firstly, I would like to address the problem I encountered while solving this Bounty. While writing the SQL query, I realised that there are many types of bots, making it difficult to track and filter what each bot is doing and when. In order to filter out my analysis, I have decided to focus on arbitrage bots, using the following proxy definition:

    select date_trunc('minute',block_timestamp) time,TRADER,count(*) count

    from terra.swaps

    group by time,trader

    having count(*)>10

    order by count desc

    limit 30

    For this dashboard, I will also use the following definitions:

    • Bot swappers: at least 10 or more transactions per minute.
    • Average swappers: at least 2 or fewer transactions per minute.

    Defining Bot Swappers

    As mentioned in the introduction, this Bounty will address arbitrage bots - which can be defined as tools that examine prices across different exchanges and make trades, in order to take advantage of any discrepancies in the market at the time. The short extract from the query above shows what code I have used to filter out these bots from the rest of the transactions. The tables below show these bot swaps for a minute and an hourly basis.

    Loading...
    Loading...

    Behaviour of bots compared to average swappers

    Loading...

    Using this chart, we can see that there is some correlation between the LUNA price and the count of daily bot swaps (especially around May 23rd 2021). However, this correlation is not very visible and therefore more analysis has to be done to see it more clearly.

    Loading...
    Loading...

    To visualise the difference in proportion between the swaps, I have normalised the axis and used a logarithmic scale for the y-axis. We can see a very small number of bot swaps compared to average swaps, on almost every day! Even on the days where this statement does not hold, i.e., on May 23rd 2021, the majority of swaps still comes from average users and not bots (71 bot swaps compared to 6660 average swaps).

    What percentage of swaps was executed by bots in the past 30 days?

    Loading...
    Loading...

    Surprising result! Here we can see that with the definition used in this query, there have been 0 bot swaps! What we have to keep in mind is that these are not all the transactions, but only swaps. If one was to check how many bot transactions have taken place during the past month, I'm pretty sure the number would be greater than 0...

    Having done the analysis up to this point, I get the idea that maybe there is something not insightful about the definition of bot swaps that I have used. I will redefine 'bot swaps' and see if there is any difference in the results.

    Rewriting the definition

    As explained in the reasoning above, let's now consider this definition:

    • Bot swappers: at least 5 or more transactions per minute.
    • Average swappers: at least 2 or fewer transactions per minute.
    Loading...
    Loading...
    Loading...

    The final two graphs of this dashboard show a clearer correlation between the LUNA price and the activity of bots. In addition, having redefined bot swappers, we can now see a greater activity. However comparing it to average swaps, we can still get an overall picture that users are swapping on their own, without using arbitrage bots.

    Conclusion

    This Bounty has shown that arbitrage bots are not as popular as I initially thought they would be. It is important to keep in mind that this analysis consisted only of that one type of bot swaps, in order to get a better insight into this topic, one would have to include different types of bots in the analysis as well as other types of transactions and not only swaps.

    I would also like to investigate what pools and what pairs were most popular among bot swappers in the past 30 days, however, I have decided not to include this in this dashboard. The reason for doing so is that there is a very little number of bot swaps, and I found it rather not insightful to talk about what is popular amongst a very small proportion of bot swaps, I hope that this is okay!