0xHaM-dBorrowers Breakdown
    Updated 2025-05-01
    with priceTb as (
    select
    hour,
    price
    from ethereum.price.ez_prices_hourly
    where SYMBOL = 'WBTC'
    and hour::date >= '2025-03-01'
    )
    ,
    openTrove as (
    select
    BLOCK_TIMESTAMP,
    tx_hash,
    FROM_ADDRESS as borrower_add,
    value as collateral,
    value*price as collateral_usd,
    regexp_substr_all(SUBSTR(INPUT, 11, len(INPUT)), '.{64}') AS segmented_data,
    ethereum.public.udf_hex_to_int(segmented_data[1])::int/1e18 as debt_value,
    from mezo.testnet.fact_traces
    join priceTb on trunc(BLOCK_TIMESTAMP, 'hour') = hour
    where TO_ADDRESS = '0x20faea18b6a1d0fcdbccfffe3d164314744baf30'
    and left(input,10) ilike '0x8f09162b'
    and tx_succeeded = 'True'
    )
    ,
    adjustTrove as (
    select
    BLOCK_TIMESTAMP,
    tx_hash,
    FROM_ADDRESS as borrower_add,
    value as collateral,
    value*price as collateral_usd,
    regexp_substr_all(SUBSTR(INPUT, 11, len(INPUT)), '.{64}') AS segmented_data,
    ethereum.public.udf_hex_to_int(segmented_data[1])::int/1e18 as debt_value,
    ethereum.public.udf_hex_to_int(segmented_data[2])::int/1e18 as adjust_amt,
    ethereum.public.udf_hex_to_int(segmented_data[3])::int/1e18 as increase_debt,
    Last run: about 1 month ago
    COLL_BREAKDOWN
    DEBT_BREAKDOWN
    N_BORROWERS
    1
    10 ~ $50 Collat1000 ~ $5000 mUSD15126
    2
    10 ~ $50 Collat5000 ~ $10000 mUSD2831
    3
    < $10 Collat100 ~ $500 mUSD470
    4
    100 ~ $500 Collat>= $10000 mUSD397
    5
    50 ~ $100 Collat>= $10000 mUSD311
    6
    < $10 Collat1000 ~ $5000 mUSD259
    7
    < $10 Collat500 ~ $1000 mUSD208
    8
    < $10 Collat10 ~ $50 mUSD104
    9
    < $10 Collat< $10 mUSD57
    10
    50 ~ $100 Collat5000 ~ $10000 mUSD40
    11
    1000 ~ $5000 Collat>= $10000 mUSD37
    12
    500 ~ $1000 Collat>= $10000 mUSD36
    13
    10 ~ $50 Collat>= $10000 mUSD29
    14
    < $10 Collat50 ~ $100 mUSD27
    15
    50 ~ $100 Collat1000 ~ $5000 mUSD27
    16
    >= $10000 Collat>= $10000 mUSD15
    17
    100 ~ $500 Collat1000 ~ $5000 mUSD15
    18
    < $10 Collat>= $10000 mUSD9
    19
    < $10 Collat5000 ~ $10000 mUSD8
    20
    5000 ~ $10000 Collat>= $10000 mUSD8
    28
    1KB
    11s