Query editor
-- AMPLOL Supply-- Token Contract: 0xEadF1dE23Cece2109Cb72517da1b7b710b7509e5-- Burn address: 0x0000000000000000000000000000000000000000-- we can determine the historical supply for any given token by calculating flows involving the burn address-- mints/burn = transfers from/to burn address, and use the resulting data to get what we want, with this in mind:-- given it's a rebasing token that is a function of the TVL, the total supply is determined by cumulative flows(burn) * weETH TVLWITHMints AS (SELECTDATE_TRUNC('day', evt_block_time) AS date,value / 1e18 AS valueFROMerc20_ethereum.evt_TransferWHEREcontract_address = 0xEadF1dE23Cece2109Cb72517da1b7b710b7509e5AND "from" = 0x0000000000000000000000000000000000000000),Burns AS (SELECTDATE_TRUNC('day', evt_block_time) AS date,value / -1e18 AS valueFROMerc20_ethereum.evt_TransferWHEREcontract_address = 0xEadF1dE23Cece2109Cb72517da1b7b710b7509e5AND "to" = 0x0000000000000000000000000000000000000000),Flows AS (SELECTdate,valueFROMMintsUNION ALLSELECTdate,valueFROMBurns),weETH_TVL AS (SELECTday AS date,cumulative_weETH_flowsFROMquery_3825095)SELECTf.date,f.value,SUM(f.value) OVER (ORDER BY f.date) AS total,w.cumulative_weETH_flows,SUM(f.value) OVER (ORDER BY f.date) * w.cumulative_weETH_flows AS AMPLOL_total_supplyFROMFlows fLEFT JOINweETH_TVL wONf.date = w.date