Skip to main content
This is fineNGMI 1.0 PLATFORM RELEASED! •Surprised PikachuNGMI 2.0 BETA 0.8 WAITING LIST OPENS END OF SEPTEMBER 2025 •DogeDECENTRALIZED PREDICTION PLATFORM •Leo laughingMOBILE-FIRST PLATFORM •Roll safeVIEW ROADMAPBaby YodaAR INTEGRATION COMING SOON •Handsome SquidwardJOIN THE COMMUNITY •Salt BaePOWERING ANYBET PROTOCOL

NGMI Technical Architecture: Current State & Future Vision

Executive Summary

This document outlines the technical architecture of the NGMI platform across its evolutionary versions. NGMI 1.0 represents our current production environment, while NGMI 2.0 details our strategic technical evolution currently in development. The platform operates at the intersection of social engagement, prediction markets, and decentralized financial systems, requiring a sophisticated technical approach that balances user experience with blockchain reliability.

Our architecture prioritizes three core principles:

  1. Performance & Reliability: Multi-region deployment with redundancy
  2. Seamless UX: Blockchain integration without crypto complexity
  3. Scalable Infrastructure: Design for 10x growth with minimal architectural changes

NGMI 1.0: Current Production Architecture

Core Technology Stack

ComponentTechnologyJustification
FrontendNext.js (App Router)Optimized rendering paths and SEO benefits
State ManagementZustand + middlewareMinimalist state management with persistence
BackendNode.js microservicesRapid development and extensive ecosystem
DatabasePostgreSQLACID compliance for critical user data
CachingRedisHigh-performance in-memory data store
Media StorageCloudflare R2Cost-effective S3-compatible storage
AuthenticationJWT + Email verificationStandard secure authentication flow
AnalyticsCustom telemetryGDPR-compliant internal metrics system

Infrastructure Implementation

+---------------------+      +---------------------+
| | | |
| Next.js Frontend |------| API Gateway |
| (Vercel) | | (Kong/Nginx) |
| | | |
+---------------------+ +---------+-----------+
|
v
+---------------------+
| |
| Microservices Layer |
| (Node.js) |
| |
+---------+-----------+
|
+------------------+-+-------------+
| | |
v v v
+---------------------+ +----------------+ +---------------------+
| | | | | |
| PostgreSQL DB | | Redis Cache | | Cloudflare R2 |
| (User data) | | (Performance) | | (Media storage) |
| | | | | |
+---------------------+ +----------------+ +---------------------+

Regional Deployment Strategy

NGMI 1.0 operates across three strategically positioned regions:

  • Singapore (APAC): Covers Asia-Pacific users with regional data compliance
  • Frankfurt (EU): Serves European users with GDPR-compliant infrastructure
  • Virginia (US East): Handles North and South American traffic

Each region maintains redundant infrastructure with the following characteristics:

  • N+1 redundancy for all critical components
  • Automatic failover capabilities (15-30 second recovery)
  • Regional data sovereignty compliance
  • Cross-region backup systems

Frontend Deployment (Vercel)

Our Vercel configuration leverages enterprise-grade capabilities to ensure global performance:

Strategic Configuration:

  • Fluid Compute: Enabled for automatic concurrency management and optimal resource allocation
  • Function Regions: Global coverage across North America, Europe, and Asia Pacific (Singapore)
  • Function CPU: Performance tier (1.7 vCPUs/3GB) for mission-critical functions

Technical Advantages:

  1. Global Performance Optimization: Consistent sub-100ms latency for users worldwide through strategic regional deployment
  2. Intelligent Scaling: Fluid Compute automatically adjusts resources based on demand patterns
  3. Enterprise Reliability: Redundant deployments ensure zero single points of failure

Key Optimizations:

  1. Edge functions for authentication and data validation, reducing latency by 40-60%
  2. Middleware integration for security and compliance requirements
  3. Built-in A/B testing infrastructure for continuous experience optimization

Data Flow Architecture

NGMI 1.0 utilizes a streamlined request-response architecture:

  1. Read Operations:

    • Client requests -> API Gateway -> Microservice -> Cache/Database
    • Average latency: 65ms (p95: 150ms)
  2. Write Operations:

    • Client requests -> API Gateway -> Microservice -> Database -> Response
    • Average latency: 120ms (p95: 250ms)

Performance Metrics

Current production performance metrics:

