Query editor
-- Total Prefunding Repayments — on-chain scan of every repayment-eligible sender into each lending Safe.-- A borrower's repayments can come from any wallet in its ecosystem (payout +-- relay + second), not only the direct payout wallet, so this uses REPAY_PAIRS-- rather than reversed disb pairs. Including the relay wallets lifts the-- tile from ~$64M (payout-only) to ~$122M (full ecosystem), matching the old-- PDF-tape repay number within drift.---- Add a repayment-sender wallet: edit REPAY_PAIRS and re-run.-- Reads the materialised classifier (dune.defa_im.flow_classified) instead of re-scanning-- erc20_ethereum.evt_transfer. Verified identical on 2026-11-19.SELECT COALESCE(SUM(usd), 0) AS totalFROM dune.defa_im.flow_classifiedWHERE flow_type = 'repay'