MasiCOQ
    Updated 2025-03-15
    with tb0_price as ( select trunc(hour,'day') as date,
    case when token_address = lower('0x2b2c81e08f1af8835a78bb2a90ae924ace0ea4be') then 'sAVAX'
    when token_address = lower('0x152b9d0FdC40C096757F570A51E494bd4b943E50') then 'BTC.b'
    when token_address = lower('0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E') then 'AUSD'
    when token_address = lower('0x420FcA0121DC28039145009570975747295f2329') then 'COQ' end as symbol,
    avg(price) as avg_price
    from avalanche.price.ez_prices_hourly
    where date = current_date
    and token_address in (lower('0x2b2c81e08f1af8835a78bb2a90ae924ace0ea4be'),
    lower('0x152b9d0FdC40C096757F570A51E494bd4b943E50'),
    lower('0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E'),
    lower('0x420FcA0121DC28039145009570975747295f2329'))
    group by 1,2
    UNION
    select trunc(hour,'day') as date,
    case when token_address = lower('0x152b9d0FdC40C096757F570A51E494bd4b943E50') then 'SolvBTC' end as symbol,
    avg(price) as avg_price
    from avalanche.price.ez_prices_hourly
    where date = current_date
    and token_address = lower('0x152b9d0FdC40C096757F570A51E494bd4b943E50')
    group by 1,2 )
    ,
    tb1 as ( select trunc(block_timestamp,'day') as day,
    symbol,
    count(DISTINCT tx_hash) as deposit_tx,
    count(DISTINCT origin_from_address) as depositor,
    sum(amount) as deposit_amount
    from avalanche.core.ez_token_transfers
    where origin_to_address in (lower('0xE3C983013B8c5830D866F550a28fD7Ed4393d5B7'),
    lower('0x203E9101e09dc87ce391542E705a07522d19dF0d'),
    lower('0xa53E127Bfd9C4d0310858D9D5Fcdf1D2617d4C41'),
    lower('0x8F1dea444380A2DDC5e6669f508d235401CaEE5F'),
    lower('0x1D8bd363922465246A91B7699e7B32BAbf5FEF62'))
    and to_address in (lower('0xE3C983013B8c5830D866F550a28fD7Ed4393d5B7'),
    lower('0x203E9101e09dc87ce391542E705a07522d19dF0d'),
    lower('0xa53E127Bfd9C4d0310858D9D5Fcdf1D2617d4C41'),
    Last run: about 1 month ago
    DAY
    DEPOSIT
    WITHD
    CUM_DE
    CUM_WI
    TVL
    1
    2025-01-14 00:00:00.0006612645126.4714-2755619320.95458482575683887.643-61305966649.4688421269717238.174
    2
    2025-02-14 00:00:00.0003321455801.98374-55195955.0564262592648975809.437-380915733509.908211733242299.529
    3
    2025-02-15 00:00:00.000115284672.170038-12632298329.4419592764260481.607-393548031839.35199216228642.257
    4
    2024-12-25 00:00:00.000151443056.554719-199999999.737176441420507103.558-26078697901.6549415341809201.903
    5
    2025-02-11 00:00:00.00082492111-800000000583851204961.337-265462524119.096318388680842.241
    6
    2024-11-22 00:00:00.0001000000000351446416237.577-9813962424.55331341632453813.023
    7
    2025-01-17 00:00:00.000575528553.285772-1814273536.91515488529759742.859-63532385767.2097424997373975.65
    8
    2025-02-22 00:00:00.0009883327683.81201-10271034853.6736635472865856.987-415753326227.781219719539629.205
    9
    2024-10-22 00:00:00.0001855585431.311630129761894660.141-9285875.35451756129752608784.786
    10
    2024-12-31 00:00:00.000109999481.5-1599999999.77459445446763213.398-32501258763.5851412945504449.813
    11
    2024-12-22 00:00:00.000562657606.858855-3062471276.66279437986302662.225-25878697901.9177412107604760.307
    12
    2025-01-27 00:00:00.0005124222083.67992-5745633887.35983524052627627.281-229397325743.534294655301883.747
    13
    2025-02-04 00:00:00.0006261437908.49673-600513835.835078542792517899.842-257841468140.675284951049759.167
    14
    2024-11-30 00:00:00.0008830353305932469.1-11649811857.1565341656120611.944
    15
    2024-11-10 00:00:00.00092255760.52242560349103694954.785-7960289254.94341341143405699.841
    16
    2024-12-23 00:00:00.0002297169615.861280440283472278.086-25878697901.9177414404774376.169
    17
    2025-01-04 00:00:00.0002158644361.12806-17920893975.9061454166763843.661-51432152739.4912402734611104.169
    18
    2025-01-07 00:00:00.0003097419210.76030458869358119.455-51930343387.3425406939014732.113
    19
    2024-11-14 00:00:00.000253572641.075384-115079691.805267350742368130.459-9465843817.75044341276524312.708
    20
    2024-12-26 00:00:00.000421196394.893688-1000000000.01894441841703498.452-27078697901.6738414763005596.778
    ...
    129
    14KB
    13s