Solution architecture · C4 model

A stablecoin fintech, drawn the way builders and boards both read it.

This is a vendor-neutral reference architecture — the shape of any stablecoin fintech, whether you build it in-house or assemble it from providers, and independent of which specific service you use. We use the C4 model — Context, Containers, Components — so an executive can grasp the landscape in ten seconds and an engineer can find where a change lands. Each view is annotated by a technical product manager on what it means for the product and the roadmap.

C1 · System context

People, the platform, and the outside world

To everyone outside, StablePeg is one system. Underneath, every provider is its own latency and failure domain.

People

Person End customer Holds a stablecoin balance, spends a card, sends and receives money.
Person / org Business customer Onboards via KYB and operates a business account.
Internal Ops & compliance Works risk cases, disputes, and reconciliation breaks.

System

Software system Stablecoin fintech platform Stablecoin banking, cards, and wallet transfers — with the treasury and ledger that keep them all in agreement.

External systems

External KYC / KYB provider Identity and business verification.
External Fraud & device risk Real-time fraud and behavioural scoring.
External On-chain KYT / AML Wallet and counterparty screening.
External Card issuer / processor Issues cards and authorizes at the network.
External Blockchain networks Settlement rails for stablecoin transfers and finality.
External Bank & fiat rails ACH / SEPA / local deposits and payouts.
External Stablecoin issuer / custodian Mint, burn, reserves, and custody.
External Notifications Email, SMS, and push to customers.
Technical product manager

The board-level story fits on this one diagram: identity and risk gate access, the platform holds the money, and every external provider sits behind an adapter — so it is replaceable, and swapping a KYC or card vendor is a contained change, never a platform rewrite.

C2 · Containers

Inside the platform: services split by responsibility

Grouped by role. The one rule that holds it together: Ledger · Treasury is the single source of truth; everything else keeps a projection and reconciles back to it.

Experience edge

Client apps Mobile & web surfaces for customers.
API / BFF gateway Auth, rate limits, and a backend-for-frontend per surface.

Product services

Onboarding Orchestrates KYC/KYB and publishes eligibility.
Cards Issuing, controls, and fast authorization decisions.
Wallet & transfers Customer on-chain deposits, withdrawals, and peer transfers of stablecoin.
Fiat rails Deposits and payouts through bank partners.

Money core

Source of truth Ledger · Treasury Double-entry ledger, custody, mint/burn, settlement, reconciliation.
Risk · decisioning Fraud, KYT, AML case management and decisions.

Platform backbone

Provider adapters Normalize each external vendor + inbound webhooks.
Event backbone Signed, versioned, idempotent, replay-safe events.
Ops back-office Case queues, dispute tooling, recon dashboards.

Data stores

Ledger store Append-only journal + balance projections.
Profile store Customers, eligibility, and KYC state.
Event store Durable event log for replay and audit.
Technical product manager

This is where roadmap bets live. Product services talk through the event backbone and each keep a read-model, never inventing their own balance — they subscribe to the ledger. Because they sit on a stable money core, we can launch a new card program or payout corridor without touching how money is actually held. Independent deploys, contained blast radius.

C3 · Component

Inside Ledger · Treasury — the container that holds the truth

Zooming into the money core. Everything here is append-only and event-sourced, so we can always answer “what did we believe, and when.”

Ledger · Treasury container

Component Posting engine Immutable double-entry journal; every movement is balanced.
Component Balance projections Read-optimized balances other services subscribe to.
Component Mint / burn orchestrator Expands and contracts supply against reserves via the issuer.
Component Reserve & custody manager Tracks reserves, custody accounts, and attestations.
Component Settlement engine Nets and settles card, crypto, and fiat obligations.
Component Reconciliation engine Three-way match — provider vs ledger vs customer — raising breaks.
Technical product manager

This component is why Finance, Compliance, and Support can trust one number. Authorization holds, clearing, and settlement are separate postings against the same journal, never overwritten, and balances are a projection that can always be rebuilt — so when anyone disagrees with a customer, the reconciliation engine’s break is the artifact that settles it. That’s a support-cost and trust win, not just an engineering nicety.

See it in motion

Each guide shows one of these flows as a step-by-step sequence.

Open the Field Guide