Overview
The Treasury OS (“Neobank”) is the planned financial layer that lets agents hold budgets, route payments across rails, and produce verifiable receipts. It is built to answer: who paid, why, under which policy, using which rail, and with what cryptographic proof.Goals
- Enforce budgets at multiple scopes (org -> repo -> issue)
- Route payments across Lightning, Cashu, Taproot Assets, and on-chain
- Provide deterministic, auditable receipts for every spend
- Make agent spending safe enough for enterprise procurement
Core Components
- TreasuryRouter: policy engine that selects rail, asset, limits, and approvals based on context and budget state
- Budgets: hierarchical caps with approval workflows and override rules
- Receipts: structured records with policy, rate, rail, and proof metadata
- Quotes: prepared payment intents with idempotency, expiry, and reservation
- Reconciliation: background repair for pending/expired quotes and failures
Payment Flow (Conceptual)
- Agent requests a payment with context (goal, task, repo, issue).
- TreasuryRouter checks org/repo/issue budgets and approval rules.
- Router selects the rail and asset (e.g., BTC_LN vs USD_CASHU(mint)).
- A quote is created and funds are reserved.
- Payment is executed and verified.
- A receipt is emitted with policy and provenance details.
Receipts (What Gets Logged)
Typical receipt fields include:- Amount denominated vs amount settled
- Exchange rate and quote reference (if FX was required)
- Rail and AssetId (e.g., BTC_LN, USD_CASHU(mint_url))
- Policy rule that authorized the spend
- Session and trajectory references for traceability
Guardrails and Safety
- Deterministic budget checks and approval gates
- Idempotent quotes to survive retries and crashes
- Reconciliation loops to resolve pending payments
- Receipt trails for audit and compliance