BUILD STATUS: V1 TYPESCRIPT CORE & SOLANA ANCHOR SPECS • monsoonbank.com

Building a Pure Small Savings Bank in Public.

Engineering notes, architectural trade-offs, and progress logs as we build The Monsoon Bank: a strictly retail small-savings bank ($1,000/mo KYCed exchange inflow cap, unrestricted outgoing spending) powered by ring-fenced 14%–16% APR proprietary trading margin facilities.

Small Saver Inflow Cap $1,000 / mo KYCed CEX Inflow • Anti-SVB Moat
Outgoing Transfers Unrestricted Any Wallet / Card / Merchant + 50ms OFAC
Prop Margin Revenue 14% – 16% APR 20–30% First-Loss • 105% Auto-Liq
Saver Yield Architecture 5.25% – 8.85% US 2Y+1% Base + Founding Booster
Architecture Reference v2.0

End-to-End System Blueprint

How our Alloy-6-proved specification, 10-library symbolic TypeScript toolchain, 5 on-chain Solana Anchor programs, and off-exchange MPC prop sub-accounts work together.

LAYER 01 • ENTRY & CO-OWNERSHIP

Asymmetric 2-of-2 Transit Wallet

Every saver gets an isolated, deterministic Solana PDA co-owned by Key 1 (User Hardware WebAuthn Passkey) and Key 2 (Bank Enclave HSM Policy Daemon).

  • Strict Inflow Gate: Only accepts transfers from the customer's verified KYCed exchange (with a 48h re-bind timelock) up to a hard $1,000/month Small Savings cap.
  • Unrestricted Gasless Outflow: Customers freely send or spend interest and principal to any self-custody wallet, card, POS merchant, or CEX with zero SOL gas fees—screened in <15ms against multi-hop OFAC peel chains.
LAYER 02 • CORE LEDGER & SOLVENCY

TypeScript BIGINT Double-Entry Ledger

Built on Node.js 22 LTS + TypeScript + PostgreSQL 16 (Drizzle ORM) with SERIALIZABLE isolation and strict principal/interest sub-account segregation.

  • Zero Floating-Point Math: All balances use 6-decimal atomic bigint units (1_000_000n = $1.00) with invariant Debits == Credits conservation.
  • Hard Reserve Buffers: Enforces a minimum 20% liquid US T-Bill/Cash buffer and a 15% First-Loss Bank Equity Reserve at all times.
LAYER 03 • REVENUE & RISK ENGINE

8.0%–16.0% Prop Margin Sub-Accounts

Senior fixed-rate institutional credit facilities settled via Off-Exchange MPC Custody (Copper ClearLoop / Fireblocks Off-Exchange) with a hard <= 35% single-venue concentration cap.

  • Zero Borrower Withdrawal Custody: Borrowers receive trade-only API keys restricted to Top-10 liquid pairs (BTC, ETH, SOL).
  • 25%–30% First-Loss Collateral: Prop house posts >= 25% cash margin first to absorb any drawdown.
  • 110% Halt / 105% Auto-Liquidation: Sub-second risk loop halts new orders at < 110% and deterministically revokes trade keys & liquidates to cash at <= 105% health.
LAYER 04 • FORMAL SPECIFICATION MOAT

Alloy 6 Proofs & CHR.ts Policy Engine

All 42 regulatory, accounting, and security invariants (9 Pillars) are mathematically proved in Alloy 6 (SAT4J) before backend code is written, then compiled 1-to-1 into CHR.ts.

  • Zero Counterexamples: 5 Non-Vacuity Witnesses (SAT) and 28 Exhaustive Safety Assertions (UNSAT), including Linear Temporal Logic (LTL) flash-crash liquidation proofs.
  • Sub-15ms Runtime Gate: @monsoonbank/compliance evaluates all 42 invariants and multi-hop OFAC graph closures in <15ms before Key 2 co-signs any transaction.
LAYER 05 • ORCHESTRATION & PROOFS

10-Library Symbolic TypeScript Stack

Powered by our zero-dependency neuro-symbolic TypeScript toolchain for deterministic banking operations, treasury optimization, and regulatory auditability.

  • Self-Healing Sagas & DAGs (step.ts): Orchestrates reverse-order compensation on partial settlement failures (step.saga) and sub-200ms parallel liquidation DAGs (step.auto).
  • Constructive Audit Proofs: Combines eyeprolog.ts (ISO Prolog + CLP(Z) Mermaid proof trees), yalps.ts (MILP treasury optimizer), temporal.ts, dcg.ts, clsp.ts, and apl.ts.
LAYER 06 • POST-$6.3B HACK IMMUNITY

Zero-Omnibus & On-Chain Circuit Breakers

Engineered specifically so a state-sponsored DevOps laptop or backend container compromise can steal $0 of customer funds.

  • Zero Omnibus Hot Wallets & Delegation Ban: Per-saver isolated PDAs require physical Key 1 hardware signatures; EIP-7702 (SetCode), SPL Approve, and SetAuthority are categorically rejected.
  • On-Chain Rust Velocity Breaker: Solana program automatically pauses withdrawals if hourly outflow exceeds 2% of TVL, backed by 4-of-6 Squads hardware multisig + 72h timelock and 100% issuer-freezable Tier-1 assets (USDC, USDT, PYUSD, EURC, PAXG).
Interactive Financial Model

Net Interest Margin & "Yield-as-CAC" Sandbox

Test how The Monsoon Bank generates a 3%–4% net profit spread while paying early small savers up to 8.85% APY (SBI MCLR parity)—and remains cash-flow positive even if prop borrowing drops in a bear market.

$100,000,000
80% Prop / 20% T-Bills
15.50% APR
1.20%
Blended Gross Asset Yield (Prop + 4.35% T-Bills) 13.27%
Depositor Interest Payout -8.85%
Operating & Gas Relayer Cost -1.20%

NET BANK PROFIT SPREAD (AFTER OPEX)
+3.22%
ANNUAL NET BANK PROFIT
$3,220,000 / yr

At $1,000/mo max deposit, $100M AUM represents ~20,000–40,000 granular retail savers with zero whale bank-run concentration risk.