Query editor
-- =====================================================================-- Top-20 USDC Holder Identification (Ethereum mainnet) — DuneSQL-- Goal: one CATEGORY + one NAME per address, plus minimal evidence.---- Identification priority (first hit wins):-- 1. manual_labels — your own confirmed labels (Etherscan nametags are-- proprietary; Dune has no copy of them. Add rows here as you-- confirm addresses — this is how everyone solves this in practice)-- 2. cex_evms.addresses — CEX wallets-- 3. labels.owner_addresses — Dune curated labels-- 4. ethereum.contracts — decoded contracts (protocol: name)-- 5. dex.trades — DEX pool detection-- 6. ENS / Gnosis Safe-- Counterparties, deployer and first funder are labeled through the SAME-- sources, so even an unlabeled address is usually identifiable from who-- it transacts with (e.g. a pocket wallet whose only peer is a PSM).-- =====================================================================WITH targets (address) AS (VALUES(0x37305b1cd40574e4c5ce33f8e8306be057fd7341),(0xe1940f578743367f38d3f25c2d2d32d6636929b6),(0xffa69c0080582098af595156240214b742735a5e),(0xad354cfbaa4a8572dd6df021514a3931a8329ef5),(0x40ec5b33f54e0e8a33a975908c5ba1c14e5bbbdf),(0xee7ae85f2fe2239e27d9c1e23fffe168d63b4055),(0x01b8697695eab322a339c4bf75740db75dc9375e),(0x38aaef3782910bdd9ea3566c839788af6ff9b200),(0x08f619716db7c6245401b543e59acac1d25cb483),(0x36db199f0a1cd131ad0b5cf4fe94286faab9fda5),(0x3d09d2354530466d32ed37c6ad19ea58504a0c37),(0x3b4d794a66304f130a4db8f2551b0070dfcf5ca7),(0xa5e4939f7cdd01a22d34dc9a29e45e9925b6cd62),(0x54999886b6153975d839220df767475d59d7c907),(0xf53e4fd94365f7f8fc14087f984ff19b819fd99a),(0xe0356742a0441e64e5247dd4f4d56f9e4549e764),(0x1d7ceccee9d055ce790e463204ec8148d4952908),(0x6abc301915d33ce024a27d357d0b7679c9ae74c0),(0xcd180af7cd1fd3a2e88e524c29a9ece0e2bf53a6),(0x0efba7fadab2b7c95a601be6fe9dcb93f4a7b5d1)),-- >>> ADD CONFIRMED LABELS HERE (address, name, category) <<<-- Applied to targets AND to counterparties/deployers/funders.manual_labels (address, name, category) AS (VALUES(0x37305b1cd40574e4c5ce33f8e8306be057fd7341, 'Sky: Lite PSM USDC A Pocket', 'Stablecoin PSM reserve (Sky/Maker)'),(0xa188eec8f81263234da3622a406892f3d630f98c, 'Sky: MCD Lite PSM USDC A', 'Stablecoin PSM (Sky/Maker)'),(0x40ec5b33f54e0e8a33a975908c5ba1c14e5bbbdf, 'Polygon (Matic): ERC20 Bridge','Bridge escrow')-- , (0x..., 'Name', 'Category')),-- All USDC transfers touching the targets (balance, flows, counterparties)usdc_xfers AS (SELECT "from", "to", valueFROM erc20_ethereum.evt_TransferWHERE contract_address = 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48AND ("from" IN (SELECT address FROM targets)OR "to" IN (SELECT address FROM targets))),