Skip to content
Oloyede Al-amin Oladaposmurftyy
Work index

W-04 · Case study

CardanoTreasuryExplorer

The focused, shippable piece that came out of a broader research effort into Hydra L2 microtransactions — after that effort hit limits no amount of code could fix.

Status
Shipped as a CLI. Live posting needs a funded X API account.
Context
Blockprint — Cardano tooling
Data
Cardano mainnet via Blockfrost
Safety
Dry-run mode previews every post
Stack
TypeScript · Node.js · Blockfrost API · X API v2 · node-cron · chalk + cli-table3
Cardano Treasury Explorer CLI: a live treasury snapshot table for epoch 637 and a list of pending governance treasury withdrawals.
Fig. 01 — The CLI dashboard against mainnet, epoch 637. Screenshot from the repository.

Thesis

Descoping is an engineering decision, not a retreat.

§ 01

Where it came from

The original question was whether posts on X could trigger ADA microtransactions on a Hydra Head. That research ran into hard constraints — node sync time, Hydra's liveness requirement, X API pricing and regulatory exposure — documented in the sibling project, x-hydra-tweet-engine.

The treasury monitoring half worked. So I cut the project down to that: something that runs against real data and can be shipped.

§ 02

The problem it solves

Cardano's treasury and governance activity is public, but in practice it is invisible — it sits behind APIs rather than anywhere a person would casually see it. A readable, recurring summary makes it legible.

§ 03

The system

A scheduler polls Blockfrost for treasury, reserves, epoch activity and governance withdrawals; core logic computes the change against the previous epoch and flags anomalies; snapshots are stored locally; the display layer renders the dashboard; and a posts module produces four kinds of update, each within X's 280 characters. A backfill script loads historical epochs.

Diagram 01

One polling cycle

InputA new epoch starts.

Step 1 of 6 · Tick

The scheduler triggers a poll.

LegendNumbered squares are stages; filled means reached in this scenario, dashed means not reached. ◆ marks a stage that is scaffolded, planned or blocked rather than built. Diagram drawn for this site from the Cardano Treasury Explorer README and source layout (scheduler.ts, blockfrost/, core/, db/, posts.ts, twitter.ts). Not an original sketch.
Every stage, in words
  1. 01Tick (scheduler.ts · node-cron) — The scheduler triggers a poll.
  2. 02Read (blockfrost/) — Treasury, reserves, epoch stats and governance withdrawals from mainnet.
  3. 03Compare (core/) — Change since the previous epoch, plus an anomaly flag.
  4. 04Store (db/ · treasury.db) — Keep the epoch snapshot for history and future deltas.
  5. 05Display (display/ · chalk, cli-table3) — Render the live terminal dashboard.
  6. 06Post (posts.ts → twitter.ts) — Format one of four post types (≤ 280 chars). Dry run prints it; live mode sends it.

§ 04

Constraints

The free Blockfrost tier doesn't include the governance proposals endpoint. That read is isolated in its own try/catch, so the rest of the bot keeps working without it. Live posting needs a dedicated account with a funded X API credit balance, so the default mode is a dry run.

§ 05

Next

  • A dedicated bot account with funded API credit for live posting.
  • Possibly revisiting Hydra for microtransaction-level treasury tracking.