Repository avatar
AI Tools
v1.0.0
active

reservewatch

com.thereservewatch/reservewatch

On-chain reserve health for tokenized commodity tokens. XRPL vault tools at activation.

Documentation

ReserveWatch — On-chain reserve health for tokenized assets

Source for https://thereservewatch.com.

ReserveWatch MCP connector – tool definition quality and endpoint health on Glama

ReserveWatch on Glama

MVP — gold focus.

Reads public ledger data for tokenized metals, diamonds, energy and other real-world assets on XRPL, Solana and Stellar. Public ledger data only (xrpl.js over public WebSockets for XRPL). No wallet, no seeds, no private keys — ever.

Run

Requires Node 22.9+ (uses --env-file-if-exists).

npm install
npm run dev        # http://localhost:3000 (auto-reload); or: npm start
npm run check      # one-shot CLI snapshot -> console + data/latest.json + data/alerts.log
npm run typecheck
npm run build && npm run start:prod   # production: compiled JS, no tsx at runtime

Optional: cp .env.example .env and edit. No API keys are required.

Env varDefaultPurpose
PORT3000HTTP port
POLL_INTERVAL_SEC300Ledger refresh interval
XRPL_WS_URLSwss://xrplcluster.com,wss://s1.ripple.com,wss://s2.ripple.comEndpoints, tried in order
SPOT_API_URL_TEMPLATEhttps://api.gold-api.com/price/{symbol}Spot USD/oz (free, keyless). Response must have numeric price
SPOT_API_KEY–Sent as x-access-token if your provider needs one
SPOT_STATIC_XAU / SPOT_STATIC_XAG / SPOT_STATIC_XPT–Pin spot price (offline/demo), overrides API
LOW_LIQUIDITY_USD10000AMM TVL below this = warn; also marks peg signal "thin"
PEG_WARN_PCT / PEG_CRIT_PCT3 / 10Peg deviation thresholds
CONCENTRATION_WARN_PCT50Top non-treasury, non-AMM holder share that triggers warn
MAX_DEX_SPREAD_PCT20DEX mid used as a price only if bid/ask spread ≤ this
DATA_DIR./datalatest.json, alerts.log, alert-state.json
REFRESH_TOKEN–Enables POST /api/refresh in production (header x-refresh-token); always rate-limited to 1/min
TELEGRAM_BOT_TOKEN, TELEGRAM_CHAT_ID, ALERT_EMAIL_TO–Alert stubs (log "would send"; no network calls yet)

