Liquidity Docs

Architecture & Topology

How the Transfer Agent's services fit together, how data flows, and the environments they run in.

How the Transfer Agent's services fit together, how data flows, and the environments they run in.

1. Services

ServiceLanguageRole
Operator consoleReact + TypeScriptThe UI operators drive everything from
ta-apiGoCore modular monolith API
subledger-apiGoFBO cash sub-ledger + Plaid money rail
indexerGoTails on-chain events into the DB read model
reconcilerGoContinuously compares on-chain vs DB
devnet-bridgeGoRead-mostly gateway mapping the devnet chain to the console API
Liquid IAMGo + ReactOIDC SSO issuer (Casdoor fork)

Supporting infrastructure: Postgres (system of record), Redis (cache, pub/sub, SSE), an EVM chain (the ERC-3643 suite), and - in non-production environments - mock external services (KYC, clearing, MPC, bank).

2. Topology

  Browser (operator, @satschel.com)
        |  HTTPS, Bearer JWT on every call
        v
  Operator console
        |
        +-- OIDC login --> Liquid IAM --> Google OAuth
        |
   environment toggle picks ONE backend:
        |                                        |
        v                                        v
     ta-api                                 devnet-bridge
   |  |  |   \                                   |          \
   |  |  |    \-- subledger-api                  |           \-- devnet DB
   |  |  |          |   |                        |               (holder enrich)
   |  |  |          |   +-- Plaid (bank link, balance, ACH)
   |  |  |          +-- First Bank of Montana (FBO omnibus)
   |  |  +-- Redis (cache / pub-sub / SSE)
   |  +-- Postgres (system of record)
   +-- EVM chain  <-- indexer / reconciler
        (ERC-3643 SecurityToken, IdentityRegistry, ModularCompliance, USDL, Settlement)

The console talks to one backend at a time, chosen by the environment toggle.

3. Data flow

Reads (register): the indexer tails SecurityToken events from the chain and writes the read model (tokens, positions, holders) to Postgres; the console reads those via ta-api. Point-in-time queries re-derive positions at a historical block and verify against the chain.

Writes (lifecycle): an operator proposes an action -> it becomes an operation (maker-checker) -> a different operator approves -> ta-api executes it as a durable River job that submits the on-chain transaction -> the indexer observes the resulting event -> the read model updates.

Cash (FBO): the subledger-api posts balanced double-entry transactions against the omnibus. Deposits load wallets; dividends credit wallets; withdrawals ACH out. Plaid links banks and verifies/moves funds. Reconciliation asserts the ledger equals the bank.

Events: state changes publish to Redis; the console subscribes over SSE (/events/stream) for live refresh. Failed async work lands in a River dead-letter queue that can be replayed.

4. Environments

The console's top-bar toggle selects which backend it talks to; the choice persists and reloads so the API clients re-read their base URLs.

EnvironmentBackendChain
Localta-api (full)a development EVM chain with the ERC-3643 suite deployed
Devnetdevnet-bridgethe org wallet-api chain (chainId 8675399)

5. Security & access

  • SSO via Liquid IAM (OIDC authorization-code + PKCE), Google provider gated to @satschel.com by an email regex.
  • ta-api and subledger-api verify the Bearer JWT against the IAM JWKS; the verified identity is the maker/checker actor.
  • Public paths (health/readiness/metrics/SSE) bypass auth.
  • Roadmap: role claims (superadmin/RBAC) enforced per-route.

6. Chain integration constraint

The TA integrates with the devnet wallet-api chain only over HTTPS REST (pkg/walletapi), avoiding heavy on-chain SDK dependencies.