articoloquintoArbs volume made by arb bots
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
›
⌄
with arb_bots_txs as(
select t.* from(
select block_timestamp as date, dateadd(minute, -5, date) as "date-5", dateadd(minute, 5, date) as "date+5", from_address as address, tx_id
from flipside_prod_db.thorchain.swaps
where block_timestamp >= '2022-01-01'
and blockchain = 'ETH'
and from_address in(select "arb bot" from(
select distinct t.address as "arb bot", count(distinct tx_id) as "arbs" from(
select block_timestamp as date, dateadd(minute, -5, date) as "date-5", dateadd(minute, 5, date) as "date+5", from_address as address, tx_id
from flipside_prod_db.thorchain.swaps
where block_timestamp >= '2022-01-01'
and blockchain = 'ETH') as t
inner join(
select block_timestamp as date, tx_to as address
from ethereum.core.ez_dex_swaps
where block_timestamp >= '2022-01-01') as e
on t.address = e.address and e.date between t."date-5" and t."date+5"
group by 1)
where "arbs" > 20)) as t
inner join(
select block_timestamp as date, tx_to as address
from ethereum.core.ez_dex_swaps
where block_timestamp >= '2022-01-01') as e
on t.address = e.address and e.date between t."date-5" and t."date+5")
select from_address as "arb bot", sum(TO_AMOUNT_MIN_USD) as "volume in usd"
from flipside_prod_db.thorchain.swaps
where tx_id in (select tx_id from arb_bots_txs)
and from_address in (select address from arb_bots_txs)
group by 1
order by 2 desc
Run a query to Download Data