Query editor
with burn as (selectDATE_trunc('month', evt_block_time) AS month,sum (value)/pow(10,18) as valuefrom discount_yfi_ethereum.dYFI_evt_Transferwhere "from" <> x'0000000000000000000000000000000000000000' AND to = x'0000000000000000000000000000000000000000'group by 1),mint as (selectDATE_trunc('month', evt_block_time) AS month,sum (value)/pow(10,18) as valuefrom discount_yfi_ethereum.dYFI_evt_Transferwhere "to" <> x'0000000000000000000000000000000000000000' AND "from" = x'0000000000000000000000000000000000000000'group by 1),token_creation as (select * from mintunion allselectmonth,-1*valuefrom burn),dyfi_total_supply as (selectsum(value) as valuefrom token_creation),----yfi in redeem contractDeposits as (selectDATE_TRUNC('month', evt_block_time) as time,sum(value) as YFIFROM erc20_ethereum.evt_TransferWHERE contract_address = 0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93eand (to = 0x7dC3A74F0684fc026f9163C6D5c3C99fda2cf60a)group by 1),withdraws as (selectDATE_TRUNC('month', evt_block_time) as time,sum(-value) as YFIFROM erc20_ethereum.evt_TransferWHERE contract_address = 0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93eand ("from" = 0x7dC3A74F0684fc026f9163C6D5c3C99fda2cf60a)group by 1),balance_yfi as (select * from Depositsunion allselect * from withdraws),balance_yfi_sum as (selectsum (YFI)/pow(10,18) as value