MetricValueTarget
API Response Times65ms avg / 150ms p9550ms avg / 120ms p95
Frontend LoadingFCP: 1.2s / LCP: 2.4sFCP: 0.9s / LCP: 1.8s
Uptime99.95% (30-day)99.99%
Error Rate0.18%<0.1%
Regional Latency Variation35-210ms<100ms across all regions

NGMI 2.0: Technical Evolution

NGMI 2.0 represents a fundamental architectural advancement, integrating blockchain technology as a source of truth while maintaining the seamless UX expected by mainstream users.

Key Architectural Advancements

  1. Blockchain Integration:

    • EVM-compatible nodes in each region
    • Blockchain as the single source of truth for consensus data
    • Database as performance cache with TTL
  2. Performance Optimizations:

    • Critical path services rewritten in Rust (10-50x throughput improvement)
    • Enhanced caching strategies with Redis Cluster
    • Edge function deployment for user-facing APIs
  3. Smart Contract Infrastructure:

    • Factory pattern implementation with minimal proxies (EIP-1167)
    • Optimized gas usage through batched transactions
    • Tiered verification system with oracle integration

System Architecture

+---------------------+      +---------------------+      +---------------------+
| | | | | |
| Frontend |------| Backend API |------| Blockchain |
| (Next.js) | | (Node.js/Rust) | | (EVM Node) |
| | | | | |
+---------------------+ +---------+-----------+ +---------------------+
| ^
v |
+---------------------+ |
| | |
| SQL Database | |
| | |
+---------------------+ |
^ |
| |
v |
+---------------------+ |
| | |
| Cache Service |----------+
| (Redis) |
| |
+---------------------+

Data Flow Principles

  1. Blockchain as Single Source of Truth:

    • All consensus data resides on-chain
    • Database serves as performance cache with TTL
    • Periodic synchronization ensures consistency
    • Blockchain resolution for conflicts
  2. Read Operations:

    Frontend -> REST API -> Cache -> BSC Node
    • All data access through REST API layer
    • Redis cache with 30-60s TTL for performance
    • Background polling updates cache from blockchain
    • SWR/React Query for efficient frontend fetching
  3. Write Operations:

    Frontend -> API -> Smart Contract Transaction -> Blockchain
    | |
    | +---> Transaction Receipt
    |
    +---> Optimistic UI Update + Database Cache
    • All predictions/commitments routed through backend
    • Blockchain transactions (immediate for staked, batched for casual)
    • Optimistic updates for responsive UI feedback
    • Scheduled sync ensures database consistency with blockchain

Smart Contract Architecture

+---------------------+
| |
| Factory Contract |
| |
+----------+----------+
|
| deploys
v
+---------------------+
| |
| Implementation Base |
| |
+----------+----------+
|
| cloned by
v
+---------------------+ +---------------------+
| | | |
| Minimal Proxy #1 | | Minimal Proxy #2 | ...
| | | |
+---------------------+ +---------------------+

Gas Optimization:

  • Factory deploys inexpensive EIP-1167 minimal proxies (~45k gas) instead of full contracts
  • Each market is a separate minimal proxy pointing to the same implementation
  • Implementation contains all logic but no state
  • 85-90% gas savings compared to traditional deployment models

Batch Processing System

To minimize blockchain transaction costs for non-staked predictions:

+------------------+     +------------------+     +------------------+
| | | | | |
| Accumulate user |---->| Group by market |---->| Create batch |
| predictions | | & time | | transactions |
| | | | | |
+------------------+ +------------------+ +------------------+

Batch Parameters:

  • Frequency: Every 5-10 minutes (configurable)
  • Size: Up to 100 predictions per batch
  • Trigger: Time-based OR size threshold
  • Cost reduction: ~95% compared to individual transactions

Authentication & Wallet Integration

+---------------------+     +---------------------+
| | | |
| User Session |---->| Backend Auth API |
| (JWT Tokens) | | |
+---------------------+ +---------+-----------+
|
| validates
v
+---------------------+ +---------------------+
| | | |
| Smart Wallet |---->| Blockchain Address |
| (Account Abstraction) | (Transaction signing)
+---------------------+ +---------------------+

This architecture enables:

  • Standard JWT authentication for casual users
  • Web3 wallet signatures for staked predictions
  • Smart contract wallets for non-crypto users
  • Transparent signing of blockchain transactions

Regional Infrastructure Expansion

NGMI 2.0 will expand our regional footprint:

Phase 1 (Launch):

  • Singapore (APAC)
  • Frankfurt (EU)
  • Virginia (US East)

