vault
DAX Chain — PRD Vault
DAX Chain — Product Requirements Vault
Obsidian-friendly vault. Open this folder in Obsidian and follow the wikilinks to navigate. Every page renders as plain markdown elsewhere.
Published as HTML
This vault is rendered at prd.<domain> — a public, unauthenticated site built from docs/ at deploy time (app/prd, lib/prd). Wikilinks, GFM tables and Obsidian callouts all render. Anything committed here is world-readable once deployed.
This PRD is written from the PM seat at a crypto startup. Treat it as a working document — open questions are tracked per page and consolidated in 09-Open Questions.
Start here
New to the vault? Read in this order — about 20 minutes:
- 01-Overview — what we're building and for whom
- 03-Domains — every product surface and whether it's live
- 02-Architecture — how the shipped system fits together
- 08-Risks and Drawbacks — what's fragile, and why
Looking for something specific?
| If you want to… | Go to |
|---|---|
| Integrate against the API | reference/payouts, reference/api-checkout |
| Understand a single feature end to end | User stories |
| Know what's decided vs still open | 09-Open Questions |
| See what ships next | 10-Roadmap |
| Look up a term | Glossary |
Map of content
Current state (what's shipped)
- 01-Overview — vision, scope, personas, KPIs
- 02-Architecture — stack, layering, deployment posture (current MVP)
- 03-Domains — every product surface, live + planned
- 04-Data Model — tables, relationships, migrations
- 05-External Providers — Fireblocks (custody), Elliptic (AML + sanctions), Mercuryo (acquirer + on/off-ramp), CEX.IO (rate oracle), Resend (email), Sumsub (KYC), plus planned TRES + AWS edge stack
- 06-Admin Console — operator capabilities, live + planned
- 07-Non-Functional — security, observability, reliability, compliance posture, permission matrix, DR
- 08-Risks and Drawbacks — what's fragile, mocked, missing
- 09-Open Questions — decisions waiting on stakeholders
- 10-Roadmap — MVP → Beta → GA → Scale
- 15-Compliance — DAC8, FATF Travel Rule, MiCA / CASP scope (planned)
- 16-AWS-Deployment — MVP Terraform + GitHub Actions path for AWS deployment
Target state (AWS refactor brief)
- 11-Target-Architecture — AWS topology: Route 53 + CloudFront + AWS WAF + Shield → API GW → ALB → app/worker containers on EC2, CoSigner, TRES; admin via IAM Identity Center
- 12-Environments — Dev / Test / Prod three-environment model with HA + DR profiles
- 13-Network-Model — public/private subnets, security groups (SG-ALB / SG-APP / SG-WORKER / SG-COSIGNER / SG-DB)
- 14-Operations — runbook index, privileged actions, DORA / MiCA framing, CI/CD posture, dependency matrix
Reference
- Glossary — vocabulary used across the vault
- Reference index
- Payouts — endpoints, lifecycle, AML cache, concurrency
- Unified payment intents — the
payment_intentsmodel behind invoices, orders and pay-to - API checkout — merchant QR checkout endpoints + webhook signatures
- Reconciliation — balance reconciliation runs and outbound halts
- Fireblocks whitelisted wallets — payee whitelist lifecycle
- Better Stack observability — logs, traces, heartbeats
- TRES fee recording — parent/child transaction shape for fees
User stories
- Stories index — invoicing, QR receive, send, admin fees, Mercuryo, merchant API/QR payments
Status legend
| Marker | Meaning |
|---|---|
| 🟢 Live | Implemented and exercised in dev |
| 🟡 Beta | Implemented but provider mocked or not yet released to prod |
| 🔴 Spec | Designed, not yet built |
| ⚠️ Risk | Known weakness — see 08-Risks and Drawbacks |
| ❓ Open | Decision required — see 09-Open Questions |
Snapshot
Verified against master on 2026-08-09.
- 43 migrations applied —
0000_baselinethrough0042_payee_wallet_whitelist(lib/db/migrations). - Drizzle schema is a directory (
lib/db/schema/*.ts), not a single file. - 4 of 9 providers have live implementations: Fireblocks (
LiveFireblocks), rate oracle (CexioOracle), KYC (SumsubService), email (Resend). Still mock-only: chain, acquirer, risk, Elliptic, TRES — those throw onlive. - Background work runs on pg-boss (
worker/worker.ts, 11 queues) — payout execution, webhook delivery, mail, order expiry, deposit reconciliation and Fireblocks polling are all off the request lifecycle. - Public REST:
/api/v1/payments/*,/api/v1/payouts/*,/api/v1/rates,/api/v1/wallets. - Inbound webhooks:
/api/webhooks/fireblocks,/api/webhooks/kyc,/api/webhooks/mercuryo. - Web surfaces:
/my/*(wallet, send, receive, buy, sell, convert, payees, invoices, payouts, orders, notifications, api-keys, profile, history, help),/api-orders,/api-payouts,/admin/*,/pay/*,/docs,/prd(this vault, rendered), plus the in-progress/v2/*UI rewrite. - No cache tier and no message broker. Postgres is the only datastore: durable background work runs on pg-boss, and rate-limit windows live in the
rate_limitstable.
Elliptic (AML + sanctions), the card acquirer, the chain provider and TRES are still mocked. Fireblocks, KYC, email and the rate oracle have live paths. See
05-External Providers and 08-Risks and Drawbacks#Provider readiness.
Route prefixes moved. Authenticated retail surfaces live under
/my/* (not /wallet, /send, …), and the (user) / (merchant) / (marketing) route groups no longer exist — see 02-Architecture#Layering.