Skip to main content

17 · TECHNICAL ARCHITECTURE

Multi-EVM · Microservices · AWS Cloud · Card On-Ramp · Single Vault · Bridges · DEX Aggregator · Safe{Wallet} · CI/CD · Monitoring Scalability to 10M users

⚠️ Architecture supports yield distribution infrastructure. Target Yield is not a guarantee — actual yield depends on DeFi market conditions.


1. Architectural Overview

┌──────────────────────────────────────────────────────────────────┐
│ CLIENT LAYER │
│ ┌────────────────┐ ┌──────────────────┐ ┌───────────────┐ │
│ │ Mobile App │ │ Web Dashboard │ │ Admin Panel │ │
│ │ (RN / Swift / │ │ (React 18 + TS) │ │ (React 18) │ │
│ │ Kotlin) │ │ │ │ │ │
│ └───────┬────────┘ └────────┬─────────┘ └───────┬───────┘ │
│ └───────────────────┬┴───────────────────┘ │
│ │ HTTPS / WSS │
├─────────────────────────────┼────────────────────────────────────┤
│ ▼ │
│ API GATEWAY (Kong) │
│ Rate limiting · Auth · Routing │
├──────────────────────────────────────────────────────────────────┤
│ MICROSERVICES LAYER │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Auth │◄─gRPC─►│ WVI │◄─gRPC─►│ Yield │◄─gRPC─►│ Partner │
│ │ Service │ │ Service │ │ Service │ │ Service │ │
│ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ AI │ │ Notif. │ │Bracelet │ │ Bridge │ │
│ │ Service │ │ Service │ │ Service │ │ Service │ │
│ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │
│ ┌──────────┐ ┌──────────┐ │
│ │ On-Ramp │ │ Content │ │
│ │ Service │ │ Service │ │
│ └──────────┘ └──────────┘ │
│ *** All inter-service calls — gRPC/Protobuf *** │
│ *** REST/JSON — only at API Gateway level *** │
├──────────────────────────────────────────────────────────────────┤
│ BLOCKCHAIN LAYER (MULTI-EVM) │
│ EVM: Ethereum · Polygon · BSC · Arbitrum · Optimism · Base · Av.│
│ + Tron (TRC-20 USDT/USDC) + Solana (SPL USDC) │
│ Safe{Wallet} + ERC-4337 · WellexVault (ERC-4626) · Chainlink │
│ LayerZero / Across (bridges) · 1inch / 0x / ParaSwap (DEX agg.) │
├──────────────────────────────────────────────────────────────────┤
│ ON-RAMP / OFF-RAMP LAYER │
│ Fiat on-ramp (bank card, local methods) → USDC/USDT │
│ Off-ramp / Payout to card (local methods by region) │
├──────────────────────────────────────────────────────────────────┤
│ AI LAYER │
│ AI Coach (on-device + cloud) · Wallet Agent · Insurance Agent │
├──────────────────────────────────────────────────────────────────┤
│ DATA LAYER │
│ PostgreSQL · Redis · S3 · IPFS · TimescaleDB │
└──────────────────────────────────────────────────────────────────┘

2. Multi-EVM Blockchain Architecture

2.1 Supported Networks

NetworkChain IDPriorityPurpose
Ethereum1🔴 PrimaryPrimary vault, maximum DeFi liquidity
Polygon PoS137🔴 PrimaryLow gas fees, mass transactions
Arbitrum One42161🟡 SecondaryL2 with high DeFi liquidity
Optimism10🟡 SecondaryL2, Superchain ecosystem
Base8453🟡 SecondaryCoinbase L2, fiat on-ramp
BSC56🟡 SecondaryAsian markets, low gas
Avalanche C-Chain43114🟢 TertiaryDeFi ecosystem, institutional tools
Tron🟡 SecondaryTRC-20 USDT/USDC, wide adoption in Asia
Solana🟡 SecondarySPL USDC, low fees, fast transactions

2.2 Single WellexVault per Network

Each supported EVM network deploys one WellexVault (ERC-4626). No three tranches (Conservative/Balanced/Aggressive) — single vault with WVI-based yield.

User Deposit (USDC/USDT)

├── [On-Ramp] → Fiat → USDC on target chain
├── [DEX Swap] → 1inch/0x/ParaSwap → USDC (if other token)
└── [Direct] → USDC/USDT transfer


┌─────────────────────────┐
│ WellexVault (ERC-4626) │ ← one vault per network
│ Deposit → shares (wUSDC)│
│ WVI → Monthly Yield │
└───────────┬─────────────┘

┌─────────┴─────────┐
▼ ▼
DeFi Strategies Cross-chain
(Aave, Compound, Liquidity
Curve, Ondo) (LayerZero/Across)

2.3 Smart Contract Architecture

ContractStandardPurposeDeployment
WellexVaultERC-4626 + UUPS ProxySingle vault — deposit, shares, yieldEach network
StrategyManagerOwnable2StepDeFi allocation management, 6h timelockEach network
YieldDistributorCustomWeekly yield distribution by WVIEach network
WellnessOracleChainlink-styleWVI on-chain (monthly)Each network
ProtectionReserveCustomInsurance poolEthereum (primary)
WithdrawalQueueCustomQueue when liquidity is lowEach network
BridgeRouterCustomCross-chain routingEach network

