CryptoIcicleETH Derivatives - Swaps From
    Updated 2022-09-13
    -- 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 Multiplier 0-7 : 0% 8 : 50% 9 : 75% 10 : 100% 11 : 125% 12 : 150%
    -- Payout Network Ethereum
    -- Level Intermediate
    -- Difficulty Hard
    -- Consider the liquid staking ETH derivates from ankr, rocketpool and lido(aETH , rETH and stETH ).
    -- What are some trends around the price volatility for these tokens? Swap activity?


    -- aETH 0xE95A203B1a91a908F9B9CE46459d101078c2c3cb
    -- rETH 0xae78736cd615f374d3085123a210448e74fc6393
    -- stETH 0xae7ab96520de3a18e5e111b5eaab095312d7fe84

    with
    swaps as (
    select
    CASE token_in
    WHEN lower('0xE95A203B1a91a908F9B9CE46459d101078c2c3cb') THEN 'aETH'
    WHEN lower('0xae78736cd615f374d3085123a210448e74fc6393') THEN 'rETH'
    WHEN lower('0xae7ab96520de3a18e5e111b5eaab095312d7fe84') THEN 'stETH'
    END as type,
    *
    from ethereum.core.ez_dex_swaps
    where token_in in (
    lower('0xE95A203B1a91a908F9B9CE46459d101078c2c3cb'), -- aETH
    lower('0xae78736cd615f374d3085123a210448e74fc6393'), -- rETH
    lower('0xae7ab96520de3a18e5e111b5eaab095312d7fe84') -- stETH
    )
    and block_timestamp >= CURRENT_DATE - {{n_days}}
    )

    select
    date_trunc('{{date_range}}', block_timestamp) as date,
    Run a query to Download Data