System Architecture & Alpha Engine
ROBINDUDES operates on a hybrid architecture combining high-throughput off-chain simulation with immutable on-chain settlement. This architecture delivers zero-latency trading without gas overhead during the week, while maintaining verifiable, trust-minimized reward distributions.
1. Component Architecture
[1. CLIENT LAYER]
Next.js Web ApplicationWallet integration (wagmi/viem), live trading terminal, real-time WebSocket charts, and TBA backpack inspection.
[2. CORE API / BFF]
Backend-for-Frontend (NestJS)Read-optimized API gateway serving cached indexer data, leaderboard snapshots, and authenticated trading actions.
[3. ALPHA ENGINE]
Institutional Flow Abstraction MicroserviceThe isolated proxy responsible for ingesting smart money analytics, transforming them into generic schemas, and serving cached signals.
[4. SIMULATION ENGINE]
Trading & Portfolio EngineProcesses instant market fills, monitors 25% maintenance margin thresholds, and computes real-time mark-to-market equity.
[5. SETTLEMENT KEEPER]
Automated Settlement WorkerMonitors on-chain epoch end timestamps, compiles audited ranking proofs, and signs settlement transactions.
[6. ON-CHAIN INDEXER]
EVM Event SynchronizerListens to smart contract events (
WeeklySettlementSubmitted, PrizePaid, SkillLevelUp) and updates PostgreSQL & Redis.2. The Alpha Engine (Vendor Abstraction Layer)
The Signal Layer skill provides players with institutional-grade intelligence on smart-money accumulation. To protect proprietary internal data flows and vendor ToS:
| Security Rule | Implementation Strategy |
|---|---|
| Single Point of Contact | The Alpha Engine is the only service with network access and API keys to external analytics providers. No client or external worker can reach upstream vendors directly. |
| Ingestion Genericization | Data is sanitized upon arrival into generic internal schemas (e.g. SignalStrength: LOW | MEDIUM | HIGH, FlowDirection: ACCUMULATION | DISTRIBUTION) before caching. |
| Cache-First Model | Data is refreshed on scheduled cron intervals (every 15–30 minutes) for watched asset pools, serving thousands of concurrent players from Redis with zero vendor rate-limit pressure. |
| Zero Data Leakage | Vendor identities, raw payloads, exact timestamps, and error traces are strictly filtered from public APIs, UI bundles, and on-chain metadata. |
3. Trust-Minimized Settlement & Proofs
ROBINDUDES implements an off-chain compute, on-chain settle model:
- Epoch Completion: When
block.timestamp >= epochEndTime(weekId), the backend finalizes the leaderboard ranking using the multi-sample snapshot average. - Audit Root Creation: The complete weekly result dataset (all participant scores, trades, and valuations) is compiled and serialized into a JSON artifact.
- Cryptographic Hashing:
resultsHash = keccak256(canonicalResultsJSON) - On-Chain Submission: The Settlement Keeper calls
WeeklySettlement.submitWeeklyRewards, passing the winnertokenIds, theresultsHash, and a publicresultsURI(e.g. IPFS/Arweave). - Public Verifiability: Anyone can fetch the off-chain dataset, calculate the Keccak256 hash independently, and verify it against the immutable on-chain record.
4. State Synchronization Flow
The indexer service maintains real-time parity between on-chain contract events and the database:
Minted: Creates a new NFT record and registers its counterfactual TBA address.CompetitionEntered: Updates active tier participants and adjusts current prize pool balances.WeeklySettlementSubmitted: Marks the competition epoch as settled and enables reward claims for tier champions.WeeklyPrizePoolSettled: Records winner payout distributions and updates wallet prize histories.SkillRerolled: Updates the NFT's active abilities in indexer caches.
Next: REST & WebSocket Developer API ReferenceExplore public endpoints, schemas, headers, and real-time streaming sockets.
VIEW API REFERENCE →