cryptodatadiveDaily Netflow
    Updated 2025-04-06
    WITH Deposits AS (
    SELECT DISTINCT
    contract_name,
    contract_address,
    origin_from_address AS depositor,
    CASE
    WHEN decoded_log:wad IS NOT NULL
    THEN (decoded_log:wad::int)
    WHEN decoded_log:assets IS NOT NULL
    THEN CAST(PARSE_JSON(decoded_log:assets)[0] AS BIGINT)
    END AS deposit_amount,
    tx_hash,
    DATE_TRUNC('day', block_timestamp) AS deposit_date
    FROM swell.core.ez_decoded_event_logs
    WHERE event_name IN ('Deposit', 'Deposits')
    ),

    Withdrawals AS (
    SELECT DISTINCT
    contract_name,
    contract_address,
    origin_from_address AS withdrawer,
    CASE
    WHEN decoded_log:wad IS NOT NULL
    THEN (decoded_log:wad::int)
    WHEN decoded_log:assets IS NOT NULL
    THEN CAST(PARSE_JSON(decoded_log:assets)[0] AS BIGINT)
    END AS withdrawal_amount,
    tx_hash,
    DATE_TRUNC('day', block_timestamp) AS withdrawal_date
    FROM swell.core.ez_decoded_event_logs
    WHERE event_name IN ('Withdraw', 'Withdrawal')
    ),
    prices AS (
    SELECT
    LOWER(name) AS name,
    Last run: 20 days ago
    DATE
    TOTAL_DEPOSITS_USD
    TOTAL_WITHDRAWALS_USD
    NET_FLOW_USD
    1
    2024-12-02 00:00:00.0000.000073348761320.000037551554770.00003579720656
    2
    2024-12-03 00:00:00.000218529.721206512191998.89827681626530.822929697
    3
    2024-12-04 00:00:00.000962.017556.152363902905.865136098
    4
    2024-12-05 00:00:00.00067.807163368.04508777-0.2379244696
    5
    2024-12-06 00:00:00.0001227.0899270.7402704651156.349649535
    6
    2024-12-07 00:00:00.000220.7799175.4216677745.35823223
    7
    2024-12-08 00:00:00.0000491.455564903-491.455564903
    8
    2024-12-09 00:00:00.0000.361736525228.620712525-228.258976
    9
    2024-12-10 00:00:00.000912.83750912.8375
    10
    2024-12-11 00:00:00.0001914.8401914.84
    11
    2024-12-12 00:00:00.000139.95936617258.74110881.218258172
    12
    2024-12-13 00:00:00.0000.039007500.0390075
    13
    2024-12-16 00:00:00.0000484.590155735-484.590155735
    14
    2024-12-17 00:00:00.0000.6195480598567.199889036-566.580340976
    15
    2024-12-18 00:00:00.0001.6664399301.66643993
    16
    2024-12-19 00:00:00.000142487.8755245198205.397068569134282.478455951
    17
    2024-12-20 00:00:00.0005218.6802316172390.4794630482828.200768569
    18
    2024-12-21 00:00:00.0002741.554182181758.268485369983.285696811
    19
    2024-12-22 00:00:00.0001441.5222882981774.486791071-332.964502774
    20
    2024-12-23 00:00:00.000142962.5425042482784.917921779140177.624582469
    ...
    124
    9KB
    2s