CryptoIcicleETH Removed - AAVE
    Updated 2022-09-17
    -- ETH Removed
    -- Examine user behavior in recent weeks leading up to the merge on at least 3 major protocols.

    -- Pay by Quality
    -- Your score determines your final payout.
    -- Grand Prize 112.5 USDC (A score of 11 or 12 earns you a Grand Prize title)
    -- Payout 75 USDC
    -- Score Multiplier0-7 : 0% 8 : 50% 9 : 75% 10 : 100% 11 : 125% 12 : 150%
    -- Payout Network Ethereum
    -- Level Intermediate
    -- Difficulty Hard

    -- Examine user behavior in recent weeks leading up to the merge on at least 3 major protocols.
    -- Have there been any changes in the amount of ETH removed from protocols like Uniswap and Aave?
    -- Note any trends or outliers you find.

    with token_price as (
    select
    date_trunc('day', hour) as date,
    avg(price) as price
    from ethereum.token_prices_hourly
    where symbol = 'WETH'
    and hour >= CURRENT_DATE - {{n_days}}
    group by date
    ),
    txns as (
    (
    select
    p.date,
    'desposit' as type,
    count(distinct tx_hash) as n_txns,
    count(distinct depositor_address) as n_wallets,
    sum(issued_tokens) as eth_amount,
    sum(issued_tokens * p.price) as usd_amount
    from ethereum.aave.ez_deposits d
    join token_price p on p.date = block_timestamp::date
    Run a query to Download Data