Shipped
Cardano-Treasury-Explorer
An on-chain treasury monitor for Cardano — tracks governance and treasury activity via Blockfrost and posts structured updates to X, descoped from deeper Hydra L2 research into something focused and shippable.
Overview
Cardano Treasury Explorer is a live CLI dashboard for Cardano on-chain treasury and governance activity, with a companion bot that posts structured updates to X. It runs against real mainnet data via Blockfrost — real treasury balances, real epoch stats, not a demo.
It is also a case study in descoping: the shipped deliverable from a broader research effort into Hydra L2 microtransactions that hit hard blockers.
Problem
Cardano's treasury and governance activity is public but effectively invisible — the data sits on-chain behind APIs, not anywhere a person would casually see it. Surfacing treasury movements, governance proposals, and epoch-level activity in a readable, recurring format makes on-chain governance legible.
Solution
The explorer polls Cardano on-chain data via Blockfrost — treasury withdrawals, governance proposals, epoch activity — renders a color-formatted live CLI dashboard (chalk + cli-table3), and formats findings into four distinct post types for X, each constrained to the 280-character limit. A dry-run mode previews posts without publishing; a backfill utility ingests historical epoch snapshots.
Architecture
TypeScript/Node.js, run with tsx in development and compiled with tsc for production. A scheduler (node-cron) drives polling; a Blockfrost client module handles on-chain reads; core treasury/governance logic computes deltas; a posts module generates the four post templates; a local SQLite store (treasury.db) keeps epoch snapshots; the display layer renders the dashboard.
The system is built to operate within Blockfrost free-tier constraints, with graceful fallbacks where paid-tier endpoints would be required.
node-cron ──► Blockfrost client ──► treasury · governance · epoch reads
│
▼
delta computation
│
┌──────────────────┴──────────────┐
▼ ▼
SQLite (treasury.db) 4 post templates
epoch snapshots (280-char, dry-run)
│ │
▼ ▼
CLI dashboard X API v2
(chalk + cli-table3)Tech stack
Challenges
- Free-tier API budgets shaped the design: polling cadence, caching, and endpoint selection all had to fit inside rate limits, with fallbacks where paid endpoints were the natural choice.
- Compressing treasury data into 280 characters that stay accurate and readable — template design is harder than it looks.
- Trusting the numbers: treasury and reserve figures needed cross-checking against known epoch snapshots before the bot could post them publicly.
Lessons learned
- Descoping is an engineering skill: cutting the Hydra L2 ambition down to the monitoring layer produced a real, shippable artifact instead of a stalled prototype.
- Dry-run modes should exist from day one in anything that publishes publicly.
- Designing for the free tier first keeps a side project alive — cost ceilings are architecture constraints.
Future improvements
- A web dashboard alongside the CLI.
- Alerting on anomalous treasury movements.
- Additional post types covering governance vote outcomes.