Query editor
-- ankrwith ankr as (select time, ((ratio2-ratio1)*(31536000/86400))*100 as aprfrom(select *,lag(ratio1,1) over (order by time asc) as ratio2from ( select date_trunc('day', evt_block_time) as time, evt_block_number as block_number, (newRatio/1e18) as ratio1, contract_address as contractfrom ankr_ethereum.AETHC_Token_v2_evt_RatioUpdate))),stakewise as (select DATE(a.call_block_time) as time, b.periodRewards/1e18 as per_rewards,(b.periodRewards/1e18)/(a.output_0/1e18) * 365*100 as aprfrom stakewise_ethereum.StakedEthToken_call_totalDeposits a,stakewise_ethereum.RewardEthToken_Portara_evt_RewardsUpdated bwhere a.call_block_number = b.evt_block_numberand a.contract_address = 0xfe2e637202056d30016725477c5da089ab0a043a),frax as (select time, ((ratioNew-ratioOld)*(31536000/86400))*100 as aprfrom (select *, lag(ratioNew,1) over (order by time asc) as ratioOldfrom ((select date_trunc('day', call_block_time) as time,AVG(output_0)/1e18 as ratioNewfrom frax_ethereum.sfrxETH_call_pricePerShareGROUP by date_trunc('day', call_block_time))))),rocketpool as (with token_reth as (select date_trunc('day', call_block_time) as time, sum(_ethAmount) as eth, sum(output_0) as rethfrom rocketpool_ethereum.RocketTokenRETH_call_getRethValueGROUP by date_trunc('day', call_block_time)),ratios as (SELECT *,(reth * 1e18)/(eth*1e18) as ratio1from token_reth),token_ratio as (select *,lag(ratio1,1) over (order by time asc) as ratio2from ratios)select time, ((ratio2-ratio1)*(31536000/86400))*100 as aprfrom token_ratio),coinbase as (select time, ((ratio1/1e18-ratio2/1e18)*(31536000/86400))*100 as aprfrom (select *, newExchangeRate as ratio1, date_trunc('day', evt_block_time) as time,lag(newExchangeRate,1) over (order by date_trunc('day', evt_block_time) asc) as ratio2from coinbase_ethereum.StakedTokenV1_evt_ExchangeRateUpdated)-- where ((ratio1/1e18-ratio2/1e18)*(31536000/86400))*100 > -5 -- to remove outliers),lido as (select DATE(evt_block_time) as time