Query editor
-- CADC economic volume, deduplicated. Base table for the dashboard.---- Counting unit: one economic transfer of CADC, counted exactly once.-- dex one row per pool-level swap. A router pass-through touches one pool-- (counted once); an arb bot touches two (counted twice, correctly).-- desk a leg with a Loon/Paytrie/Coinbase custodial wallet on exactly one side.-- p2p everything else that is not swap plumbing.-- primary mint/burn whose external side is not one of our wallets, i.e. a-- direct-to-customer issuance that no desk leg would otherwise capture.---- `venue` and `router` are two views of the same rows and both sum to the same-- total. Never add a router slice to a venue slice; 1inch volume IS pool volume.---- Solana and Linea deliberately excluded (0.4% of supply, worst cost per insight).-- Set start_date to a recent month for a cheap validation run.WITHtok (blockchain, contract_address, version) AS (VALUES('ethereum', 0xcadc0acd4b445166f12d2c07eac6e2544fbe2eef, 'v1'),('polygon', 0x9de41aff9f55219d5bf4359f167d1d0c772a396d, 'v1'),('arbitrum', 0x2b28e826b55e399f4d4699b85f68666ac51e6f70, 'v1'),('base', 0x043eb4b75d0805c43d7c834902e335621983cf03, 'v1'),('ethereum', 0x49a6f6aeab68ea001beaa4815186eb22fbdccf2a, 'v2'),('polygon', 0x74d9423a2886618522f7c992edf647ea707a38eb, 'v2'),('arbitrum', 0x2990ab255869807a7656f4e1f109682ae52e0db1, 'v2'),('base', 0x5e63e9c06c3f2c779ef29a8071f94f5a724eb5e4, 'v2')),-- Loon-controlled addresses. `role` tags the counterparty leg when exactly one-- side is ours; a leg with our wallets on BOTH sides is plumbing and is dropped.own (addr, role) AS (VALUES(0x0e57b74791f3bfb1a90dcb0e1fc191d7403b6476, 'loon-desk'), -- cadc-receiver(0xce29a89d935d7d1e260fd14b872cb7bae3ec136d, 'loon-desk'), -- cadc-sender(0x5b5ecfc8122ba166b21d6ea26268ef97e09b2e9f, 'paytrie'), -- deprecated(0xe37a107504c3140eaa9663954fbcd779607bc08e, 'paytrie'),(0x303838d5dec756eef2c92b6e428145590cd927f3, 'coinbase'),(0x26f4615646887a14bdc9b1dacdeb228974f11694, 'coinbase'),(0x1fd488c4b538aa722498f80d44d0f316b6a4e911, 'coinbase'),(0xcced273f98899fc1455bbecffc0a5c3ed0fe8158, 'internal'), -- treasury(0xc1f14128e65e4d66936a51cf0fabc10af3bfd765, 'internal'), -- lp-hot-wallet(0xe1c9a18dc09393ad9e758c403f548c5fe1583b6f, 'internal'),(0x277390cf5430c519ed711707a424c42e5377716a, 'internal'),(0xe3f572396aa7311b0bc20f2e4676e43abd95dd3c, 'internal'),(0x3f09aa24004082a1fa799517a6cb32233cb387fe, 'internal'),(0x1b523636e98a60c309c836aeb6af8f697b2a3078, 'internal'),(0xb705c284a2f77346b5a3d5973a5914a2066d6dbc, 'internal'),(0x7987a619badac268145a0b6ba6d8a325519dfa48, 'internal'),(0x99b582c209b976ae05f8f1cb899285f5ab15cae2, 'internal'),(0x0a142ecf77eca988fc057e98223738832f29e835, 'internal'),(0x02d65dedf568258182513e09057a21000417cce6, 'internal')),-- v1->v2 migrators and LayerZero OFT proxies. Same CADC changing form, not volume.-- Matched on tx_to as well as the transfer sides, so bridge mints do not read as-- primary issuance.excl (addr) AS (VALUES