Query editor
-- ============================================================================-- USDS/DAI VAT — current debt & collateral per vault / agent-- Source table: maker_ethereum.vat_call_frob (the Vat's CDP-manipulation calls)-- We reconstruct each vault's live state by summing every change it ever made.-- ============================================================================-- ============================================================================-- HOW TO READ EACH COLUMN-- ------------------------------------------------------------------------------ ilk_name The "bucket". Examples:-- LITE-PSM-USDC-A / PSM-USDC-A = USDC peg modules (stablecoin in, USDS out, 1:1)-- ALLOCATOR-* (SPARK/BLOOM/OBEX...) = the Agents (semi-independent yield desks)-- ETH-A/-C, WSTETH-B, GUNIV3... = crypto / LP-token vaults---- urn_owner Who owns the vault.-- Agents -> the AllocatorVault contract (e.g. Spark = 0x691a...16BA)-- PSM -> the PSM contract itself-- Crypto -> a user's vault-handler address (via the CDP manager)---- net_debt_usds How much USDS/DAI this vault has minted and still owes. In USD-equivalent (~$1 each).-- This is the meaningful "size" number and works for EVERY row.---- net_collateral Collateral locked in the Vat, expressed in the COLLATERAL TOKEN'S OWN UNITS, not dollars.-- e.g. ETH-A "147302" = ~147,302 ETH ; a USDC PSM number is in USDC.-- => You CANNOT compare net_collateral across different ilks directly (different tokens),-- and you cannot compare it to net_debt unless you multiply by the token's price.---- n Just how many frob transactions hit this vault. High n = busy/retail; low n = big chunks.---- ------------------------------------------------------------------------------ READING THE PATTERNS (matches the live results)-- ------------------------------------------------------------------------------ net_collateral = 0 (LITE-PSM-USDC-A, ALLOCATOR-SPARK/BLOOM/OBEX-A):-- These lock NO collateral in the Vat. Their real backing sits OUTSIDE the Vat-- (USDC in the PSM "pocket"; the agents' T-bills / loans). Use net_debt_usds for them.---- net_collateral ≈ net_debt (PSM-USDC-A, the older PSM):-- A 1:1 stablecoin PSM that DID lock real USDC into the Vat. Collateral (in USDC) ≈ debt. Makes sense.---- net_collateral in crypto units (ETH-A, ETH-C, WSTETH-B, GUNIV3...):-- Over-collateralized vaults. To get the collateral RATIO, multiply net_collateral by the token's-- USD price and divide by net_debt_usds (e.g. 147,302 ETH × $ETH ÷ debt).---- ------------------------------------------------------------------------------ CAVEATS-- ------------------------------------------------------------------------------ * Collateral uses frob ONLY on purpose. The PSM/agents' "unlimited ink" was seeded via `grab`-- (auth-only, no safety check); including grab would drag that giant placeholder back in.-- Trade-off: crypto collateral is very slightly overstated where liquidations happened (grab-- confiscations not subtracted). Never affects the PSM/agents (not liquidated).-- * net_debt is NORMALISED debt. Exact USD = debt × the ilk's `rate`. For PSM/agents rate ≈ 1 (no fee),-- so it's accurate; for old fee-bearing crypto ilks it slightly understates the real debt.-- * For an EXACT live value, read urns(ilk, urn_owner) on the Vat's Etherscan "Read Contract" tab.-- Vat = 0x35D1b3F3D7966A1DFe207aa4514C12a259A0492B-- ============================================================================with moves as (-- frob: counts for BOTH debt and collateralselect i as ilk, u as urn, dart, dink as dink_realfrom maker_ethereum.vat_call_frob where call_success = true