Technical Architecture

Technical Auditors

Architecture Overview

JIL Sovereign is a multi-jurisdictional, horizontally-scalable L1 infrastructure. The wallet layer consists of a Next.js 14 frontend and Express.js backend, backed by PostgreSQL, Redis, and Kafka - deployed across 80+ microservices spanning Switzerland, Singapore, ADGM, and the United States.

L1 System Topology

Cloudflare EdgeGLOBAL
TLS TerminationCDNDDoS ProtectionTunnel Ingress
cloudflared tunnel
Multi-Jurisdiction Deployment
CH
SwitzerlandLedger Primary
ledger-service (x5)
ledger-compliance (x3)
policy-registry (x2)
consent-ledger (x3)
proof-bulletin (x2)
tx-sink (x2)
SG
SingaporeValidator Node
validator-node
mpc-cosigner (1 shard)
guardian-attestor (x2)
wallet-api (x3)
AE
ADGMValidator Node
validator-node
mpc-cosigner (1 shard)
guardian-attestor (x2)
wallet-api (x3)
US
United StatesValidator Node
validator-node
mpc-cosigner (1 shard)
guardian-attestor (x2)
wallet-api (x3)
Global Mesh
Kafka (RedPanda)
Cross-region async messaging
PostgreSQL 16
Primary + read replicas
Redis
Session cache per region
Monitoring
OpenTelemetry + Prometheus
All cross-region traffic: mTLS + Kafka async + gRPC with circuit breakers
Disaster Recovery

Hot standby ledger (secondary), automated failover, cross-region Kafka replication. MPC quorum survives loss of any single jurisdiction (3-of-4 threshold).

Wallet Service Topology

How the wallet frontend and backend connect to the L1 infrastructure.

User Browser
Cloudflare Edge
wallet-ui :3000
wallet-api :8082
wallet-api downstream services
ledger-service:8001
mpc-cosigner:8120
bridge-relayer:8150
market-state:8561
consent-ledger:8410
proof-verifier:8250
guardian-attestor:8140
fraud-firewall:8097
PostgreSQL:5432
Redis:6379
Kafka:9092

Service Tiers

80+ services organized into five deployment tiers across jurisdictions.

Ledger TierSwitzerland (Primary)
5 services
ServicePortPurposeStatus
ledger-service8001Account balances, transaction ledgerActive
ledger-router8000Ledger API gateway and load balancingActive
ledger-compliance8098Transaction policy enforcementActive
policy-registry8099Compliance rules storageActive
tx-sink8091Kafka consumer, database syncActive
Validator TierMulti-Jurisdiction (CH, SG, ADGM, USA)
4 services
ServicePortPurposeStatus
mpc-cosigner8120Multi-party computation key signingActive
guardian-attestor8140Recovery attestation verificationActive
recovery-ceremony8130Account recovery coordinationActive
solvency-attestor8480On-chain reserve proofsActive
API TierGlobal (All Regions)
5 services
ServicePortPurposeStatus
wallet-api8082User-facing wallet operationsActive
explorer-api8070Block explorer APIActive
proof-gateway8260Selective disclosure proofsActive
settlement-router8500Settlement transaction routingActive
ramps-api8550Fiat on/off rampPlanned
Compliance TierPer-Jurisdiction
5 services
ServicePortPurposeStatus
consent-ledger8410User consent records (GDPR)Active
consent-killswitch8425Emergency consent revocationActive
fraud-firewall8097Transaction screeningActive
compliance-api8100Regulatory compliance checksPlanned
kyc-service8112Identity verification (KYC/KYB)Planned
Bridge & Market TierGlobal
5 services
ServicePortPurposeStatus
bridge-relayer8150Ethereum bridge relayActive
proof-verifier8250Bridge proof verificationActive
market-state (DEX v5)8561Oracle prices, market dataActive
execution-router8562Trade execution routingActive
dex-order-manager8563Order book managementActive

Token Flow

How assets move from Ethereum into JIL Wallet through the bridge infrastructure.

1
Ethereum

User initiates deposit on Ethereum mainnet

2
JILBridge Contract

Funds locked in bridge smart contract (14-of-20 threshold)

3
bridge-relayer

Relayer detects deposit event on-chain

4
proof-verifier

Verifies inclusion proof across validator quorum

5
ledger-service

Credits user account on JIL L1 ledger

6
Wallet Balance

Wrapped asset (jETH, jUSDC, etc.) appears in wallet

Asset Wrapping Flow

How unsecured base tokens are wrapped into JIL-protected assets via Secure Assets.

1
Unsecured Asset

Base token (BTC, ETH, USDC) from ACH purchase or vesting release

2
wallet-api

User confirms wrapping via Secure Assets page (0.50% fee)

3
bridge-relayer

Burns base token, mints JIL-protected wrapper (wBTC-JIL, wETH-JIL)

4
wallet_audit_log

Wrap event logged to immutable audit trail

5
Secured Balance

Protected asset with MPC key sharding and coverage eligibility

Data Flow

Event-driven messaging pipeline across the system.

wallet-api
Kafka (RedPanda)
ledger-producer
ledger-service

Events Published

TransactionsBalance ChangesBridge EventsAsset WrappingConsent UpdatesCompliance ChecksAudit Logs

Database Schema

Key PostgreSQL 16 tables used by wallet-api.

users
Account data, auth credentials, KYC status
wallets
Wallet addresses, key shards
transactions
Transaction history, status tracking
bridge_deposits
Bridge imports and asset wrapping events
billing_invoices
Subscription billing
protection_policies
Coverage tier tracking
wallet_audit_log
Immutable audit trail (all user actions)

Deployment Model

DevNet / Portal

Hetzner CPX62 - 16 vCPU, 32GB RAM, 640GB NVMe. Runs 172 services via Docker Compose.

Production
TestNet / Sandbox

Hetzner CPX42 - 8 vCPU, 16GB RAM. POC demos and pre-release testing.

Staging
JILHQ

Hetzner CPX52. Fleet controller, image registry, and deployment orchestration.

Control Plane
Secure Ingress

Cloudflare Tunnel for secure ingress - no ports exposed directly. TLS terminated at Cloudflare edge before reaching origin.

Cryptographic Security

MPC threshold signing (3-of-4 quorum), 14-of-20 bridge validators, mTLS between services, post-quantum algorithms (Kyber/Dilithium) ready.

Deployment Pipeline

docker build
docker save | ssh docker load
docker compose up -d --force-recreate
Cloudflare cache purge
Health check (HTTP 200)

Technology Stack

LayerTechnology
FrontendNext.js 14, Tailwind CSS, Zustand, TypeScript
BackendExpress.js, Pino, Zod
DatabasePostgreSQL 16
CacheRedis
MessagingKafka (RedPanda)
AuthJWT, WebAuthn, OAuth, TOTP
Bridgeethers.js, WalletConnect
CryptographyMPC threshold signing, post-quantum ready (Kyber/Dilithium)
i18n12 languages, RTL support (Arabic, Hebrew)

Architecture documentation for JIL Sovereign L1 - Last updated March 2026