hessBorrow and Repay
    Updated 2025-04-15
    with supply_decode as (select block_timestamp,
    tx_hash,
    regexp_substr_all(substr(input,11, len(input)), '.{64}') as segmented,
    '0x' || substr(segmented[0]::string, 25 ) as token_address,
    '0x' || substr(segmented[2]::string, 25 ) as user_address,
    livequery.utils.udf_hex_to_int(segmented [1] :: STRING) AS amount,
    case when token_address = '0x43edd7f3831b08fe70b7555ddd373c8bf65a9050' then amount/pow(10,18)
    when token_address = '0xb75d0b03c06a926e488e2659df1a861f860bd3d1' then amount/pow(10,6)
    when token_address = '0x5cf6826140c1c56ff49c808a1a75407cd1df9423' then amount/pow(10,6)
    when token_address = '0x160345fc359604fc6e70e3c5facbde5f7a9342d8' then amount/pow(10,18)
    when token_address = '0xe30fedd158a2e3b13e9badaeabafc5516e95e8c7' then amount/pow(10,18)
    when token_address = '0x3894085ef7ff0f0aedf52e2a2704928d1ec074f1' then amount/pow(10,6)
    when token_address = '0x80eede496655fb9047dd39d9f418d5483ed600df' then amount/pow(10,18)
    when token_address = '0x37a4dd9ced2b19cfe8fac251cd727b5787e45269' then amount/pow(10,18)
    when token_address = '0x5bff88ca1442c2496f7e475e9e7786383bc070c0' then amount/pow(10,18) end as amt
    from sei.core_evm.fact_traces
    where to_address = '0x4a4d9abd36f923cba0af62a39c01dec2944fb638'
    and left(input,10) in ('0x617ba037','0xe8eda9df')
    and (TX_STATUS = 'SUCCESS' or tx_status is null)
    and tx_hash != '0xc2a36963760985236d97ffc5e05102d4201186d8fd297b1a9fb28c5cebd1a1ab')
    ,
    supply_ez as ( select ifnull(block_timestamp,INSERTED_TIMESTAMP) as block_time,
    tx_hash,
    INSERTED_TIMESTAMP,
    case when contract_address = lower('0x809FF4801aA5bDb33045d1fEC810D082490D63a4') then '0xe30fedd158a2e3b13e9badaeabafc5516e95e8c7'
    when contract_address = lower('0xa524c4a280f3641743eBa56e955a1c58e300712b') then '0x5cf6826140c1c56ff49c808a1a75407cd1df9423'
    when contract_address = lower('0xc1a6F27a4CcbABB1C2b1F8E98478e52d3D3cB935') then '0x3894085ef7ff0f0aedf52e2a2704928d1ec074f1'
    when contract_address = lower('0x093066736E6762210de13F92b39Cf862eee32819') then '0x160345fc359604fc6e70e3c5facbde5f7a9342d8'
    when contract_address = lower('0xd3C367195f96A9387564287a28D935adb44D4531') then '0xe30fedd158a2e3b13e9badaeabafc5516e95e8c7'
    when contract_address = lower('0x1C4b5c523f859c0F1f14A722a1EAFDe10348F995') then '0x3ec3849c33291a9ef4c5db86de593eb4A37fde45'
    when contract_address = lower('0xF37d13B0008b177fF47296Fc0A15c9935086821d') then '0x3894085ef7ff0f0aedf52e2a2704928d1ec074f1'
    when contract_address = lower('0x945C042a18A90Dd7adb88922387D12EfE32F4171') then '0xb75d0b03c06a926e488e2659df1a861f860bd3d1'
    when contract_address = lower('0x04295E6912F95f2690993473E6CCAAE438Cf3f06') then lower('0x37a4dD9CED2b19Cfe8FAC251cd727b5787E45269')
    when contract_address = lower('0xC15dce4e1BfABbe0897845d7f7Ee56bc37113E08') then '0x80eede496655fb9047dd39d9f418d5483ed600df'
    when contract_address = lower('0x7090D5fdCEfB496651B55c20D56282CbcdDC2EE2') then '0x5bff88ca1442c2496f7e475e9e7786383bc070c0'
    when contract_address = lower('0x2a662eF26556a7d8795BF7a678E3Dd4b36FDec1e') then '0x43edd7f3831b08fe70b7555ddd373c8bf65a9050' end as token_address,
    Last run: 11 days ago
    TOKEN
    Toral Borrow
    Total Repay
    CURRENT_BALANCE
    Total Borrowed (USD)
    SUP_AMT
    WITH_AMT
    CURRENT_AMOUNT
    1
    USDC2600141871.62351-2510149966.8031489991904.820365489991904.82036542600180874.336622510187619.6174489993254.7191873
    2
    USDT644533748.355124-644323684.770409210063.584714532210063.584714532643889858.496627643680004.765644209853.730983257
    3
    FastUSD60149746.7374924-60077443.116606772303.6208857372303.6208857360149746.737492460077443.116606772303.62088573
    4
    WETH54963662.7497223-51028453.03068683935209.719035453935209.7190354533588.97965589631184.1239279172404.855727979
    5
    FRAX19371533.4961012-19340300.589675431232.90642581931232.90642581919371533.496101219340300.589675431232.906425819
    6
    sFRAX5603623.3468796-5601025.461152252597.8857273512597.8857273515603623.34687965601025.461152252597.885727351
    7
    FRAXETH695.628195711-649.08309821546.54509749546.5450974950.42510706430.39666277480.02844428946
    8
    sFRAXETH00092090.400385112084.686586235.713798879
    9
    iSei0009492677095.074546468830770.47795423846324.5965919
    10
    WSEI00091068146640.43892976810565.81072391336074.6281941
    10
    1KB
    11s