Query editor
/* ===========================================================DEPRECATEDDO NOT USEUSE allo_outflows_breakdown_combined instead-----------------------------------------------------------ALLO OUTFLOW — DAILY BY CHAIN, CONTRACT, MECHANISM, AND TOKENMATERIALIZED AS dune.allo_capital.result_daily_allo_outflows_breakdown-----------------------------------------------------------i) source contracts from Google-sheetii) trace contracts created by sheet contractsiii) label contracts created using onchain traces (for Allo Proxy: EIP-1167 slice -> strategy -> mechanism) and curated labelsiv) track daily native + ERC-20 outflows on all our contractsv) attach USD prices (with custom token mapping where needed)-----------------------------------------------------------• Runs only on chains listed in `target_blockchains`.• To expand, just INSERT more rows (or DELETE the CTE).=========================================================== */WITH/* -----------------------------------------------------------------0) Chains to analyse----------------------------------------------------------------- */target_blockchains AS (SELECT * FROM (VALUES('zksync'),('arbitrum'),('optimism'),('ethereum'),('sei'),('polygon'),('celo'),('avalanche_c'),('scroll'),('base')) AS t(blockchain)),/* -----------------------------------------------------------------1) Token → price key custom mappings----------------------------------------------------------------- */token_price_mapping AS (SELECT * FROM (VALUES-- USDGLO bridged('arbitrum', 0x4f604735C1Cf31399c6e711d5962B2B3E0225ad3, 'celo', 0x4f604735C1Cf31399c6e711d5962B2B3E0225ad3, 'USDGLO', 18),('ethereum', 0x4f604735C1Cf31399c6e711d5962B2B3E0225ad3, 'celo', 0x4f604735C1Cf31399c6e711d5962B2B3E0225ad3, 'USDGLO', 18),('polygon', 0x4f604735C1Cf31399c6e711d5962B2B3E0225ad3, 'celo', 0x4f604735C1Cf31399c6e711d5962B2B3E0225ad3, 'USDGLO', 18),('optimism', 0x4F604735c1cF31399C6E711D5962b2B3E0225AD3, 'celo', 0x4f604735C1Cf31399c6e711d5962B2B3E0225ad3, 'USDGLO', 18),-- Gitcoin, GSBT, Hedgey on Arbitrum('arbitrum', 0x7f9a7db853ca816b9a138aee3380ef34c437dee0, 'ethereum', 0xDe30da39c46104798bB5aA3fe8B9e0e1F348163F, 'GTC', 18),('arbitrum', 0xC3f93F3e304b1199625dF261A9F87367ab9E9e48, 'arbitrum', 0xC3f93F3e304b1199625dF261A9F87367ab9E9e48, 'GSBT', 18),('arbitrum', 0x5270bfc224357cbf7eb76c8fbbb5d49fd4b86934, 'arbitrum', 0x5270bfc224357cbf7eb76c8fbbb5d49fd4b86934, 'HEDGEY', 18),-- Native ETH variants('ethereum', 0x0000000000000000000000000000000000000000, 'ethereum', 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2, 'ETH', 18),('arbitrum', 0x0000000000000000000000000000000000000000, 'arbitrum', 0x82aF49447D8a07e3bd95BD0d56f35241523fBab1, 'ETH', 18),('optimism', 0x0000000000000000000000000000000000000000, 'optimism', 0x4200000000000000000000000000000000000006, 'ETH', 18),('base', 0x0000000000000000000000000000000000000000, 'base', 0x4200000000000000000000000000000000000006, 'ETH', 18),('scroll', 0x0000000000000000000000000000000000000000, 'scroll', 0x5300000000000000000000000000000000000004, 'ETH', 18),-- Polygon POL('polygon', 0x0000000000000000000000000000000000000000, 'polygon', 0x0000000000000000000000000000000000001010, 'POL', 18),-- SEI native('sei', 0x0000000000000000000000000000000000000000, 'sei', 0xe30fedd158a2e3b13e9badaeabafc5516e95e8c7, 'SEI', 18),-- AVAX, CELO('avalanche_c', 0x0000000000000000000000000000000000000000, 'avalanche_c', 0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7, 'AVAX', 18),