An open data workbench for the programmable economy.
Ask in plain English. Get runnable SQL over 8 DeFi protocols + Ethereum chain state, surfaced as 12 live schemas in one workbench.
The main selling point. Ask the question. Don't write the SQL.
DeFi data is fragmented. Each protocol publishes its own subgraph, its own decoder, its own dashboard. To answer a single research question — "What block had the most swap activity across the major DEXs?" — you stitch three subgraphs, normalize three schemas, and write three CTEs.
The Agent Query pane collapses that into a sentence:
> what is the top most block with most swaps
The agent reads the full live schema of every protocol, picks the right tables, writes a UNION across them, and hands you a runnable, syntax-highlighted, editable SQL block. Below is an illustrative shape — table names follow the live Postgres warehouse at runtime; the column names mirror the offline fallback in src/lib/schema.ts:
SELECT
block_number,
COUNT(*) AS swap_count
FROM (
SELECT block_number FROM uniswap_v3.swaps
UNION ALL
SELECT block_number FROM curve.exchanges
UNION ALL
SELECT block_number FROM balancer_v2.swaps
) AS all_swaps
GROUP BY block_number
ORDER BY swap_count DESC
LIMIT 1;Click Run ▶ — get answers, not boilerplate.
This is what we mean by a programmable economy: the on-chain ledger is already a database. We're just giving researchers, students, and traders a query layer that speaks their language.
▶ Watch the agent build this query in real time (MP4 demo, ~40 s)
12 schemas — 8 DeFi protocols + 4 infrastructure / native datasets, served from a Postgres warehouse on the Stevens campus. The canonical schema list lives in src/pages/Workbench/schemaGuide.ts; the offline fallback shape (table + column names) is in src/lib/schema.ts.
| Category | Schemas |
|---|---|
| 💱 Exchanges | Uniswap V3 · Curve · Balancer V2 |
| 🏦 Lending | Aave V2 · Aave V3 · Compound V3 · Morpho · Spark |
| ⚙️ Infrastructure | Ethereum (blocks · transactions · logs · contracts) · Bridges · Tokens |
| 🏛️ DSC native | curated cross-protocol views (also classified under Infrastructure) |
Most tables are event-level — swaps, deposits, borrows, liquidations, bridge transfers — joined back to the canonical Ethereum block stream. State tables (pools, positions, token metadata, blocks, contracts) round out the schema for context. Either way: provable, replayable, time-travel queries down to the transaction.
Browse all 12 schemas by category. Column names + types come from /api/schema at runtime (or src/lib/schema.ts as the offline fallback shape). Each schema and table also gets a hand-curated one-line description from schemaGuide.ts so you can tell at a glance what's in there.
Visual SOURCE → SELECT → WHERE → GROUP BY → ORDER BY composer for users who'd rather click than type. Generates the same SQL the Agent does.
Plain-English in, runnable SQL out. The agent has the full schema in context so it never hallucinates a column. Each query is a fresh prompt — re-ask with more detail and the agent re-plans against the same schema (e.g. "now group by hour", "only WETH pools").
Most DeFi dashboards are point solutions — Dune for trader analytics, DefiLlama for TVL, Etherscan for tx-level lookups. None give you a single SQL endpoint with decoded protocol logic across protocols that you can drive from a chat interface.
DSC is the layer we wanted to exist for our own research:
- 📈 Microstructure research — does a pool's gas-priority pattern change before a CEX dump?
- 🔬 Mechanism design — how does a new fee curve affect realized LVR vs. backtest?
- 🧠 Alpha discovery — find on-chain events that systematically precede price moves.
The same workbench that lets a finance student ask "show me the biggest WETH/USDC swap of the week" also lets a researcher ask "join Aave V3 liquidations against Uniswap V3 swap volume in the same block" — and get the SQL back in seconds.
┌──────────────────────────────────────┐
│ Web (Vite 8 + React 19 + TS) │
│ Workbench · Mempool · Landing │
└────────────┬─────────────────────────┘
│ /api/nl /api/query
┌────────────┴─────────────────────────┐
│ Node API ( :3001 ) │
│ NL → SQL (MiniMax M2.7) │
│ schema introspection cache │
└────────────┬─────────────────────────┘
│ Postgres protocol
┌────────────┴─────────────────────────┐
│ Postgres @ fscresearchvm89 │
│ 12 schemas of decoded event data │
└────────────┬─────────────────────────┘
│ reth+lighthouse
┌────────────┴─────────────────────────┐
│ Ethereum archive node (RETH) │
└──────────────────────────────────────┘
| Layer | Tech |
|---|---|
| Frontend | React 19 · TypeScript · Vite 8 · React Router 7 · custom CSS (Stevens design system) |
| API | Node service (/api/nl, /api/query, /api/schema, /api/node) |
| Warehouse | Postgres, 12 schemas of decoded event data |
| Source data | RETH archive node + Lighthouse beacon, decoded via per-protocol pipelines |
git clone https://github.com/WillInvest/DeFi-Statistic-Center.git
cd DeFi-Statistic-Center
pnpm install
pnpm dev
# → http://localhost:5173The dev server proxies /api/* to a backend at localhost:3001. To stand up the warehouse + API yourself, see design/HANDOFF-README.md.
pnpm build # type-check + production bundle
pnpm preview # serve the production build locally
pnpm lint # ESLint pass- Workbench — Schema Tree, Query Builder, Agent Query, Results
- Mempool live tx feed (Stevens campus RETH node)
- 12 schemas indexed
- Saved queries + share links
- Notebook export (Polars / Pandas)
- Cross-chain (L2s, Solana)
- Public hosted instance
This project is part of an ongoing program at the Stevens Institute of Technology Financial Systems Lab on on-chain market microstructure and programmable-economy research.
PRs and issues welcome.
Stevens Maroon #A32638 ·
Charcoal #363D45 ·
Gold #EBC73B
© 2026 Stevens Institute of Technology Financial Systems Lab
