Query editor
-- treasury address ethereum 0xa0DA53447C0f6C4987964d8463da7e6628B30f82-- bridged lp address on ethereum 0x36B203Cb3086269f005a4b987772452243c0767f-- lp pool on arbitrum 0xAF8912a3C4f55a8584B67DF30ee0dDf0e60e01f8with amount_in_lp as (selectdate_trunc('day', evt_block_time) as dt,cast(sum(value)/1e18 as double) as amount_lpfrom erc20_arbitrum.evt_Transferwherecontract_address = 0xAF8912a3C4f55a8584B67DF30ee0dDf0e60e01f8and "from" = 0x0000000000000000000000000000000000000000and "to" not in (0x0000000000000000000000000000000000000000)group by 1),amount_out_lp as (select date_trunc('day',evt_block_time) as dt,-1*cast(sum(value)/1e18 as double) as amount_lpfrom erc20_arbitrum.evt_Transferwherecontract_address = 0xAF8912a3C4f55a8584B67DF30ee0dDf0e60e01f8and "from" != 0x0000000000000000000000000000000000000000and "to" = 0x0000000000000000000000000000000000000000group by 1),daily_liquidity as (select * from amount_in_lpunion allselect * from amount_out_lp),liquidity_value as (selectdt,sum(amount_lp) as liquidity_lp from daily_liquiditygroup by 1),--- owned partamount_in as (selectdate_trunc('day', evt_block_time) as dt,cast(sum(value)/1e18 as double) as amountfrom erc20_ethereum.evt_Transferwherecontract_address = 0x36B203Cb3086269f005a4b987772452243c0767fand "to" = 0xa0DA53447C0f6C4987964d8463da7e6628B30f82group by 1),amount_out as (select date_trunc('day',evt_block_time) as dt,-1*cast(sum(value)/1e18 as double) as amountfrom erc20_ethereum.evt_Transferwherecontract_address = 0x36B203Cb3086269f005a4b987772452243c0767fand "from" = 0xa0DA53447C0f6C4987964d8463da7e6628B30f82group by 1),acquired_bridged_asset as (