Query editor
-- treasury address ethereum 0xa0DA53447C0f6C4987964d8463da7e6628B30f82-- bridged lp address on ethereum 0x27df632fd0dcf191C418c803801D521cd579F18e-- lp pool on gnosis 0x79C872Ed3Acb3fc5770dd8a0cD9Cd5dB3B3Ac985-- protocolFee collector on gnosis 0xce88686553686DA562CE7Cea497CE749DA109f9Fwith amount_in_lp as (selectdate_trunc('day', evt_block_time) as dt,cast(sum(value)/1e18 as double) as amount_lpfrom erc20_gnosis.evt_Transferwherecontract_address = 0x79C872Ed3Acb3fc5770dd8a0cD9Cd5dB3B3Ac985and "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_gnosis.evt_Transferwherecontract_address = 0x79C872Ed3Acb3fc5770dd8a0cD9Cd5dB3B3Ac985and "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 = 0x27df632fd0dcf191C418c803801D521cd579F18eand "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 = 0x27df632fd0dcf191C418c803801D521cd579F18eand "from" = 0xa0DA53447C0f6C4987964d8463da7e6628B30f82