Query editor
-- 1. https://dune.com/queries/3082451 - dsETH: Composition at Month Start-- 2. https://dune.com/queries/3082286 - dsETH: Daily NAV (Past 90 days) [content_pod]-- 3. https://dune.com/queries/3159039 - dsETH Yield: 30d, 60d, 90d (Net Yield & APY)-- ## Queries above are dependent to the query below.with-- token parametersproduct_token(address, symbol, decimals) as (values(0x341c05c0E9b33C0E38d64de76516b2Ce970bB3BE, 'dstETH', 18 ))-- get the CURRENT composition of the product_token, product_composition_current as (select*from(selectc.day,token_address,token_symbol,unit_supply,component_address,component_symbol,default_units,component_balance,row_number() over (partition by component_address order by day desc) as rnbfrom dune.index_coop.result_compositions_indexprotocolbased_products_daily c -- Compositions | All Products, Dailyinner join product_token p on c.token_address = p.address)where rnb = 1)-- get the ALL-TIME composition of the product_token, product_composition_all as (selectc.day,token_address,token_symbol,unit_supply,component_address,component_symbol,default_units,component_balancefrom dune.index_coop.result_compositions_indexprotocolbased_products_daily c -- Compositions | All Products, Dailyinner join product_token p on c.token_address = p.address)--- manually add price that are not in prices.usd, oseth_price_temp as (select date_trunc('day',block_time) as day, symbol, contract_address, avg(price) as price,lead(date_trunc('day',block_time),1,now()) over (order by date_trunc('day',block_time)) as next_dayfrom (selectblock_time,'osETH' as symbol,token_bought_address as contract_address,amount_usd/(cast(token_bought_amount_raw as DOUBLE)/1e18) as pricefrom dex.trades