CryptoIcicleThor-112.Arbs, Arbs Everywhere! - # of Swaps, Swap Volume
Updated 2022-07-20
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
-- Payout 96.15 RUNE
-- Grand Prize 288.46 RUNE
-- Level Advanced
-- Q.112 One of the core actors in the THORChain ecosystem are the “Traders” (https://docs.thorchain.org/roles/trading).
-- These traders swap at a high frequency to make a profit and are a key cog to helping balance prices on THORChain
-- We are taking a deep dive on these traders. To do so, you have 2 options:
-- 1)Identify the Ethereum arb bots and show their activity over time. How many are there?
-- What is their average swap frequency and volume?
-- Which tokens are they swapping?
-- Are they interacting with synths or non-synths?
-- How much profit are they making?
-- Hint: use thorchain.swaps and ethereum.core.ez_dex_swaps (to get the profit)
-- Payouts will be on Thorchain
with
txns as (
select
block_timestamp::date as date,
from_address as wallet,
count(distinct tx_id) as n_txns
from thorchain.swaps
where block_timestamp >= CURRENT_DATE - {{n_days}}
and blockchain = 'ETH'
group by date, wallet
),
wallets as (
select
wallet,
avg(n_txns) as avg_n_txns,
iff(avg_n_txns > {{threshold}}, 'bot', 'user') as type
from txns
group by wallet
order by avg_n_txns desc
)
Run a query to Download Data