2.4 Safe{Wallet} + ERC-4337 (Account Abstraction)

Each user receives a Smart Account based on Safe{Wallet} with ERC-4337 support:

ComponentTechnologyPurpose
Smart AccountSafe{Wallet} (ERC-4337)User wallet, gasless tx
PaymasterWellex PaymasterPay gas for user (USDC)
RecoverySafe Social Recovery ModuleRecovery via email + guardian

Benefits:

  • User does not see blockchain — gasless, no seed phrase
  • Transaction batching (deposit + stake = 1 UserOp)
  • Social recovery (email + guardian) instead of seed phrase
  • Multi-chain: one Safe per network, unified UI

3. On-Ramp / Off-Ramp Architecture

3.1 Providers (Internal — do not disclose publicly)

⚠️ Providers are internal information. In public materials use only "on-ramp", "off-ramp".

ProviderRegionsMethodsFeePriority
Provider A160+ countriesCard, Apple Pay, SEPA, PIX1–3.5%Primary
Provider B170+ countriesCard, Apple Pay, SEPA, bank transfer1–5%Secondary
Provider CEU, UK, USCard, Apple Pay, Open Banking0.5–2.9%Tertiary

3.2 On-Ramp Flow

1. User taps "Top Up" in WEB Dashboard
2. Selects method: 💳 Card / 🍎 Apple Pay / 🏦 SEPA / 📱 PIX
3. Aggregator selects best provider (price + availability by region)
4. KYC verification (if required):
- Tier 1: up to $500/month — no KYC (or minimal)
- Tier 2: up to $5K/month — full KYC (ID + selfie)
- Tier 3: $5K+ — enhanced due diligence
5. On-ramp provider converts fiat → USDC on selected network
6. USDC arrives to user's Safe{Wallet}
7. Auto-deposit to WellexVault (if enabled)

3.3 Fallback Logic

if (provider_A.available && provider_A.fee < threshold):
use provider_A
elif (provider_B.available):
use provider_B
else:
use provider_C

Aggregation: best-rate routing between providers depending on region, currency and amount.


4. DEX Aggregator Integration

4.1 Providers

AggregatorAPIPurpose
1inchFusion API v2Primary swap router — best routes
0xSwap API v2Fallback + RFQ liquidity
ParaSwapAugustus v6Tertiary, multi-path routing

4.2 Swap Flow

If user deposits a token other than USDC/USDT:

User deposits ETH/WBTC/DAI/etc.
→ DEX Aggregator (1inch → 0x → ParaSwap fallback)
→ Auto-swap to USDC
→ Deposit to WellexVault

Slippage protection: max 0.5% for stablecoins, max 1% for volatile tokens.


5. Cross-Chain Bridge Architecture

5.1 Bridge Providers

BridgeModelSpeedSecurity
LayerZeroMessage passing (OApp v2)1–10 minULN + DVN validation
AcrossOptimistic + Relayer2–15 minUMA optimistic oracle

5.2 Cross-Chain Deposit Flow

User has USDC on Arbitrum
→ wants to deposit to Ethereum WellexVault
→ BridgeRouter selects best route:
- LayerZero: if amount < $50K (faster)
- Across: if amount ≥ $50K (deeper liquidity)
→ USDC arrives on Ethereum
→ Auto-deposit to WellexVault

5.3 Cross-Chain Liquidity Rebalancing

AI Wallet Agent can move liquidity between networks to optimize yield:

If Ethereum Aave yield > Polygon Aave yield by >2%:
→ Move X% of Polygon TVL to Ethereum via LayerZero
→ Rebalance daily (batch, gas-optimized)


6. Microservices Architecture

6.1 Service Catalog

ServiceLanguageFrameworkResponsibilityReplicas
auth-servicePython 3.12FastAPIRegistration, JWT, OAuth, 2FA, Safe{Wallet}3
wvi-servicePython 3.12FastAPIWVI calculation, history, forecast5
yield-servicePython 3.12FastAPIDeposit, withdraw, yield distribution3
partner-servicePython 3.12FastAPIReferrals, tree, earnings, levels3
ai-servicePython 3.12FastAPI + TorchServeML inference, recommendations4 (GPU)
notification-serviceNode.js 20NestJSPush (Firebase), email, in-app2
bracelet-servicePython 3.12FastAPIBLE sync, firmware OTA, data ingestion3
blockchain-serviceTypeScriptNestJS + Ethers.js v6Multi-chain operations, vault mgmt3
bridge-serviceTypeScriptNestJSLayerZero/Across bridge operations2
onramp-servicePython 3.12FastAPIOn-ramp/off-ramp provider aggregation2
content-servicePython 3.12FastAPIAI content gen, promo materials2
admin-servicePython 3.12FastAPIUser mgmt, stats, fraud, config2

