primo_dataJust Keep Swimming
Updated 2022-07-27
999
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
›
⌄
--Swim Protocol provides a simple way to transfer tokens across chains via multi-token liquidity pools.
--It is built on top of one of the most infamous bridges, Wormhole, which allows users to more seamlessly transfer assets across multiple blockchains
-- Create a dashboard for Swim on Solana including at least the following metrics (add anything else you find interesting):
--- Total Volumes
--- Total unique users
--- Most popular destinations from Solana
--- Most popular stablecoins and non-stablecoins traded over time
with swim_txns as (
select tx_id, block_timestamp, pre_token_balances, post_token_balances, instructions[1]:programId swim_contract
from solana.core.fact_transactions
where block_timestamp >= CURRENT_DATE - 30
and swim_contract in ('SWiMDJYFUGj6cPrQ6QYYYWZtvXQdRChSVAygDZDsCHC', 'SWimmSE5hgWsEruwPBLBVAFi3KyVfe8URU2pb4w7GZs')
),
token as (
SELECT *
FROM (
VALUES
('EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v', 'USDC','',0),
('Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB', 'USDT','',0),
('7i5KKsX2weiTkry7jA4ZwSuXGhs5eJBEjY8vVxR4pfRx', 'GMT', '',0),
('AFbX8oGjGpmVFywbVouvhQSRmiW2aR1mohfahi4Y2AdB', 'GST', '',0),
('BJUH9GJLaMSLV1E7B3SQLCy9eCfyr6zsrwGcpS2MkqR1', 'swimUSD','',0),
('9KMH3p8cUocvQRbJfKRAStKG52xCCWNmEPsJm5gc8fzw', 'USDT', 'BSC',1),
('8qJSyQprMC57TWKaYEmetUR3UUiTP2M3hXdcvFhkZdmv', 'USDT', 'BSC',1),
('DukQAFyxR41nbbq2FBUDMyrtF2CRmWBREjZaTVj4u9As', 'BUSD', 'BSC',1),
('5RpUwQ8wtdPCZHhu6MERp2RGrpobsbZ6MH5dDHkUjs2', 'BUSD', 'BSC',1),
('FCqfQSujuPxy6V42UvafBhsysWtEq1vhjfMN1PUbgaxA', 'USDC', 'BSC',1),
('Dn4noZ5jgGfkntzcQSUZ8czkreiZ1ForXYoV2H8Dm7S1', 'USDT', 'ETH',1),
('2DMUL42YEb4g1HAKXhUxL3Yjfgoj4VvRqKwheorfFcPV', 'USDT', 'ETH',1),
('A9mUU4qviSctJVPJdBJWkb28deg915LYJKrzQ19ji3FM', 'USDC', 'ETH',1),
('4R6b4aibi46JzAnuA8ZWXrHAsR1oZBTZ8dqkuer3LsbS', 'USDC', 'ETH',1),
('5goWRao6a3yNC4d6UjMdQxonkCMvKBwdpubU3qhfcdf1', 'USDT', 'MATIC',1),
('E2VmbootbVCBkMNNxKQgCLMS1X3NoGMaYAsufaAsf7M', 'USDC', 'MATIC',1),
('AGqKX7F4mqJ8x2mUQVangJb5pWQJApaKoUfe5gXM53CV', 'USDC', 'AVAX',1),
Run a query to Download Data