Query editor
with box_contracts (address, name) as (values(0xD746aE5e6E43e3B6a2c7bD18B60760E0861523F9, 'BoxV1'),(0x2D85ec05893d33C32ccAb97CDd17E512033ebDAD, 'Boxv2'),(0x615FFAeDd8319C1Df79FFDD842b3394cDf0E518A,'BoxV3')),eth_price as(select token_sold_amount/token_bought_amount as ETHPrice from uniswap_v3_ethereum.tradeswhere token_pair='USDT-WETH' and token_sold_symbol='USDT' order by block_time desc limit 1)select(-- TVLselect sum(case when "to" in (select address from box_contracts) then value/1e18 else -1*(value/1e18) end ) from zksync.traceswhere ("to" in (select address from box_contracts) or "from" in (select address from box_contracts)))*ETHPrice as tvl ,(-- Total Volumeselect sum(vol) from(select sum(amount)/1e18 as vol from box_v2_zksync.Box_evt_Tradeunion select sum(amount)/1e18 as vol from box_zksync.Box_evt_Tradeunion select sum(amount)/1e18 as vol from box_zksync.BoxV3_evt_Trade)a)*ETHPrice as vol,(-- total boxselect sum(boxs) from (select count(1) boxs from box_v2_zksync.Box_evt_PresaleEnd where presaleAmount>=100union select count(1) boxs from box_zksync.Box_evt_PresaleEnd where presaleAmount>=100union select count(1) boxs from box_zksync.BoxV3_evt_PresaleEnd where presaleAmount>=100)a) as success_boxsfrom eth_price;