Ali3NTVL Market Cap Mint Burn (XEVT)
    Updated 2025-03-13
    with pricet as (
    select hour::date as day,
    token_address,
    avg (price) as usdprice
    from avalanche.price.ez_prices_hourly
    where token_address in ('0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e') -- USDC
    group by 1,2),

    mintst as (
    select date_trunc (day,block_timestamp) as date1,
    sum (amount) as Minted_Volume
    from avalanche.core.ez_token_transfers
    where contract_address = lower ('0xbfdef5e389bb403426337081ecd1d05bc5193203')
    and from_address = '0x0000000000000000000000000000000000000000'
    group by 1),

    burnst as (
    select date_trunc (day,block_timestamp) as date1,
    sum (amount) as Burned_Volume
    from avalanche.core.ez_token_transfers
    where contract_address = lower ('0xbfdef5e389bb403426337081ecd1d05bc5193203')
    and to_address = '0x0000000000000000000000000000000000000000'
    group by 1),

    maintable as (
    select coalesce (date_trunc (day,t2.date1),date_trunc (day,t1.date1)) as date,
    coalesce (Minted_Volume,0) as Minted_Volume,
    coalesce (Burned_Volume,0)*-1 as Burned_Volume,
    coalesce (Minted_Volume,0) + coalesce (Burned_Volume,0) AS Net_Volume,
    sum (Minted_Volume) over (order by date asc) as Total_Minted_Volume,
    sum (Burned_Volume) over (order by date asc)*-1 as Total_Burned_Volume,
    sum (net_volume) over (order by date asc) as TVL
    from burnst t1 full outer join mintst t2 on t1.date1 = t2.date1
    order by 1 desc)

    select coalesce (t3.day,t1.date) as date0,
    Last run: about 1 month ago
    DATE0
    MINTED_VOLUME
    BURNED_VOLUME
    NET_VOLUME
    TOTAL_MINTED_VOLUME
    TOTAL_BURNED_VOLUME
    TVL1
    USDPRICE
    MARKET_CAP
    1
    2025-03-12 00:00:00.0000.99774700.99774710531459.263528-15.6510531474.9135280.999864291710530045.7046199
    2
    2025-03-07 00:00:00.0001048856.79080901048856.7908098171425.198139-12.18171437.2981390.99987145838170386.92796964
    3
    2025-03-06 00:00:00.00011072.196308-2.5511074.7463085811392.130497-8.555811400.6804970.99986833335810635.51274073
    4
    2025-03-04 00:00:00.00094831.26371094831.263714500215.853664-54500220.8536640.99984458334499521.44433966
    5
    2025-02-24 00:00:00.00077966.352856077966.3528563200111.773139-43200115.7731390.99992008333199860.03055346
    6
    2025-02-17 00:00:00.000259775.971460259775.971461994838.956324-31994841.9563240.99994658331994735.39851617
    7
    2025-02-10 00:00:00.000867528.4926330867528.492633867532.492365-2867534.4923650.9999535833867494.224305646
    8
    2025-02-05 00:00:00.0001.999866-12.9998661.999866-12.9998660.9999661252.99976438
    8
    937B
    8s