Query editor
-- Simple stablecoin activity: official tokenlist × TIP-20 transfer events.---- Token universe: fetched live from https://tokenlist.tempo.xyz/list/4217.---- Transfers: READ FROM `tip20_tempo.evt_transfer` ONLY.-- On TIP-20, `transferWithMemo()` emits BOTH a standard `Transfer` AND a-- `TransferWithMemo` event (the standard Transfer is required for ERC-20-- compatibility). Verified empirically: 1000/1000 sampled TransferWithMemo-- rows have a matching Transfer row with identical (tx_hash, from, to, amount).-- Unioning the two tables double-counts every memo-tagged movement.-- evt_transfer alone covers the full token-movement feed.-- (The MPP query, 6911626, still reads evt_transferwithmemo directly because-- it specifically needs the memo bytes to parse MPP attribution.)---- Volume: two flavors exposed.-- `volume` = SUM of all Transfer event amounts (includes-- mints from 0x0 and burns to 0x0). Common framing-- in stablecoin dashboards — treats issuance and-- redemption as volume.-- `volume_user_to_user` = volume excluding mints/burns. Measures actual-- economic circulation between addresses.---- Supply: cumulative mint − burn from all transfer events, no date filter.-- Genesis-era mints are emitted as standard Transfer(0x0 → …) events and-- live in the spell from before mainnet launch — including them is what-- makes pathUSD's computed supply match on-chain totalSupply(). Confirmed-- by Liam @ Tempo. tip20_tempo is a mainnet-only spell (chain 4217), so no-- testnet contamination concerns.---- Mints via Transfer(0x0 → …): verified that every `evt_mint` event has a-- matching `evt_transfer` row with from = 0x0 (100/100 sampled), so-- counting mints from zero-address transfers is complete.---- Time series: we only chart block_date >= 2026-03-18 (mainnet launch), but-- the cumulative supply window is seeded from the full history so opening-- supply on Mar 18 reflects all prior genesis activity.---- Continuous chart: (date × token) grid so zero-activity days carry forward.---- fee_manager_inflow (previously "protocol_fees"): gross inflow into the-- Fee Manager contract (0xfeec…). NOT protocol revenue — AMM swap is 0.9970-- and validators distribute later.WITH tokenlist_raw AS (SELECT http_get('https://tokenlist.tempo.xyz/list/4217') AS body),token_list AS (SELECTfrom_hex(substr(CAST(json_extract_scalar(t.token, '$.address') AS varchar), 3)) AS contract_address,CAST(json_extract_scalar(t.token, '$.name') AS varchar) AS token_name,CAST(json_extract_scalar(t.token, '$.symbol') AS varchar) AS token_symbolFROM tokenlist_raw,UNNEST(CAST(json_extract(CAST(json_parse(body) AS json), '$.tokens') AS array(json))) AS t(token)),-- Full-history transfer feed from evt_transfer ONLY (see header comment).all_tip20_transfers AS (SELECT evt_block_date AS block_date, contract_address, "from", "to", amount AS value