MoDeFinear burrow pools - txs and volume feed copy
    Updated 2025-03-16
    with
    succeeded_txs as (
    select tx_hash as tx, TRANSACTION_FEE/1e24 as fee
    from near.core.fact_transactions
    where TX_SUCCEEDED=true and BLOCK_TIMESTAMP::date>'2023-05-09'
    ),

    panicked_txs as (
    select tx_hash
    from near.core.fact_receipts
    where STATUS_VALUE:Failure is not null
    and RECEIVER_ID='contract.main.burrow.near'
    and BLOCK_TIMESTAMP::date>'2023-05-09'
    group by 1),

    liquidated_txs as (
    select tx_hash
    from near.core.fact_logs
    where TRY_PARSE_JSON(CLEAN_LOG):standard='burrow'
    and BLOCK_TIMESTAMP::date>'2023-05-09'
    and RECEIVER_ID='contract.main.burrow.near'
    and TRY_PARSE_JSON(CLEAN_LOG):event='liquidate'
    group by 1),
    ---------------------------------------------------Burrow Platform---------------------------------------------------
    burrow_txs as (
    with burrow_events as (
    select BLOCK_TIMESTAMP, RECEIVER_ID, TRY_PARSE_JSON(CLEAN_LOG) AS event_json,
    tx_hash
    from near.core.fact_logs
    where event_json:standard='burrow'
    and BLOCK_TIMESTAMP::date>'2023-05-10'
    and RECEIVER_ID='contract.main.burrow.near'
    and tx_hash not in (select tx_hash from panicked_txs)
    and event_json:event in ('deposit','withdraw_succeeded','deposit_to_reserve','repay','borrow'))


    Last run: 25 days ago
    DATE_TRUNC(DAY,BLOCK_TIMESTAMP)
    ACTIONS
    COUNT(*)
    SUM(AMOUNT)
    1
    2025-03-16 00:00:00.000withdraw_succeeded43154275.681519697
    2
    2025-03-16 00:00:00.000borrow10135744.973300902
    3
    2025-03-16 00:00:00.000increase_collateral216423.79823
    4
    2025-03-16 00:00:00.000repay7134544.7631306
    5
    2025-03-16 00:00:00.000deposit30141968.561361
    6
    2025-03-16 00:00:00.000decrease_collateral3318530.708218795
    7
    2025-03-15 00:00:00.000increase_collateral4820996605.690738
    8
    2025-03-15 00:00:00.000borrow1117019743.4217208
    9
    2025-03-15 00:00:00.000withdraw_succeeded6519845599.0363272
    10
    2025-03-15 00:00:00.000repay610799.215968418
    11
    2025-03-15 00:00:00.000decrease_collateral541823822.01585478
    12
    2025-03-15 00:00:00.000deposit5922334624.635559
    13
    2025-03-14 00:00:00.000withdraw_succeeded65859207.44530076
    14
    2025-03-14 00:00:00.000repay5155170.527195088
    15
    2025-03-14 00:00:00.000borrow29738275.484991832
    16
    2025-03-14 00:00:00.000deposit34389413.462364
    17
    2025-03-14 00:00:00.000increase_collateral30234743.541504
    18
    2025-03-14 00:00:00.000decrease_collateral37121375.723193689
    19
    2025-03-13 00:00:00.000borrow926460.323608258
    20
    2025-03-13 00:00:00.000deposit3260251.764084
    ...
    1233
    75KB
    4s