Query editor
-- Actual STONKBROKER purchases by Clock In 3.0. Bought tokens are rewards, NOT burned.-- Includes current partial UTC day. USD = ETH spent times daily ETH price.WITH calls AS (SELECT cast(block_time AS date) day,block_time,tx_hash,"from" engine,sum(cast(value AS double)/1e18) eth_spent,count(*) swap_callsFROM robinhood.tracesWHERE block_time>=timestamp '2026-09-19'AND "from" IN (0xf4129019d8838f2555bdc8ecb3024a02145dbc58,0xb6573dd536f6268a9d028adec00f08918830f55d,0xf90a384936af8e6fd1c6c0f9ca804da5395bc059)AND success AND varbinary_substring(input,1,4)=varbinary_substring(keccak(to_utf8('swapExactETHForTokens(address,uint256,address,uint256)')),1,4)AND varbinary_substring(input,17,20)=0xe934e36a439c94017b64a3fece66af12099abf50GROUP BY 1,2,3,4), received AS (SELECT tx_hash,varbinary_substring(topic2,13,20) engine,sum(cast(varbinary_to_uint256(data) AS double)/1e18) tokensFROM robinhood.logsWHERE block_time>=timestamp '2026-09-19'AND contract_address=0xe934e36a439c94017b64a3fece66af12099abf50AND topic0=0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efAND topic2 IN (0x000000000000000000000000f4129019d8838f2555bdc8ecb3024a02145dbc58,0x000000000000000000000000b6573dd536f6268a9d028adec00f08918830f55d,0x000000000000000000000000f90a384936af8e6fd1c6c0f9ca804da5395bc059)AND tx_hash IN (SELECT tx_hash FROM calls)GROUP BY 1,2), prices AS (SELECT cast(timestamp AS date) day,max(price) price FROM prices.dayWHERE blockchain='ethereum' AND contract_address=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2AND timestamp>=timestamp '2026-09-19' GROUP BY 1), daily AS (SELECT c.day,CASE WHEN c.engine=0xf4129019d8838f2555bdc8ecb3024a02145dbc58 THEN 'Broker Clock In 3.0' ELSE 'Intern Clock In 3.0' END source,sum(c.eth_spent) eth_spent,sum(r.tokens) stonk_bought,sum(c.eth_spent*p.price) purchase_cost_usd,sum(c.swap_calls) purchases,count_if(r.tokens IS NULL) unmatched_purchase_transactions,count_if(p.price IS NULL) unpriced_purchase_transactions,max(c.block_time) latest_purchaseFROM calls c LEFT JOIN received r ON c.tx_hash=r.tx_hash AND c.engine=r.engineLEFT JOIN prices p ON c.day=p.day GROUP BY 1,2)SELECT *,sum(stonk_bought) OVER (PARTITION BY source ORDER BY day) cumulative_stonk_bought,sum(purchase_cost_usd) OVER (PARTITION BY source ORDER BY day) cumulative_purchase_cost_usdFROM daily ORDER BY day,source