[ALGO] Looking For Swap Arbitrage

    Loading...

    Bounty Brief:

    • Investigate USDC/USDT arbs occurring on Algorand.
    • Look into the top 10 wallets successfully earning more USDT or USDC.
    • Highlight intermediate assets used by the successful arbitragers.

    I. Finding Arbitrage Events in the wild

    Methodology

    • Pull in swap events from algorand.swaps
    • Using LAG, keep track of the preceding transaction's fields/data partitioned by swapper and ordered by Time.
    • Check for transactions where all the following conditions satisfied:
      • The previous swap_from asset is either in USDC/USDT AND is being swapped for some other asset than USDT/USDC.
      • The current txn's swap_from asset is equal to the previous txn's swap_to asset.
      • The current transaction's swap_to asset is equal to the previous' swap_from asset.
      • And finally, The previous swap_to amount and current swap_from amount are equal same!
    Issues with the methodology:
    • We seem to be getting some extreme outliers, that distort the dataset/chart bounds. Eg: Seconds in 700,000s and a -100% loss on the trade pair!
    Improving/Patching
    • We add the following checks to the methodology:
      • The time delta between the 2 transactions in the pair should be no more than 600 seconds.
      • The profit should be greater than zero. It's only a successful arb if it's profitable!
    Loading...

    We now have our required dataset! The raw dataset will be available at the bottom.

    Loading...

    II. Arbitrage Analysis

    Loading...

    i) Analysing the Top 10 Wallets and their performance

    Loading...

    ii) Analysing the Intermediate Assets used:

    • The intermediate asset is the asset swapped to from USDT/USDC and then immediately swapped back to USDT/USDC for a gain in USDT/USDC.
    • Algorand itself seems to be the majority preference for arbs, STBL second.
    Loading...
    Loading...

    Dataset Used:

    Loading...
    Loading...

    iii) Analysing the Arb routes between transactions

    • The route here is defined as the apps/pools the 2 transactions that make up the Arb pair/trade go through.
    • Majority of the arb'ing happens within Tinyman itself!
    • Here we break down the routes by the intermediate asset choosen by the Arber...
    • Interesting 🤔, only STBL asset seems to have diverse routes. STBL pools likely offer far better percentage differences!
    • The total profits are not as high as one would expect from proficient arbitragers.
    • Some wallets have done some extreme percentage returns per arb but this might have been due to price volatility/slippage in the pools.

    III. Conclusions

    • There are quite a few cases where arbs fail to make a profit. We have focused only on profitable arbs
    • Even amongst the profitable arbs, the total profit accumulated is nothing extravagant.
    • The most preferred intermediate asset(the asset swapped to/back) is Algorand, followed by STBL.
    • The most used arb route is within tinyman itself, followed by algofi->tinyman.