barbodpercentage of all swaps Gain based on the number of swaps
Updated 2022-03-29
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
›
⌄
select
case
when (swap_to_amount/swap_from_amount)<0 then '<0'
when (swap_to_amount/swap_from_amount) BETWEEN 0 and 1 then '0-1'
when (swap_to_amount/swap_from_amount) >=1 then '>=1'
end as arbitrage,
case when ((swap_to_amount-swap_from_amount )/swap_from_amount)*100 <0 then '<0%'
when ((swap_to_amount-swap_from_amount )/swap_from_amount)*100 BETWEEN 0 and 1 then '0-1%'
when ((swap_to_amount-swap_from_amount )/swap_from_amount)*100 >=1 then '>1%'
end as gain,
count (tx_id) as number_of_swaps
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,2 order by 3 desc
Run a query to Download Data