kema_sanSilo deposits
    Updated 2024-09-23
    /*Silo Factory 0x4166487056A922D784b073d4d928a516B074b719
    Silo Router 0x9992f660137979c1ca7f8b119cd16361594e3681
    Silo token 0x0341c0c0ec423328621788d4854119b97f44e391
    XAI - 0xd7c9f0e536dc865ae858b0c0453fe76d13c3beac - Mainnet
    1. total supply
    2. price
    3. TVL
    4. number of txn
    5. number of unique users
    6. deposit/witdrawal daily
    7.
    */

    -- with base as (
    SELECT
    date_trunc('week', BLOCK_TIMESTAMP) as time
    , count(DISTINCT DEPOSITOR) as depositor
    , sum(AMOUNT) as amount
    , sum(AMOUNT_USD) as amount_usd
    , TOKEN_SYMBOL as token
    , count(TX_HASH) as deposit_txns
    , 'deposits' as action
    FROM arbitrum.defi.ez_lending_deposits
    WHERE platform = 'Silo'
    GROUP BY 1,5,7
    -- UNION all
    -- SELECT
    -- date_trunc('week', BLOCK_TIMESTAMP) as time
    -- , count(DISTINCT DEPOSITOR) as depositor
    -- , - sum(AMOUNT) as amount
    -- , - sum(AMOUNT_USD) as amount_usd
    -- , TOKEN_SYMBOL as token
    -- , count(TX_HASH) as witdrawal_txns
    -- , 'withdraws' as action
    -- FROM arbitrum.defi.ez_lending_withdraws
    -- WHERE platform = 'Silo'
    QueryRunArchived: QueryRun has been archived