granadohoPatterns behind the Most Common Sources of Arbitrage
Updated 2022-03-24
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 clean_data1 as (
select
date(block_timestamp) as date,
count(distinct tx_id) AS total_swap_with_gain
from solana.swaps
where block_timestamp::date >= '2022-02-01'
and swap_program = 'jupiter aggregator v2'
and succeeded = 'True'
and (swap_from_mint = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v' or swap_from_mint = 'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB')
and (swap_to_mint = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v' or swap_to_mint = 'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB')
and swap_from_amount >=100 and swap_to_amount >=100
and ((swap_to_amount-swap_from_amount)/swap_from_amount)*100 >= 1
group by 1
order by 1
), clean_data2 as (
select
date(block_timestamp) as date,
count(tx_id) as total_count
from solana.swaps
where block_timestamp::date >= '2022-02-01'
and swap_program = 'jupiter aggregator v2'
and succeeded = 'True'
and (swap_from_mint = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v' or swap_from_mint = 'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB')
and (swap_to_mint = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v' or swap_to_mint = 'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB')
and swap_from_amount >=100 and swap_to_amount >=100
group by 1
order by 1
), average_arb as (
select
date(block_timestamp) as date,
((avg(swap_to_amount)-avg(swap_from_amount))/avg(swap_from_amount))*100 AS arb_percent
from solana.swaps
where block_timestamp::date >= '2022-02-01'
and swap_program = 'jupiter aggregator v2'
and succeeded = 'True'
and (swap_from_mint = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v' or swap_from_mint = 'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB')
Run a query to Download Data