Routes

  • / — comparison menu: market/liquidity/peg, issuer controls, and identity/verification. The legacy overall (worst raw check: ok/warn/critical) is shown second. presentation on /api/tokens is that comparison; status and checks are unchanged.
  • /token/:id — public transparency page (issuer, currency code, supply, flags, AMM pools, DEX top of book, top holders, checks, notes)
  • /alerts — alert log (status transitions)
  • /api/tokens, /api/tokens/:id — JSON; /healthz; POST /api/refresh
  • /developers — API and MCP docs (curl examples, rate limits, licence, how to cite); /api redirects there. /openapi.json — OpenAPI 3.1. POST /mcp — keyless, read-only MCP server (Streamable HTTP). Free API fair use: 120 requests/min per IP on /api/* and /mcp (RATE_LIMIT_PER_MIN, 0 = off).

Token ids: meld-gld, meld-slv, unlisted-gold-rmeld ("Unverified listing" — shown for transparency, not on Meld's published list), assetiko-xaua, assetiko-xaga (silver), assetiko-xpta (platinum), bpg-xau.

  • /disclaimer, /terms, /contact — public-launch info pages (linked in every page footer). Contact address set by CONTACT_EMAIL (default josh@thereservewatch.com).

Vault reserves (XRPL lending vaults, XLS-65 / XLS-66)

Off unless VAULTS_NETWORK is set (devnet / testnet = noindex preview with a "Test network preview" banner; mainnet = public). Routes: /vaults (XRPL tab), /vaults/xrpl/{vaultId}, /vaults/xrpl/broker/{brokerId}, JSON /api/vaults, /api/vaults/xrpl/{vaultId}, /api/vaults/xrpl/broker/{brokerId}. Chain adapters in src/vaults/adapter.ts (XRPL only; plan in docs/vaults-chain-rollout.md). Also: /vaults/method (versioned method, neutrality and corrections policy), /vaults/snapshots and /vaults/snapshots/YYYY-MM-DD.json (daily, SHA-256 hash-chained, stored in DATA_DIR/vaults-daily-<network>/), filters /vaults?asset=&status=&limit=&blimit= (noindex), JSON /api/vaults/v1/loans (rwa.xyz-aligned fields) and /api/vaults/v1/calendar. Field mapping: docs/vaults-api-schema.md. Citability: /api/vaults/v1/snapshots (snapshot index), MCP tools list_vaults, get_vault, get_broker, list_loans, get_payment_calendar, list_vault_snapshots, get_vault_snapshot (shared code with the API in src/vaults/tools.ts; "section not enabled" when VAULTS_NETWORK is unset), and a "How to cite" block on /vaults/method, /vaults/snapshots and /developers. Licence: vault data (daily files, vault API, vault MCP tools) is CC BY 4.0 (CC-BY-4.0); everything else stays under the reuse note. See /license#vaults and the no-reliance notice at /license#vaults-notice. The memo text lives in src/vaults/licence-text.ts (verbatim). Optional LICENSOR_NAME sets the copyright line (unset = © <year> ReserveWatch). Code: src/vaults/ (parse, read, pages, snapshots, method, tools, licence). Read-only JSON-RPC; never signs or holds funds. One-off reader: VAULTS_NETWORK=devnet DATA_DIR=data npx tsx scripts/vaults-read.ts. Mainnet switch: docs/vaults-mainnet-switch.md.

What is measured (per token)

MetricXRPL method
Domain verification (issuer listed in https://{Domain}/.well-known/xrp-ledger.toml)account_info Domain + HTTPS fetch
Issuer flags (globalFreeze, noFreeze, allowTrustLineClawback, requireAuthorization, disableMasterKey…) , TransferRate, Domainaccount_info
Outstanding supply; treasury/pre-issuance excludedgateway_balances with hotwallet = configured treasury wallets
Holders, frozen / deep-frozen trust lines, top-holder concentrationaccount_lines on issuer (paged)
AMM depth vs XRP, RLUSD and USDV, implied price, feeamm_info
DEX top of book vs XRP, RLUSD and USDVbook_offers
XRP/USDon-ledger XRP/RLUSD AMM (no external API)
Spot gold/silver/platinumgold-api.com (USD/oz, XAU/XAG/XPT) → per token via grams-per-token

Peg = TVL-weighted AMM implied price across XRP, RLUSD and USDV pools (RLUSD and USDV at a nominal $1; not a reserve check), or DEX mid if no AMM and spread ≤ MAX_DEX_SPREAD_PCT. A peg reading is reliable only from an AMM with TVL ≥ LOW_LIQUIDITY_USD. Otherwise the comparison says "peg not measurable" (a gap, not a broken peg). The raw check is still warn, never critical, and the raw figure stays in JSON.

Comparison (src/presentation.ts, model categories-v1) is what the pages lead with. It does not rewrite check severities.

  • Measured — liquidity at/above the gate, a reliable price within PEG_WARN_PCT, or two-way xrp-ledger.toml. Not a safety rating and not proof of backing.
  • Feature — clawback, RequireAuth, concentration, retained freeze ability. Empty frozen lines are Noted, not a caution. Not risk-free.
  • Not measurable / not confirmed — no pool, thin pool, no spot reference, unpublished issuer link, missing domain file. No pool is not a broken peg. Not confirmed is not a fraud finding.
  • Caution / Critical — Global Freeze, discontinued, issuer missing, material or majority freezes, a reliable peg at/beyond the warn or crit band, or issuer records that disagree with the account (knownStatus: 'unverified').

Legacy overall (status) is still the worst raw check. One feature or gap still makes it WARN. Alerts and weekly snapshots follow that aggregate and are not relabeled.

Adding a token

Edit src/config/tokens.ts (issuer, currency code — 3-char or 40-hex, grams per token, metal, treasury wallets, notes).

Layout

src/config/tokens.ts  token registry (verified live Oct 27–28, 2026)
src/xrplClient.ts     xrpl.js client with endpoint failover
src/spot.ts           spot metal price (pluggable / static override)
src/monitor.ts        metrics + legacy raw-check rules (status = worst check)
src/presentation.ts  comparison categories (does not rewrite status or checks)
src/alerts.ts         file-based alerts (data/alerts.log JSONL) + Telegram/email stubs
src/server.ts         Express SSR UI + JSON API + poller
src/check.ts          one-shot CLI
data/                 latest.json, alerts.log, alert-state.json (gitignored)

Known caveats

  • Meld issuer correction (Oct 28, 2026): Meld's official token page (meld.gold/tokens) lists XRPL tokens GLD (r45PCzxaEWJhWZS8obXnDQK9c2dgYcAfq5) and SLV (r3uhxnfY9UnwyRrrNJy68sQjjyKidBUPrs), each with 1,000 outstanding and one holder. The earlier GOLD/SILVER issuer rMELDgMrr8nvbhnb8oiP5aHWakqPJLh5Rn is not listed by Meld; it only self-declares www.meld.gold as Domain (no xrp-ledger.toml). It is kept as unlisted-gold-rmeld, a lookalike control case. Its ~1e11 initial issuance sits in rippLE4uy7… (the account that activated the issuer), excluded as issuer distribution wallet.
  • On-ledger supply ≠ reserves. Off-ledger reserve attestations are not yet ingested.
  • Public XRPL servers may rate-limit; keep POLL_INTERVAL_SEC ≥ 60.
  • Facts and flags only — not investment advice and not an allegation against any issuer.

No installation packages available.

Remote