Query editor
with cluster(addr, role) as (values(0x770b10b273fc44fe9197d6bf20f145c2e98463ee,'hop0 primary receiver'),(0x7c96279ec1e888aa56b9b836e0db26ca48573e1c,'hop0 swap staging'),(0xd2c2f029eff5cacc686f24377cfddcfc82d9f899,'hop0 ETH parking'),(0xe410a2e5710ee787bcaa63f52a3943ff71f0d946,'hop0 arbitrum receiver'),(0x94a43df7687a8494948be937400e9d5d33135da0,'hop0 optimism receiver'),(0xa6dd3f218b65e32ccc37be30f74884133c655545,'hop0 ETH consolidator'),(0x600cfedc6bd65fa79b604dc44964f419e45784b2,'hop1 ETH parking'),(0x9fa39d62095302431d7d4167a7e80f8ec6ea4fa0,'hop1 ETH parking'),(0xa6bfd7fcaf4711da1f61d5e91d03a2c7c72db272,'hop1 ETH parking'),(0xfd5ebe912e2061992437767e24e5bcb52a3f9e54,'hop1 ETH parking'),(0xed5a394a7558929112848b7e97b569de6bbe1a51,'hop1 ETH parking'),(0xdc2901f741b4003e32b8b752e97b8c4c1891dc63,'hop1 ETH parking'),(0x52f08feb1b0da609a5442514e2bb43c99d25d284,'hop1 ETH parking'),(0x2bca667d37afe8d065ca46e3261e9442e77cbeae,'hop1 arbitrum swapper'),(0xe07bd590e1198666230932bad5db3dbbe21e7d57,'hop1 bnb swapper'),(0xd2c0a958343a3745f0b8bc591947da6a5ab7b664,'hop1 avax'),(0x23434d8831a97117d60070da89451ea24af770d2,'hop1 avax usdc'),(0x150889fe4fa7a7699588f75c4189fa9e721acfd3,'hop1 bnb'),(0x469ac1406de92f82c0563477240a3627057425dc,'hop1 base'),(0x202e8cfcfeae53b5050935a5e926ebb9679d28cd,'hop1 arbitrum'),(0xa0ec0de60b51db8d850e79a112ab6222f7d2772a,'hop1 optimism'),(0x274ee3aecc2b2d41a4d606155d7e0ebc3da68681,'hop1 usdc cctp'),(0x5085b3d52b5587c18ef456fcbcde9a11d48340f8,'hop2 avax'),(0x8ed4d27f1fa2842db4fe2d6091d22830fe2d731e,'hop2 bnb'),(0xcabf9748d125bf87ca45152b6eaee68ee6285652,'hop2 arbitrum'),(0x2b03476bc4070e3019b3d5f4ec46edc27284ecd8,'hop2 optimism'),(0x62a8cc80698d5f87fadd57ba9b247d36377e5b32,'hop2 bnb'),(0x03df4cb9aa0e73a847b2989c1cd00a2a654b32f7,'hop2 bnb'),(0xe12e0f117d23a5ccc57f8935cd8c4e80cd91ff01,'hop2 arbitrum'),(0x9a47f3289794e9bbc6a3c571f6d96ad4e7baed16,'hop2 ethereum')),t as (select blockchain, "from" f, "to" r, contract_address, symbol, amount, amount_usd, block_timefrom tokens.transferswhere block_month >= date '2026-09-01' and block_time >= timestamp '2026-09-24 18:00:00'and blockchain in ('ethereum','arbitrum','avalanche_c','base','bnb','optimism','polygon','unichain','linea')and ("from" in (select addr from cluster) or "to" in (select addr from cluster))),cb as (select distinct blockchain, address from labels.addresseswhere lower(name) like 'coinbase%' and category in ('cex','institution')),flows as (select blockchain, r as addr, contract_address, symbol, amount as delta, 0e0 as cb_usd, cast(null as timestamp(3) with time zone) as out_time from t where r in (select addr from cluster)union allselect t.blockchain, t.f, t.contract_address, t.symbol, -t.amount, case when cb.address is not null then coalesce(t.amount_usd, 0) else 0 end, t.block_timefrom t left join cb on cb.blockchain = t.blockchain and cb.address = t.rwhere t.f in (select addr from cluster)),native_px as (select 'ETH' sym, price from prices.usd_latest where blockchain = 'ethereum' and contract_address = 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2union all select 'BNB', price from prices.usd_latest where blockchain = 'bnb' and contract_address = 0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095cunion all select 'AVAX', price from prices.usd_latest where blockchain = 'avalanche_c' and contract_address = 0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7union all select 'POL', price from prices.usd_latest where blockchain = 'polygon' and contract_address = 0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270),bal as (select blockchain, addr, contract_address, symbol, sum(delta) net, sum(cb_usd) cb_usd, max(out_time) last_outboundfrom flows group by 1,2,3,4),