Query editor
-- Method v1: generated protocol revenue for Robinhood trusted-token pairs.-- V3 uses the active feeProtocol denominator; V4 decodes the active directional-- protocol fee from the packed uint24. Token/USD figures are swap-level estimates-- and can differ from contract accounting by rounding dust across crossed ticks.WITHparams AS (SELECT CAST({{lookback_days}} AS integer) AS lookback_days,now() - CAST({{lookback_days}} AS integer) * INTERVAL '1' DAY AS start_time,CAST(date_trunc('month',now() - CAST({{lookback_days}} AS integer) * INTERVAL '1' DAY) AS date) AS start_month,CAST(date(now() - CAST({{lookback_days}} AS integer) * INTERVAL '1' DAY) AS date) AS start_date),stock_token_versions AS (SELECT output_0 AS token_address,symbol_ AS canonical_symbol,uid_,row_number() OVER (PARTITION BY output_0ORDER BY call_block_number DESC, call_tx_index DESC) AS rnFROM robinhood_robinhood.stockfactory_call_deployWHERE call_block_date >= DATE '2026-05-22'AND call_success),trusted_tokens AS (SELECT token_address,token_address AS canonical_address,canonical_symbol,'robinhood_stock' AS trust_classFROM stock_token_versionsWHERE rn = 1UNION ALLSELECT 0x0000000000000000000000000000000000000000,0x0000000000000000000000000000000000000000,'ETH','eth'UNION ALLSELECT 0x0bd7d308f8e1639fab988df18a8011f41eacad73,0x0000000000000000000000000000000000000000,'ETH','eth'UNION ALLSELECT 0x5fc5360d0400a0fd4f2af552add042d716f1d168,0x5fc5360d0400a0fd4f2af552add042d716f1d168,'USDG',