Query editor
with protocol_rates as (select date_trunc('hour', evt_block_time) as ts_hour,avg(cast(assets as double) / cast(shares as double)) as ratefrom ethena_labs_ethereum.stakedusdev2_evt_withdrawwhere evt_block_time > cast('2025-06-01' as timestamp)group by 1), dex_rates as (select timestamp as ts_hour,price as ratefrom prices.hourwhere contract_address = 0x9D39A5DE30e57443BfF2A8307A4256c8797A3497and timestamp > cast('2025-06-01' as timestamp)and blockchain = 'ethereum')select pr.ts_hour,pr.rate as protocol_rate,dr.rate as dex_rate,(pr.rate / dr.rate - 1) as difffrom protocol_rates prjoin dex_rates dr on pr.ts_hour = dr.ts_hour