Query editor
-- Service fees reaching the verified 90/10 fee router. Underlying LP owner fees and principal are excluded.WITH fee_txs AS (SELECT DISTINCT tx_hash,block_date FROM robinhood.logsWHERE block_date>=DATE '2026-07-01' AND block_date<current_dateAND contract_address IN (0xfc96cf67ecc55be4adabc3aecbe6ad6349f11223,0x5a28ce098750f73bc9ec142d4bce464e1a0bbda6,0xc1afa59e2abc1c868c51a1f799a7578eacfea076,0x21797736c25851a6102d196afba78f978f589017,0x2b4ad79da7bd3bf340bbd2ad2039b149214e9aa9)), fees AS (SELECT t.* FROM tokens.transfers t JOIN fee_txs x ON t.tx_hash=x.tx_hash AND t.block_date=x.block_dateWHERE t.blockchain='robinhood' AND t.block_date>=DATE '2026-07-01' AND t.block_date<current_dateAND t."to"=0x55642a3f10f1af5145d3d59021b1d6b03bb8692c AND t.amount_raw>0AND NOT(t.contract_address=0x0000000000000000000000000000000000000000 AND t."from"=0x0bd7d308f8e1639fab988df18a8011f41eacad73)), prices AS (SELECT CAST(timestamp AS DATE) day,contract_address,max(price) price FROM prices.dayWHERE blockchain='robinhood' AND timestamp>=TIMESTAMP '2026-07-01' AND timestamp<current_date GROUP BY 1,2)SELECT CAST(block_time AS DATE) day, 'Safety Deposit Box' product,t.contract_address token,max(symbol) symbol,sum(amount) fees_token,sum(amount*coalesce(p.price,t.price_usd)) fees_usd,sum(amount*coalesce(p.price,t.price_usd))*0.1 treasury_revenue_usd,sum(amount*coalesce(p.price,t.price_usd))*0.9 rewards_funding_usd,count(*) fee_payments,count_if(coalesce(p.price,t.price_usd) IS NULL) unpriced_eventsFROM fees t LEFT JOIN prices p ON t.block_date=p.day AND t.contract_address=p.contract_address GROUP BY 1,2,3 ORDER BY day