Query editor
-- Original SQL by volganin portfolio implementation, 2026-09-16.-- Historical official event registry; current list is used only to corroborate metadata.-- See event-registry.json and methodology.md for evidence and interpretation.WITH events(event_id,symbol,blockchain,contract_address,announced_at,alpha_open_at,announcement_url) AS (VALUES('obol_alpha_20250507','OBOL','ethereum',0x0b010000b7624eb9b3dfbc279673c76e9d29d5f7,TIMESTAMP '2025-05-03 08:46:49.397',TIMESTAMP '2025-05-07 10:00:00','https://www.binance.com/en/support/announcement/detail/128fd735453046978d07d44fc802c302'),('sapien_alpha_20250820','SAPIEN','base',0xc729777d0470f30612b1564fd96e8dd26f5814e3,TIMESTAMP '2025-08-20 03:15:06.331',TIMESTAMP '2025-08-20 17:00:00','https://www.binance.com/en/support/announcement/detail/5131dd5b00c64977b10f402337850cd2'),('hemi_alpha_20250829','HEMI','bnb',0x5ffd0eadc186af9512542d0d5e5eafc65d5afc5b,TIMESTAMP '2025-08-27 14:00:20.269',TIMESTAMP '2025-08-29 04:00:00','https://www.binance.com/en/support/announcement/detail/8d04a97199e94203a9d5f0340d9afc59')),market_legs AS (SELECT 'obol_alpha_20250507' AS event_id, block_time, tx_hash, evt_index,project_contract_address, tx_from, project, amount_usd,CASE WHEN token_bought_address = 0x0b010000b7624eb9b3dfbc279673c76e9d29d5f7 THEN token_bought_amountELSE token_sold_amount END AS target_amountFROM dex.tradesWHERE blockchain = 'ethereum'AND block_month BETWEEN DATE '2025-05-01' AND DATE '2025-05-01'AND block_time >= TIMESTAMP '2025-05-03 00:00:00'AND block_time < TIMESTAMP '2025-05-15 00:00:00'AND (token_bought_address = 0x0b010000b7624eb9b3dfbc279673c76e9d29d5f7 OR token_sold_address = 0x0b010000b7624eb9b3dfbc279673c76e9d29d5f7)AND NOT (token_bought_address = 0x0b010000b7624eb9b3dfbc279673c76e9d29d5f7 AND token_sold_address = 0x0b010000b7624eb9b3dfbc279673c76e9d29d5f7)UNION ALLSELECT 'sapien_alpha_20250820' AS event_id, block_time, tx_hash, evt_index,project_contract_address, tx_from, project, amount_usd,CASE WHEN token_bought_address = 0xc729777d0470f30612b1564fd96e8dd26f5814e3 THEN token_bought_amountELSE token_sold_amount END AS target_amountFROM dex.tradesWHERE blockchain = 'base'AND block_month BETWEEN DATE '2025-08-01' AND DATE '2025-08-01'AND block_time >= TIMESTAMP '2025-08-20 00:00:00'AND block_time < TIMESTAMP '2025-08-28 00:00:00'AND (token_bought_address = 0xc729777d0470f30612b1564fd96e8dd26f5814e3 OR token_sold_address = 0xc729777d0470f30612b1564fd96e8dd26f5814e3)AND NOT (token_bought_address = 0xc729777d0470f30612b1564fd96e8dd26f5814e3 AND token_sold_address = 0xc729777d0470f30612b1564fd96e8dd26f5814e3)UNION ALLSELECT 'hemi_alpha_20250829' AS event_id, block_time, tx_hash, evt_index,project_contract_address, tx_from, project, amount_usd,CASE WHEN token_bought_address = 0x5ffd0eadc186af9512542d0d5e5eafc65d5afc5b THEN token_bought_amountELSE token_sold_amount END AS target_amountFROM dex.tradesWHERE blockchain = 'bnb'AND block_month BETWEEN DATE '2025-08-01' AND DATE '2025-09-01'AND block_time >= TIMESTAMP '2025-08-27 00:00:00'AND block_time < TIMESTAMP '2025-09-06 00:00:00'AND (token_bought_address = 0x5ffd0eadc186af9512542d0d5e5eafc65d5afc5b OR token_sold_address = 0x5ffd0eadc186af9512542d0d5e5eafc65d5afc5b)AND NOT (token_bought_address = 0x5ffd0eadc186af9512542d0d5e5eafc65d5afc5b AND token_sold_address = 0x5ffd0eadc186af9512542d0d5e5eafc65d5afc5b)),bins AS (SELECT e.*,h AS relative_hour,date_add('hour',h,alpha_open_at) AS hour_startFROM events e CROSS JOIN UNNEST(sequence(-6,168)) AS t(h)), agg AS (SELECT b.event_id,b.symbol,b.relative_hour,b.hour_start,COUNT(m.tx_hash) AS pool_legs,COUNT(DISTINCT m.tx_hash) AS transactions,COUNT(DISTINCT m.tx_from) AS origin_addresses,COUNT(DISTINCT m.project_contract_address) AS active_pool_contracts,COUNT_IF(m.amount_usd>0 AND m.target_amount>0) AS priced_pool_legs,SUM(m.amount_usd) FILTER (WHERE m.amount_usd>0 AND m.target_amount>0)/ NULLIF(SUM(m.target_amount) FILTER (WHERE m.amount_usd>0 AND m.target_amount>0),0) AS vwap_usd,SUM(m.amount_usd) FILTER (WHERE m.amount_usd>0) AS leg_volume_usdFROM bins b LEFT JOIN market_legs m