Phase 2 (3-6 months post-launch):

  • São Paulo (LATAM)
  • Tokyo (Japan)

Phase 3 (6-12 months post-launch):

  • Mumbai (India)
  • Sydney (Australia)
  • Optional: Middle East region based on regulatory clarity

Each region will include:

  • Frontend deployment (Vercel with appropriate regional settings)
  • Backend services (Kubernetes cluster)
  • Database instances (PostgreSQL with regional replication)
  • Blockchain node (EVM-compatible)
  • Redis cache cluster

Technical Infrastructure

Enterprise Server Configuration (Per Region):

  • Servers: Strategic cluster of high-performance OVHcloud Advance AMD EPYC servers
  • Processor: AMD EPYC 4344P - 8 cores / 16 threads with 5.3 GHz max boost frequency
  • Memory: 128 GB DDR5 ECC On-Die memory for blockchain operation security
  • Storage: 4 x 7.68 TB SSD NVMe in configurable RAID arrangements
  • Network: Multi-tiered networking with 5 Gbps public and 25 Gbps guaranteed private bandwidth
  • Locations: Strategic global presence across North America, Europe, Asia Pacific
  • Cost-Efficiency: Optimized TCO with enterprise-grade performance

Infrastructure Advantages:

  1. Purpose-Optimized Processing Power:

    • High-frequency AMD EPYC processors (5.3 GHz boost) for optimal EVM node performance
    • Strategic thread allocation for blockchain consensus operations
    • Dedicated resources for transaction processing and validation
  2. Memory Configuration:

    • DDR5 ECC On-Die memory provides protection against bit errors in critical blockchain data
    • Memory capacity optimized for EVM node requirements and caching operations
    • Tiered memory allocation for prioritizing blockchain operations
  3. Storage Architecture:

    • NVMe SSD storage array for exceptional I/O performance (10x traditional SSD)
    • Configurable RAID implementation for flexible data protection strategies
    • Dedicated volumes for blockchain data, ensuring isolation and performance
  4. Networking Excellence:

    • 25 Gbps private network enabling efficient inter-service communication
    • Multi-gigabit public connectivity for global user access
    • Segregated network planes for security and performance optimization

Scaling Strategy:

  • Horizontal scaling through cluster expansion
  • Redis cache distribution for read performance
  • API server load balancing with automated scaling
  • Database read replicas for analytical queries
  • Transaction optimization through intelligent batching

Development Roadmap

NGMI 2.0 Implementation Timeline

PhaseTimelineKey DeliverablesTechnical Focus
FoundationMonths 1-3Core infrastructure, base architectureKubernetes setup, database schema, smart contracts
Core FeaturesMonths 3-5Multi-dimensional modes, enhanced UIMode system, wallet integration, UI components
Blockchain IntegrationMonths 5-7Smart contract deployment, transaction processingContract testing, gas optimization, security audits
Scaling & OptimizationMonths 7-9Performance enhancements, regional expansionCaching strategies, batch processing, monitoring
Launch PreparationMonths 9-10Final testing, security audits, documentationLoad testing, penetration testing, disaster recovery

Ongoing Optimization Initiatives

  1. Performance Enhancement Program:

    • Continuous latency reduction across global regions
    • Optimization of blockchain synchronization processes
    • Memory usage profiling and optimization
  2. Resilience Strengthening:

    • Enhanced redundancy implementation across all tiers
    • Disaster recovery simulation and validation
    • Automated failover testing and validation
  3. Technical Debt Prevention:

    • Proactive code quality measurement and improvement
    • Systematic dependency management and updating
    • Regular architecture review and refinement
  4. Future-Proofing Strategy:

    • Layer 2 scaling solution evaluation and integration planning
    • Advanced containerization implementation
    • Serverless function expansion for appropriate workloads

Conclusion

The NGMI technical architecture represents a sophisticated approach to combining traditional web technologies with blockchain capabilities. The current production system (NGMI 1.0) provides a solid foundation, while NGMI 2.0 will introduce transformative changes that enhance functionality without sacrificing user experience.

Our deliberate regional deployment strategy ensures global coverage while navigating the complex regulatory landscape of prediction markets. The blockchain integration approach balances decentralization benefits with performance requirements, creating a unique platform positioned at the intersection of web2 and web3 technologies.

Our forward-looking infrastructure planning ensures consistent performance across all regions. The phased implementation approach enables systematic growth while maintaining platform stability and reliability through each evolutionary stage.


This document represents the current technical architecture as of April 2025 and is subject to refinement as development progresses.