PROPOSAL · FOR PRAJIT · NIUM
Money Movement 2.0
A payout control plane for the flows that don't bank like businesses.
AVI REDDY · SAN FRANCISCO BAY AREA · CONFIDENTIAL, SHARED FOR EVALUATION
Thesis
Nium's first quarter-billion of net revenue came from being the licensed last mile in 190 markets. The next three-quarters come from flows that are payout-shaped but not bank-shaped: stablecoin settlement, marketplace splits, high-risk verticals, agents, prediction markets and perpetuals. Catching them as six product lines would cost six times as much for a fraction of the leverage. So: one control plane, six policies. A payout intent goes in; five decisions come out — source, entity, evidence, timing, rail — priced line by line against the decision that spent each line, posted to a double-entry ledger, and recorded as an immutable trace that names the perimeter the payout ran inside and registers every follow-on event against its own id.
Quickstart
Requires Node.js ≥ 18. No dependencies — no npm install needed.
npm test # 17 tests, incl. every knob combination of the six scenarios
npm run demo # print the six traces
node src/cli/demo.js gaming lic=1 # MGA-only operator → DECLINED (MARKET_REGISTRATION_REQUIRED)
node src/cli/demo.js agent net=2 # per-call payouts → HELD (UNECONOMIC_ROUTE)
node src/cli/demo.js marketplace payee=1 # USDC to a Brazilian seller → DECLINED (Res. 561, via appetite exclude)
npm run serve # HTTP API on :8402 (PORT to override)
npm run bundle # dist/mm2-engine.js → window.MM2 for the browser
npm run check # tests + bundle
Call the API:
curl -s -X POST localhost:8402/api/mm2/v1/client/demo/payouts \
-H 'x-request-id: 1' -H 'content-type: application/json' -d @scenarios/gaming.json
Architecture
payout intent ──► ControlPlane.evaluate
├─ policy (policies/*.json — versioned data per flow)
├─ evidence (gate: KYB/KYC/licence/KYA results, TTL-cached)
├─ router (appetite: entity × partner × jurisdiction × vertical × rail)
├─ settlement (rail selection, pricing lines, netting windows)
├─ ledger (double-entry postings; every approved ledger balances)
└─ trace (immutable record: perimeter, decisions, cost, follow-ons)
| Path | Contents |
|---|---|
src/engine/ |
the engine — policy, evidence, router, settlement, ledger, perimeter, trace, control plane |
src/cli/ · src/api/ |
CLI demo and dependency-free HTTP server |
policies/ · partners/ · scenarios/ |
six flow policies, partner appetite table, six runnable scenarios |
api/openapi.yaml |
the control-plane API surface |
docs/ |
high- and low-level design |
test/ |
node:test suite |
scripts/bundle.js |
browser bundle builder |
Design docs
- High-Level Design — design doctrine, context, components, money-flow models, NFRs, deployment
- Low-Level Design — data model, state machine, policy DSL, appetite table, reason codes, sequences, API mapping
- OpenAPI — control-plane API
Notice
Everything here is built from Nium's public documentation and job postings; amounts, rates and partner names are illustrative. An independent proposal by Avi Reddy for Nium — not a Nium document. Confidential, shared for evaluation; see LICENSE.