ChainScope
Any Chain, One 3D Fund-Flow Graph
A chain-agnostic blockchain explorer built for the curious crypto user rather than the forensic analyst. Paste any address or ENS name — no login — and ChainScope fetches its balance, transfers, and entity labels, folds them into a fund-flow graph, and renders that graph in an interactive 3D canvas with bloom-glow nodes color-coded by entity type. Six transparent heuristics assess risk, and Claude streams a plain-English explanation of what the wallet has been doing. EVM, Solana, and Bitcoin all work identically because only the bottom layer knows which chain it is talking to.
Tech Stack
Results & Metrics
Challenges Faced
Three Incompatible Chain Models
EVM history arrives as multi-leg transactions, Helius pre-computes direction per transfer, and Bitcoin's UTXO model has no notion of 'from' and 'to' at all. Every provider returns a different shape for the same question.
Honest Dollar Figures
Not every transfer is priceable, and spam tokens report absurd prices. Blending token units into a USD total or trusting a $1T spam valuation would quietly turn the whole UI into fiction.
A 3D Library That Mutates Your Data
react-force-graph-3d rewrites edge source/target from id strings to node object references after the first simulation tick — and that same object lives in the TanStack Query cache, so every later consumer reads corrupted edges.
How I Solved Them
The Chain Is One Directory
A two-method ChainAdapter contract (getAddress, getTransfers) is the only chain-aware layer. Graph building, risk, summary, and UI consume one normalized model, so Solana and Bitcoin were each added as a single self-contained adapter with zero changes above.
USD-Only Aggregates
Edges carry two independent weights: a token-unit amount that drives node sizing, and a USD aggregate that sums only priced transfers and stays undefined if none were. Counterparties fall back to transaction counts, and implausible magnitudes render as an em dash.
Defensive Edge Reads
A single endpointId() reader normalizes edge endpoints wherever they are re-read, plus finite guards at ingestion so a NaN amount cannot poison sizing and sort keys under accumulation.
Pre-Digested AI Input
The summary prompt never sees raw chain JSON — it gets wallet stats, the risk assessment, the top 5 counterparties, and 8 notable transfers, streamed back through the AI Gateway as plain text.
System Architecture
A layered pipeline where only the bottom layer is chain-aware. Client components (AppShell, CommandBar, the 3D FundFlowGraph, and side panels) fetch through TanStack Query hooks into Next.js API routes on the Node runtime. Those routes validate the chain and call services that orchestrate and cache (60s TTL). Below them sits pure, chain-agnostic domain logic — buildGraph, topCounterparties, assessRisk, buildSummaryInput. At the bottom, getAdapter(chain) routes to Moralis for EVM, Helius for Solana, and keyless Esplora for Bitcoin, each mapping a wildly different provider shape onto the same Address and Transfer types from the subject's point of view.