CryptoIcicleOsmo-11.wETH Deposit Rate - Osmosis
    Updated 2022-06-13
    -- wETH Deposit Rate

    -- Payout 81.97 OSMO
    -- Grand Prize 245.9 OSMO
    -- Level Intermediate

    -- Q11. Calculate the deposit rate of wETH over time on Osmosis.
    -- How does this compare to SushiSwap and Thorchain now?
    -- How does the wETH deposit rate compare to when wETH was a relatively new asset (or the protocol was relatively new)?
    -- Is Osmosis growing at a faster rate than Thorchain and Sushiswap?
    -- Hint: There are two types of wETH on Osmosis, wETH from the Gravity Bridge (gwETH) and WETH from the Axelier Bridge (axlWETH).

    WITH t AS (
    SELECT tx_id, COUNT(1) AS n
    FROM osmosis.core.fact_swaps
    WHERE block_timestamp >= {{start_date}}
    GROUP BY 1
    ),
    weth_labels as (
    select
    *
    from osmosis.core.dim_labels
    where project_name ilike '%weth%' and label_subtype = 'token_contract'
    ),
    swaps as (
    SELECT s.*, CASE WHEN t.n = 1 THEN 0 ELSE 1 END AS two_sided_swap
    FROM osmosis.core.fact_swaps s
    JOIN t ON t.tx_id = s.tx_id
    WHERE block_timestamp >= {{start_date}}
    and two_sided_swap = 0
    and to_currency in (select address from weth_labels)
    )

    select
    date_trunc('month',block_timestamp) as date,
    l.label,
    Run a query to Download Data