Skip to main content

System Design

Encrypto's architecture is designed around one principle: crypto in, fiat out, no friction.

Every component exists to abstract complexity away from the end user while maintaining the security, speed, and cost advantages of on-chain settlement.

High-Level Architecture

┌──────────────────────────────────────────────────────┐
│ Encrypto App │
│ (Next.js + Capacitor) │
│ ┌──────────┐ ┌──────────┐ ┌──────────────────┐ │
│ │ Dashboard │ │ Wallet │ │ Card Management │ │
│ └────┬─────┘ └────┬─────┘ └────────┬─────────┘ │
└───────┼──────────────┼─────────────────┼─────────────┘
│ │ │
┌───────▼──────────────▼─────────────────▼─────────────┐
│ Encrypto Engine │
│ (FastAPI) │
│ ┌──────────────┐ ┌──────────────┐ ┌────────────┐ │
│ │ Liquidity │ │ Identity │ │ Card │ │
│ │ Engine │ │ Service │ │ Service │ │
│ └──────┬───────┘ └──────┬───────┘ └─────┬──────┘ │
│ ┌──────┴───────┐ ┌──────┴───────┐ │
│ │ Banking │ │ Points │ │
│ │ Service │ │ Service │ │
│ └──────┬───────┘ └──────────────┘ │
└─────────┼─────────────────┼────────────────┼─────────┘
│ │ │
┌─────▼─────┐ ┌─────▼─────┐ ┌─────▼─────┐
│ On-Chain │ │ Privy │ │ Card │
│ Liquidity │ │ (Auth) │ │ Issuer │
│(DEXs + MMs)│ │ │ │ (Partner) │
└─────┬─────┘ └───────────┘ └───────────┘
│ │
┌─────▼─────┐ ┌───────────┐ ┌─────▼─────┐
│ Stablecoin │ │ 9 Chains │ │ Visa │
│ Orchestr. │ │ Supported │ │ Network │
│ Layer │ └───────────┘ └───────────┘
└────────────┘

Component Breakdown

Encrypto App (Client)

The frontend is a progressive web app (PWA) built with Next.js. It's mobile-first, installable on home screen, and optimized for the kind of interactions you'd expect from a banking app — balance checks, quick sends, transaction history.

Key characteristics:

  • PWA with offline support. Core screens are cached for instant load.
  • Embedded wallet UI. Transaction signing happens in-context, no redirects.
  • Real-time updates. Balance and transaction changes stream to the client via polling + webhooks.

Encrypto Engine (Backend)

The backend API handles all business logic, orchestration, and external integrations. It's built with Python/FastAPI for rapid development and deployed on Railway.

Services include:

  • Liquidity Engine — Real-time asset conversion across DEX aggregators and market makers
  • Identity Service — User authentication (Privy), KYC orchestration, session management
  • Card Service — Card issuance, transaction authorization, balance management
  • Banking Service — Bank account linking (Plaid), on-ramp/off-ramp transfers, virtual accounts, payment rail management (ACH, PIX, SPEI, CVU). Multi-provider LATAM coverage: Koywe (7 countries), Orda (Brazil PIX), LocalPayment (17 countries)
  • Points Service — Reward tracking, referral management, leaderboard
  • Webhook Handler — Processes callbacks from KYC provider, card network, payment rails, and on-chain events

Stablecoin Orchestration Layer

Encrypto's payment infrastructure converts between fiat currencies and stablecoins (USD, USDC, USDT, etc.) across fiat rails and blockchain networks through a unified orchestration layer.

CapabilityWhat It Does
Fiat ConversionConverts between fiat and stablecoins via ACH (live), PIX (live), SPEI (rolling out), CVU (rolling out). Expanding via multi-provider LATAM strategy.
Multi-Chain Settlement9 blockchains supported natively — deposits detected automatically, conversions handled server-side
Virtual AccountsUSD deposit accounts via Bridge
Card SettlementVisa card transactions settle with zero FX markup and no cross-border fees
KYC/KYBIdentity verification, sanctions screening, and ongoing compliance monitoring built into the platform
Transfer LifecycleDeterministic state tracking with real-time webhook notifications at each stage

Transfer Lifecycle

Every fiat transfer follows a deterministic state machine:

awaiting_funds → funds_received → payment_submitted → payment_processed
  • awaiting_funds — Waiting for the user's deposit (crypto, ACH push)
  • funds_received — Deposit confirmed, conversion processing
  • payment_submitted — Fiat payment sent to the destination bank
  • payment_processed — Transfer complete, funds delivered

If the user's wallet is the source, awaiting_funds is skipped — transfers initiate instantly.

Why This Architecture

  • Rails-agnostic. One system for ACH, PIX, SPEI, CVU, and 9 blockchain networks. Adding a new rail or chain is configuration, not engineering.
  • Compliance built-in. KYC, sanctions screening, and transaction monitoring are handled at the platform level — no separate compliance infrastructure to build or maintain.
  • Settlement speed. Cross-border transfers that take 2-3 days via traditional correspondent banking settle in minutes through stablecoin rails.
  • Institutional-grade. The same compliance and banking infrastructure used by the largest payment companies in the world.

Data Layer

StorePurposeTechnology
User dataAccounts, KYC status, settingsSupabase (PostgreSQL)
Transaction historyCard txns, P2P transfers, bank transfersSupabase + card issuer + payment infrastructure
On-chain stateBalances, token positionsDirect RPC queries
Session/authUser sessions, tokensPrivy

Design Principles

1. Managed Custody

Encrypto currently manages wallet infrastructure through Privy. Users authenticate via social login and their wallet is recoverable — no seed phrases. We may explore additional custody options in the future. See Custody Model for details.

2. Fail Closed

If the Liquidity Engine can't execute a conversion within risk parameters, the transaction is declined. We don't execute at bad rates, we don't partial-fill, and we don't leave users in intermediate states. Either the full transaction succeeds or nothing happens.

3. Chain-Agnostic

The architecture doesn't assume any specific chain. We support 9 blockchains today. Adding a new chain is a configuration change, not an architecture change.

4. Progressive Enhancement

Basic features (USDC spending, P2P transfers, bank connection) work with zero crypto knowledge. Advanced features (multi-chain deposits, spend-any-crypto) are available for users who want them. The product grows with the user.