LTirrell2022-01-28_solana_stablecoin
Updated 2022-01-31Copy Reference Fork
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
›
⌄
-- Create a visualization comparing USDC, USDT, and UST (wormhole) usage in transactions throughout the month of January.
-- Has UST seen more adoption in the Solana ecosystem this month?
-- How do you expect this trend to continue? Why?
--
-- from https://api.raydium.io/cache/solana-token-list
-- https://discord.com/channels/784442203187314689/908794517795250196/937478374140575845
--
-- USDC: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
-- USDT: Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB
-- UST, v2 wormhole: 9vMJfxuKxXBoEa7rM12mYLMwTacLMLDJqHozw96WQL8i
-- UST, v1 wormhole
with tx_data as (
select
date_trunc('hour', block_timestamp) as datetime,
case
when pre_mint = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v' then 'USDC'
when pre_mint = 'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB' then 'USDT'
when (
pre_mint = '9vMJfxuKxXBoEa7rM12mYLMwTacLMLDJqHozw96WQL8i'
or pre_mint = 'CXLBjMMcwkc17GfJtBos6rQCo1ypeH6eDbB82Kby4MRm'
) then 'UST'
end as stablecoin_pre,
case
when post_mint = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v' then 'USDC'
when post_mint = 'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB' then 'USDT'
when (
post_mint = '9vMJfxuKxXBoEa7rM12mYLMwTacLMLDJqHozw96WQL8i'
or post_mint = 'CXLBjMMcwkc17GfJtBos6rQCo1ypeH6eDbB82Kby4MRm'
) then 'UST'
end as stablecoin_post,
tx_id
from
solana.transactions
where
succeeded = 'TRUE'
and block_timestamp >= '2022-01-01'
Run a query to Download Data