adriaparcerisasmore markets supply and withdraw by token
    Updated 2025-04-09
    WITH supply AS (
    SELECT
    tx_hash,
    date_trunc('week', block_timestamp) as week,
    block_timestamp,
    origin_from_address as wallet,
    utils.udf_hex_to_int(data) / pow(10, CASE
    WHEN topic_2 IN ('0x000000000000000000000000d10cd10260e87efdf36618621458eeaa996b8267','0x00000000000000000000000002bf4bd075c1b7c8d85f54777eaaa3638135c059','0x000000000000000000000000ad412305cf8ad9545759466f3d889438598f773f') THEN 18
    ELSE 6
    END) as amount,
    CASE
    WHEN topic_2 ='0x000000000000000000000000d10cd10260e87efdf36618621458eeaa996b8267' THEN 'ankrFLOWEVM'
    WHEN topic_2='0x00000000000000000000000002bf4bd075c1b7c8d85f54777eaaa3638135c059' THEN 'WFLOW'
    WHEN topic_2='0x000000000000000000000000e43fe00aea059f3a756cf556655b5a27faf9bec5' THEN 'USDF'
    WHEN topic_2='0x00000000000000000000000049c6b2799af2db7404b930f24471dd961cfe18b7' THEN 'stgUSDC'
    WHEN topic_2='0x000000000000000000000000ad412305cf8ad9545759466f3d889438598f773f' THEN 'WETH'
    END as token
    FROM flow.core_evm.fact_event_logs
    WHERE origin_function_signature in ('0x617ba037','0x474cf53d')
    AND tx_succeeded='TRUE'
    AND topic_0='0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'
    AND topic_2 IN (
    '0x000000000000000000000000d10cd10260e87efdf36618621458eeaa996b8267',
    '0x00000000000000000000000002bf4bd075c1b7c8d85f54777eaaa3638135c059',
    '0x000000000000000000000000e43fe00aea059f3a756cf556655b5a27faf9bec5',
    '0x00000000000000000000000049c6b2799af2db7404b930f24471dd961cfe18b7',
    '0x000000000000000000000000ad412305cf8ad9545759466f3d889438598f773f'
    )
    ),

    withdraw AS (
    SELECT
    tx_hash,
    date_trunc('week', block_timestamp) as week,
    block_timestamp,
    origin_from_address as wallet,
    Last run: 20 days ago
    WEEK
    TOKEN
    SUPPLY_ACTIONS
    WITHDRAW_ACTIONS
    UNIQUE_SUPPLIERS
    UNIQUE_WITHDRAWERS
    TOTAL_SUPPLY_USD
    CUMULATIVE_SUPPLY_USD
    TOTAL_WITHDRAW_USD
    CUMULATIVE_WITHDRAW_USD
    NET_AMOUNT_USD
    CUMULATIVE_TVL_USD
    1
    2025-04-07 00:00:00.000USDF932335161.0818033903136.595161268.0114591535092.288714-126106.9296562368044.306286
    2
    2025-04-07 00:00:00.000WETH2213177.845345016460663.17607562213177.845345016449591.955352958
    3
    2025-04-07 00:00:00.000WFLOW204101795294.6186478513053293.29387481795294.6186478512956126.0694856
    4
    2025-04-07 00:00:00.000ankrFLOWEVM5323973.1833414121738945.7651046123973.1833414121628854.96822478
    5
    2025-04-07 00:00:00.000stgUSDC111111216.0945151336242.03574611216.094763100076.631395-0.00024799999851236165.404351
    6
    2025-03-31 00:00:00.000USDF867851954924.8550083867975.51319790326.411411373824.2772551864598.4435982494151.235942
    7
    2025-03-31 00:00:00.000WETH1111107.326471335447485.330730607664.01862377211071.220722665-556.692152437436414.110007942
    8
    2025-03-31 00:00:00.000WFLOW326109424725.3442651211257998.6752279424725.3442651211160831.4508378
    9
    2025-03-31 00:00:00.000ankrFLOWEVM252285104995.3383387781714972.581763237276.022088683110090.79687982667719.3162500961604881.78488337
    10
    2025-03-24 00:00:00.000USDF1312900.1504561913050.65818920293.3613641283497.865845-19393.210908629552.792344
    11
    2025-03-24 00:00:00.000WETH312140286.898544651447378.0042592721.62351072310407.20209889340285.275033928436970.802160379
    12
    2025-03-24 00:00:00.000WFLOW353431334109.678736771833273.3309618864922.54947192497167.224389231269187.129264851736106.10657265
    13
    2025-03-24 00:00:00.000ankrFLOWEVM44292276478.886436351609977.243424424.92310320472814.774791143276473.9633331471537162.46863327
    14
    2025-03-24 00:00:00.000stgUSDC22253534.1836371325025.941231253534.1836371236165.404599
    15
    2025-03-17 00:00:00.000USDF401074632752.3728191912150.507733200733.2856891263204.504481432019.08713648946.003252
    16
    2025-03-17 00:00:00.000WETH21219792.167500719407091.1057146211.61637540110405.578588179790.551125318396685.527126451
    17
    2025-03-17 00:00:00.000WFLOW11382455194.999660412499163.65222510732244.29951258932244.674917307422950.700147823466918.9773078
    18
    2025-03-17 00:00:00.000ankrFLOWEVM39683589594.1454685921333498.3569880725012.89322557472809.85168794564581.2522430181260688.50530013
    19
    2025-03-17 00:00:00.000stgUSDC3121509106.7203931071491.7575941569.84008388860.536632507536.88031982631.220962
    20
    2025-03-10 00:00:00.000USDF4231215888.9839461279398.134914501062471.218792215838.983946216926.916122
    46
    6KB
    15s