germanswapping USDC or USDT for UST over time
Updated 2022-03-08
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
›
⌄
⌄
/*Have we seen more instances of users swapping USDC or USDT for UST over time?
*/
SELECT
trunc(block_timestamp, 'day') as date,
case when swap_from_mint = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v' then 'USDC'
when swap_from_mint = 'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB' then 'USDT'
END AS swap_from,
count(tx_id) as stable_swaps,
sum(swap_from_amount) as volume_swapped
FROM solana.swaps --s
--LEFT OUTER JOIN solana.labels l ON swap_from_mint = l.address
WHERE block_timestamp::date >= '2021-12-01'
AND swap_program = 'jupiter aggregator v2'
AND succeeded = 'True'
And swap_from_mint in ('EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v', 'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB')
And swap_to_mint in ('9vMJfxuKxXBoEa7rM12mYLMwTacLMLDJqHozw96WQL8i')
GROUP BY date, swap_from
ORDER BY date
Run a query to Download Data