Query editor
/* XDAO — Treasury Inflow, headline figuresCumulative inflow to client-DAO treasuries across 6 EVM chains since Nov 2021.USD valued at time of transfer. Only tokens with a price feed in Dune (spam-filtered).Transfers between XDAO treasuries are excluded to avoid double counting. */WITH daos AS (SELECT DISTINCT chain, daoFROM xdao_v2_multichain.factory_evt_daocreatedWHERE chain IN ('ethereum','arbitrum','bnb','polygon')),cf AS (SELECT DISTINCT chain, evt_tx_hash AS hFROM xdao_v2_multichain.crowdfundingmodule_evt_buyWHERE chain IN ('ethereum','arbitrum','bnb','polygon')),lp AS (SELECT DISTINCT chain, evt_tx_hash AS hFROM xdao_v2_multichain.launchpadmodule_evt_buyWHERE chain IN ('ethereum','arbitrum','bnb','polygon'))SELECTround(sum(t.amount_usd)) AS "Total inflow, USD",round(sum(CASE WHEN cf.h IS NOT NULL OR lp.h IS NOT NULLTHEN t.amount_usd END)) AS "Raised via XDAO modules, USD",count(DISTINCT (t.blockchain, t.to)) AS "DAOs funded",(SELECT count(*) FROM daos) /* пары сеть+адрес: адреса повторяются между сетями */ AS "DAOs created",4 AS "Chains covered",format_datetime(now(), 'd MMMM yyyy') AS "Data as of"FROM tokens.transfers tJOIN daos d ON d.chain = t.blockchain AND d.dao = t.toLEFT JOIN daos s ON s.chain = t.blockchain AND s.dao = t."from"LEFT JOIN cf ON cf.chain = t.blockchain AND cf.h = t.tx_hashLEFT JOIN lp ON lp.chain = t.blockchain AND lp.h = t.tx_hashWHERE t.blockchain IN ('ethereum','arbitrum','bnb','polygon')AND t.block_date >= DATE '2021-11-01'AND t.amount_usd IS NOT NULLAND s.dao IS NULL