DEV Community

Verixia
Verixia

Posted on

We rebuilt CoinMarketCap-style markets pages on free data — here's the stack

Every crypto team's landing page eventually wants a markets table: price, 24h volume, liquidity, holders, per-chain breakdown. The usual answer is "pay CoinGecko/CMC $300+/mo and pray the rate limit holds." We run a DEX, a token scanner, and validator infrastructure across ~100 networks — so we built our own instead. This is the build log.

What shipped

  • /markets — a markets index with CMC-parity columns: rank, price, mcap, 24h volume, liquidity, holders, sparkline. Works across Solana + 7 EVM chains.
  • Per-asset pages — every tracked token gets a dedicated page with its measured on-chain state, rendered at the edge.
  • /networks — ~100 per-chain pages showing validator health and RPC endpoints, with honest status badges (a chain that's degraded says degraded).
  • A token safety scanner that returns letter grades (A–F) from mint/freeze authority, LP burn, holder concentration, and deployer history.
  • x402 machine-payable RPC endpoints — agents pay per call in USDC, settled on-chain. No API keys, no accounts.

The stack

Data plane. A Rust+Node pipeline snapshots pair state on a schedule into D1 (Cloudflare's SQLite-at-the-edge). Token rows carry measured facts only — the row either has a number or it doesn't render one. There's no "N/A dressed as zero" anywhere; a missing liquidity figure says the snapshot couldn't measure it.

Edge render. Cloudflare Pages Functions serve per-token pages straight out of D1 — no origin server in the request path. Time-to-first-byte is D1 latency plus a template render, so the whole corpus of ~5,000 prose-backed pages responds like a static site.

Honest fallbacks. The hard lesson: any aggregation pipeline lies eventually. Source API blips, a chain halts, a pool migrates. Our rule: when a measurement isn't fresh, the badge says so and the stale figure doesn't print. We'd rather show "unmeasured" than show wrong.

The scanner. Paste a mint, get a grade. The grade composes authority state (mint/freeze revoked?), LP burn depth, top-holder concentration, and deployer history. The same feed powers the markets pages, so a token's page and its scan verdict can never disagree — they're the same row.

x402 RPC. The RPC endpoints behind the validator fleet are exposed as machine-payable: a request without payment gets a 402 Payment Required with an on-chain payment instruction; pay in USDC on Solana or Base, replay the request with the receipt, get served. No signup flow at all — the payment IS the auth.

What it costs to run

The whole read path is free-tier: Pages Functions + D1 + scheduled workers. The expensive part was never compute — it was the data plumbing. Aggregating pool state across 100+ networks without paying a data vendor means running your own indexers and eating the edge cases yourself. Worth it: the same corpus feeds the DEX UI, the scanner, the SEO pages, and the x402 endpoints.

Try it

Everything above is free to read and needs no account. If you're building agents, the x402 endpoints are the interesting part — your bot can pay for its own RPC calls.

Top comments (0)