Query editor
WITH total_shares AS (SELECTSUM(CASEWHEN "from" = 0x0000000000000000000000000000000000000000 THEN CAST(value AS DOUBLE)WHEN "to" = 0x0000000000000000000000000000000000000000 THEN -CAST(value AS DOUBLE)ELSE 0END) / 1e18 AS tvl_rock_rethFROM erc20_ethereum.evt_TransferWHERE contract_address = 0x936faCdf10c8c36294e7b9d28345255539d81bc7 -- rock.rETH share tokenAND ("from" = 0x0000000000000000000000000000000000000000OR "to" = 0x0000000000000000000000000000000000000000)),latest_price AS (SELECT price AS reth_usdFROM prices.usdWHERE blockchain = 'ethereum'AND contract_address = 0xae78736Cd615f374D3085123A210448E74Fc6393 -- rETH priceORDER BY minute DESCLIMIT 1)SELECTROUND(ts.tvl_rock_reth, 4) AS tvl_rock_reth,ROUND(lp.reth_usd, 2) AS reth_price_usd,ROUND(ts.tvl_rock_reth * lp.reth_usd, 2) AS tvl_usdFROM total_shares ts, latest_price lp