6.2 Inter-Service Communication Principle

All internal calls — gRPC with Protocol Buffers. REST/JSON — only at API Gateway level for external clients.

 EXTERNAL CLIENTS
Mobile App · Web Dashboard · Admin Panel
│ │ │
└────────────┼────────────┘
│ REST/JSON + WebSocket (HTTPS/WSS)

┌──────────────────┐
│ API Gateway │ ← single REST entry point
│ (Kong) │
└────────┬─────────┘
│ gRPC (Protobuf)
┌───────────┼──────────────┐
▼ ▼ ▼
┌────────┐ ┌────────┐ ┌────────┐
│ Auth │ │ WVI │ │ Yield │ ...
│Service │◄─gRPC──►│Service │◄─gRPC──►│Service │
└────────┘ └────────┘ └────────┘

7. Data Layer

7.1 Storage

StoragePurposeScaling
PostgreSQL 16Users, accounts, subscriptions, partner treeRead replicas + pgBouncer
TimescaleDBBiometrics, WVI time series, yield historyHypertables, compression
Redis 7Sessions, cache, feature store, rate limitingCluster mode
S3Media, AI models, backupsCDN + lifecycle
IPFSNFT metadata, insurance policiesPinning service

7.2 Blockchain Data Indexing

NetworkIndexerData
All EVM chainsThe Graph (subgraphs)Deposits, withdrawals, vault shares, yield events
All EVM chainsCustom indexer (Rust)Real-time TVL, user balances, bridge events

8. Security Architecture

8.1 Smart Contract Security

LevelMechanism
AuditTrail of Bits + OpenZeppelin (before launch + each upgrade)
Bug BountyImmunefi — $250K+ max payout
MonitoringForta Agent Network (real-time)
MultisigSafe 3-of-5 for upgrades + 48h timelock
Circuit BreakerAuto-pause when TVL drop >20% in 24h
Rate LimitsMax 5% TVL/h, 15%/day, 40%/week withdrawals

8.2 Bridge Security

MechanismDescription
Amount limitsMax $100K per bridge tx, daily cap per user
Dual validationLayerZero DVN + internal verification
MonitoringReal-time bridge monitoring (Forta + custom)
Emergency pauseBridge pause multisig (2-of-3, instant)

8.3 On-Ramp Security

MechanismDescription
Provider KYCOn-ramp provider performs KYC
Fraud detectionProviders + internal fraud scoring
Transaction limitsTier-based limits ($500 / $5K / custom)
Chargeback protection7-day hold for card payments >$1K

9. Infrastructure & DevOps

9.1 Cloud Architecture (AWS)

ComponentServiceRegion
ComputeEKS (Kubernetes)eu-west-1 + me-south-1
DatabaseRDS PostgreSQL + ElastiCache RedisMulti-AZ
StorageS3 + CloudFrontGlobal CDN
MonitoringCloudWatch + Grafana + PrometheusCentral
CI/CDGitHub Actions → ECR → EKSAutomated

9.2 Multi-Region

RegionPurpose
eu-west-1 (Ireland)Primary — EU users, MiCA compliance
me-south-1 (Bahrain)Secondary — MENA, Dubai users
ap-southeast-1 (Singapore)Phase 2 — SEA expansion

10. Monitoring & Observability

ToolPurpose
Grafana + PrometheusService metrics, SLA dashboards
FortaOn-chain monitoring (vault, bridge, exploit detection)
SentryError tracking (frontend + backend)
PagerDutyAlerting + incident management
TenderlyTransaction simulation + debugging
Dune AnalyticsPublic on-chain dashboards

11. Technology Stack — Summary

ComponentTechnology
Mobile (APP)SwiftUI (iOS) + Kotlin/Jetpack Compose (Android)
Web (WEB)React 18 + TypeScript + Vite
BackendFastAPI (Python 3.12) + NestJS (TypeScript)
DatabasePostgreSQL 16 + TimescaleDB + Redis 7
BlockchainSolidity 0.8.x, Ethers.js v6, ERC-4626, ERC-4337
Smart WalletSafe{Wallet} + Safe Protocol Kit
DEX Aggregator1inch Fusion API + 0x Swap API + ParaSwap Augustus
BridgesLayerZero OApp v2 + Across Bridge SDK
On-Ramp/Off-RampProvider SDK (aggregator, internal detail)
KeeperGelato Web3 Functions (auto-compound, rebalance)
OracleChainlink (price feeds, PoR) + custom WVI Oracle
AuthJWT + OAuth 2.0 + EIP-4361 (SIWE) + ERC-4337
KYCSumsub SDK
PushFCM + APNs
EmailSendGrid
CI/CDGitHub Actions + Docker + Kubernetes (EKS)
MonitoringGrafana + Prometheus + Forta + Sentry + Tenderly

→ Related documents: 06_YIELD_PROTOCOL.md (vault mechanics) · 22_PLATFORM_PROTECTION.md (insurance) · 25_TECH_REQUIREMENTS.md (specification)

Wellex © 2026 · Confidential