Query editor
-- ============================================================-- Widget 17: FT Allocation Status Over Time-- Area Chart (stacked): x=day, y=amount, color=category---- Tracks true FT allocation using ALL on-chain Transfer events.-- All categories sum to 10B (original Sonic mint).---- Categories:-- PutManager (in puts): ftAllocated from Invested/Divested/Withdraw events-- PutManager (unallocated): PutManager actual FT balance minus ftAllocated-- Msig: FT held by the multisig across ALL chains-- VC Contracts: FT held by addresses that received directly from msig-- On Ethereum: all other Ethereum holders (residual)-- On Sonic / Base / BNB / Avalanche: per-chain circulating supply (excluding msig)-- Burned: real burns across all chains (to 0x0, excluding OFT sends)-- ============================================================WITH vc_addresses AS (SELECT DISTINCT "to" AS addressFROM flyingtulip_ethereum.FT_evt_TransferWHERE "from" = 0x22246a9183ce2ce6e2c2a9973f94aea91435017cAND "to" NOT IN (0xbA49d0AC42f4fBA4e24A8677a22218a4dF75ebaA,0x0000000000000000000000000000000000000000)),events AS (-- Invested: ftAllocated += amountSELECT DATE_TRUNC('day', evt_block_time) AS day,CAST(0 AS double) AS eth_supply_change,SUM(amount / 1e18) AS allocated_change,CAST(0 AS double) AS putmanager_change,CAST(0 AS double) AS msig_change,CAST(0 AS double) AS vc_change,CAST(0 AS double) AS sonic_change,CAST(0 AS double) AS base_change,CAST(0 AS double) AS bnb_change,CAST(0 AS double) AS avax_change,CAST(0 AS double) AS burned_change,CAST(0 AS double) AS msig_other_changeFROM flyingtulip_ethereum.PutManager_evt_InvestedGROUP BY 1UNION ALL-- Divested: ftAllocated -= amountSELECT DATE_TRUNC('day', evt_block_time),0, -SUM(amount / 1e18), 0, 0, 0, 0, 0, 0, 0, 0, 0FROM flyingtulip_ethereum.PutManager_evt_DivestedGROUP BY 1UNION ALL-- Withdraw: ftAllocated -= amount (the FT Transfer is tracked below)SELECT DATE_TRUNC('day', evt_block_time),0, -SUM(amount / 1e18), 0, 0, 0, 0, 0, 0, 0, 0, 0FROM flyingtulip_ethereum.PutManager_evt_WithdrawGROUP BY 1