adriaparcerisasStablecoins analysis on AAVE 2.0 (USDC and DAI)
    Updated 2023-03-27
    --The main cause of the uptick in the USDC utilization ratio seems to be the uptic in the total stable + variable debt in August. There's an exponential increase around August 6th where the debt increases from 4 Billion to 5 Billion.

    WITH top2 AS (
    (SELECT 'USDC' AS symbol)
    UNION
    (SELECT 'DAI' AS symbol)
    )

    SELECT
    date_trunc('day',block_hour) AS date,
    t.symbol,
    AVG(borrow_rate_stable) * 100 as stable_apy,
    AVG(borrow_rate_variable) * 100 as variable_apy,
    AVG(supply_rate) * 100 as deposit_apy,
    avg(total_liquidity_token) as liquidity_token,
    avg(total_stable_debt_token + total_variable_debt_token) as debt_token,
    avg(utilization_rate) * 100 as utilization_rate
    FROM aave.market_stats m INNER JOIN top2 t ON t.symbol = m.reserve_name
    WHERE date >= CURRENT_DATE - 365 and aave_version = 'Aave V2'
    GROUP BY 1,2
    order by 1
    Run a query to Download Data