rezarwzborrow
    Updated 2024-12-04
    with jucie_finance as (
    SELECT
    'Blast' as chain,
    BLOCK_TIMESTAMP :: Date as date,
    'USDB' as symbol,
    '0x4300000000000000000000000000000000000003' as token_contract,
    sum(decoded_log:amount / pow(10, 18)) as stable_coin_borrows_token
    FROM
    blast.core.ez_decoded_event_logs
    where
    contract_address = lower('0x4A1d9220e11a47d8Ab22Ccd82DA616740CF0920a')
    and event_name = 'Borrow'
    AND BLOCK_TIMESTAMP :: Date BETWEEN CURRENT_DATE -1 -29
    AND CURRENT_DATE -1
    group by
    1,
    2,
    3,
    4
    ),
    Orbit_Protocol as (
    SELECT
    'Blast' as chain,
    BLOCK_TIMESTAMP :: Date as date,
    'USDB' as symbol,
    '0x4300000000000000000000000000000000000003' as token_contract,
    sum(decoded_log:borrowAmount / pow(10, 18)) as stable_coin_borrows_token
    FROM
    blast.core.ez_decoded_event_logs
    where
    contract_address = lower('0x9aecedcd6a82d26f2f86d331b17a1c1676442a87')
    and event_name = 'Borrow'
    AND BLOCK_TIMESTAMP :: Date BETWEEN CURRENT_DATE -1 -29
    AND CURRENT_DATE -1
    group by
    1,
    QueryRunArchived: QueryRun has been archived