How etherspot/arka works
Main Components Identification
The system consists of three major components:
• Admin Frontend (React-based dashboard)
• User Frontend (React-based interface)
• Backend Service (Node.js with PostgreSQL)
• Indexer Service (for blockchain data)
Key Architectural Elements
a) Frontend Layer:
• Admin Dashboard (port 3002)
• API Key Management
• Network Configuration
• ERC20 Paymaster Management
• System Configuration
• User Frontend (port 3000)
• Transaction Sponsorship Interface
• Wallet Connection
• Transaction Management
b) Backend Layer (port 5050):
• API Services
• Paymaster Routes
• Admin Routes
• Whitelist Routes
• Sponsorship Policy Routes
• Deposit Routes
• Database Integration
• Blockchain Integration
• Indexer Service
c) Data Layer:
• PostgreSQL Database
• API Keys
• Arka Configuration
• Sponsorship Policies
• Whitelists
• Contract Whitelists
d) Blockchain Integration:
• Smart Contracts
• ERC20 Paymaster
• Verifying Paymaster
• Multi-token Paymaster
• Oracle Integration
• Chainlink
• Pyth
• Orochi
[User/Admin Browsers] → [Load Balancer/Reverse Proxy]
• ↓
[Frontend Layer] → [Admin Frontend (3002)]
• → [User Frontend (3000)]
• ↓
[Backend Layer (5050)] → [API Services]
• → [Business Logic]
• → [Blockchain Services]
• ↓
[Data Layer] → [PostgreSQL]
• → [Indexer Service]
• ↓
[Blockchain Layer] → [Smart Contracts]
• → [Oracles]
Important Flows to Highlight
• User Transaction Flow:
• Transaction Request → Frontend → Backend → Smart Contract
• Sponsorship Verification Flow
• Payment Processing Flow
• Admin Management Flow:
• Configuration Management
• API Key Management
• Network Management
Additional Elements
• Security Layer (HMAC authentication)
• Cron Jobs for Price Updates
• Webhook Integration
• Docker Container Boundaries
• Network Isolation