MoDeFiGPC - tokens trades liqudity week 4
    Updated 9 days ago
    with tokens_data as (
    select *
    from $query('75f58bb3-b2cd-4208-85e9-e3d75d901a1c')
    ),

    tokens_pool as (
    select *
    from $query('998239b1-00be-4fa2-8c02-617cd563917c')
    ),

    tokens_pools_balance as (
    select token_address, b.symbol, replace(pair_symbol,'WMATIC','WPOL') as pair_symbol, b.pool_address,
    sum(change) as balance
    from
    (select *, case when from_address in (select pool_address from tokens_pool) then from_address else to_address end as pool_address,
    case when from_address in (select pool_address from tokens_pool) then -AMOUNT_PRECISE else AMOUNT_PRECISE end change
    from polygon.core.ez_token_transfers
    where (from_address in (select pool_address from tokens_pool) or to_address in (select pool_address from tokens_pool))
    and contract_address in ('0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270','0xc2132d05d31c914a87c6611c10748aeb04b58e8f', '0xb5c064f955d8e7f38fe0460c556a72987494ee17',
    '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619','0x2791bca1f2de4661ed88a30c99a7a9449aa84174','0x3c499c542cef5e3811e1192ce70d8cc03d5c3359')
    and BLOCK_TIMESTAMP>='2021-04-26'
    and BLOCK_TIMESTAMP<date_trunc(hour, '2025-04-04 18:00:00.000'::timestamp)
    and from_address!=to_address
    union all
    select *, case when to_address in (select pool_address from tokens_pool) then to_address else from_address end as pool_address,
    case when to_address in (select pool_address from tokens_pool) then AMOUNT_PRECISE else -AMOUNT_PRECISE end change
    from polygon.core.ez_token_transfers
    where (from_address in (select pool_address from tokens_pool) and to_address in (select pool_address from tokens_pool))
    and contract_address in ('0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270','0xc2132d05d31c914a87c6611c10748aeb04b58e8f', '0xb5c064f955d8e7f38fe0460c556a72987494ee17',
    '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619','0x2791bca1f2de4661ed88a30c99a7a9449aa84174','0x3c499c542cef5e3811e1192ce70d8cc03d5c3359')
    and BLOCK_TIMESTAMP>='2021-04-26'
    and BLOCK_TIMESTAMP<date_trunc(hour, '2025-04-04 18:00:00.000'::timestamp)
    and from_address!=to_address) a
    join tokens_pool b
    on a.pool_address=b.pool_address and pair_address=contract_address
    group by 1,2,3,4
    Last run: 9 days ago
    TOKEN_ADDRESS
    SYMBOL
    WPOL
    WPOL_USD
    WETH
    WETH_USD
    QUICK
    QUICK_USD
    USDC_USDT
    TOTAL_LIQUIDITY_USD
    1
    0x1772a283501b108c0f0016224518ff38db72de2fSOLAR167.96907114331.9178188371.1162265212003.39219727200383.8616492419.171665109
    2
    0x9f9f149a02cddc9a8251207cefd3ff774daf56f6EARTH153.12020932629.0962084170000029.096208417
    3
    0x8248bbf4b8595eea60ee73ed8ef2765ae4b68fb2GC2547.193307549484.02276668700000484.022766687
    4
    0xff056c576379f5ce7301623565b0921344e4b656SYNV197.31278132337.4937693330000037.493769333
    5
    0x15987d862fbc435ac8445e809ebb377fb418ef8eSUPPLAI214.00377943840.6654261760000040.665426176
    6
    0xd7b0c417365b63f098c1c4ad2ced35982d648876NOMAD1158.32368528220.10698332400000220.106983324
    7
    0xc760a77356563560260c9e571af6dbbab396be38PEAR000.0105669508118.9654576490010708.65519910727.620656649
    8
    0xb6ab4a4b329435094907190b541f4bd92f14ebe6PAWL114.6686706521.78957013400000.00000599999999921.789576134
    9
    0x8a088dceecbcf457762eb7c66f78fff27dc0c04aPKT100.20651944419.0414432380.00073829800571.3250898780010.46646930.833002115
    10
    0xddc330761761751e005333208889bfe36c6e6760LGP199.24349190337.860646818000028.50939566.370041818
    11
    0xe302672798d12e7f68c783db2c2d5e6b48ccf3ceIGS44.4602239898.4484206830000501.870611510.319031683
    12
    0x222c6b7abb32e7ef25baf599fb139001dd584885PILOT93.37837358817.7439453060000017.743945306
    13
    0x4538727d7198e06019986bf2e1f562b5efdca909UNT30091.1361013235717.977864246000005717.977864246
    14
    0xd7c584d40216576f1d8651eab8bef9de69497666BTN1835.554867026348.7958069420.08505073256152.6482042980097.297375598.74138624
    15
    0x2fc359fc903040ac5d34ff9d50802e1fe0ced8feLZR143.83889218427.3325539710000027.332553971
    16
    0x1d9ccbe51cc6b4deeeca686d409561cf9f801fbcNEUS1310.169612804248.96105016400000248.961050164
    17
    0x7f54043a6019a99595855d9e30ac8a38d9030ff6DERP128.35788031224.39082113300790571.13317739320152.290641598020176.681462731
    18
    0xaf3b9202f8b324830d9b6c4ddfb447a0ba7f7fc5HIN0.099473095070.01890207647000000.01890207647
    19
    0x97b2cb568e0880b99cd16efc6edff5272aa02676DONR2D21969.061306769374.1649676352.8412637435099.471753252006962.55357412436.190294886
    20
    0x162539172b53e9a93b7d98fb6c41682de558a320GONE43346.357192358236.7614864050.0000041421831910.00743434897663.36189788316.9096254670.2933558253.97190122
    56
    6KB
    3s