Query editor
-- treasury address ethereum 0xa0DA53447C0f6C4987964d8463da7e6628B30f82-- bridged MATIC-OLAS lp address on ethereum (old 0x06512E620A8317da51a73690A596Aca97287b31D, new0xf9825A563222f9eFC81e369311DAdb13D68e60a4 )-- MATIC-OLAS lp pool on gnosis 0x62309056c759c36879Cde93693E7903bF415E4Bcwith amount_in_lp as (selectdate_trunc('day', evt_block_time) as dt,cast(sum(value)/1e18 as double) as amount_lpfrom erc20_polygon.evt_Transferwherecontract_address = 0x62309056c759c36879Cde93693E7903bF415E4Bcand "from" = 0x0000000000000000000000000000000000000000-- 0xce88686553686DA562CE7Cea497CE749DA109f9F fee collectorand "to" not in (--0xce88686553686DA562CE7Cea497CE749DA109f9F,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_polygon.evt_Transferwherecontract_address = 0x62309056c759c36879Cde93693E7903bF415E4Bcand "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_old as (selectdate_trunc('day', evt_block_time) as dt,cast(sum(value)/1e18 as double) as amountfrom erc20_ethereum.evt_Transferwherecontract_address = 0x06512E620A8317da51a73690A596Aca97287b31Dand "to" = 0xa0DA53447C0f6C4987964d8463da7e6628B30f82group by 1),amount_out_old as (selectdate_trunc('day',evt_block_time) as dt,-1*cast(sum(value)/1e18 as double) as amountfrom erc20_ethereum.evt_Transferwhere