samborrows all time gfinch
    Updated 2024-06-19
    with withdraw_base as (
    select
    block_timestamp,
    tx_hash,
    to_address as borrower,
    amount
    from ethereum.core.ez_token_transfers
    where block_timestamp >= '2021-01-01'
    and origin_function_signature in (
    '0x441a3e70'
    ,'0x9d110530'
    )
    and from_address = '{{borrower_pool}}'
    and contract_address = '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'
    )

    select
    count(distinct borrower) as total_borrower,
    count(distinct tx_hash) as borrow_transactions,
    sum(amount) as total_usdc_borrowed
    from withdraw_base
    QueryRunArchived: QueryRun has been archived