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
- Fiat Rails 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.
| Capability | What It Does |
|---|---|
| Fiat Conversion | Converts between fiat and stablecoins via ACH (live), PIX (live), SPEI (rolling out), CVU (rolling out). Expanding via multi-provider LATAM strategy. |
| Multi-Chain Settlement | 9 blockchains supported natively โ deposits detected automatically, conversions handled server-side |
| Virtual Accounts | USD deposit accounts via Bridge |
| Card Settlement | Visa card transactions settle with zero FX markup and no cross-border fees |
| KYC/KYB | Identity verification, sanctions screening, and ongoing compliance monitoring built into the platform |
| Transfer Lifecycle | Deterministic 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โ
| Store | Purpose | Technology |
|---|---|---|
| User data | Accounts, KYC status, settings | Supabase (PostgreSQL) |
| Transaction history | Card txns, P2P transfers, bank transfers | Supabase + card issuer + payment infrastructure |
| On-chain state | Balances, token positions | Direct RPC queries |
| Session/auth | User sessions, tokens | Privy |
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.