Query editor
-- treasury address ethereum 0xa0DA53447C0f6C4987964d8463da7e6628B30f82-- lp address on ethereum 0x09D1d767eDF8Fa23A64C51fa559E0688E526812Fwith amount_in_lp as (selectdate_trunc('day', evt_block_time) as dt,cast(sum(value)/1e18 as double) as amount_lpfrom erc20_ethereum.evt_Transferwherecontract_address = 0x09D1d767eDF8Fa23A64C51fa559E0688E526812Fand "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_ethereum.evt_Transferwherecontract_address = 0x09D1d767eDF8Fa23A64C51fa559E0688E526812Fand "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) over (ORDER BY dt asc) as liquidity_lpfrom daily_liquidity),--- 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 = 0x09D1d767eDF8Fa23A64C51fa559E0688E526812Fand "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 = 0x09D1d767eDF8Fa23A64C51fa559E0688E526812Fand "from" = 0xa0DA53447C0f6C4987964d8463da7e6628B30f82group by 1),acquired_asset as (select * from amount_inunion all