Skip to content

About

Our AI-Powered Trading Platform leverages machine learning, historical & real-time market data, and news sentiment analysis to deliver automated trading recommendations (BUY, SELL, HOLD).

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

QuantumPool: AI-Powered Decentralized Crypto Investment Platform

License: MIT Python Next.js FastAPI MongoDB

🚀 Introduction

QuantumPool is an innovative decentralized investment platform that democratizes access to sophisticated cryptocurrency trading strategies through artificial intelligence and machine learning. Users pool capital into shared vehicles leveraging algorithmic trading, sentiment analysis, and predictive modeling for multi-asset returns (e.g., ETH, BNB, SOL).

Developed by Dapp Mentors (founded 2022; 5,500+ developers mentored across Ethereum, Solana, Alephium, ICP; backed by Sia/Dfinity grants), it features transparent proportional ownership, real-time analytics, and robust risk management. Simulations show 19-59% returns over 30 days (Sep-Oct 2025) vs. buy-and-hold benchmarks.

This is the full production-ready codebase (PoC stage). For the whitepaper, visit trader.dappmentors.org/whitepaper. Seeking $1.5M for scaling, compliance, and profitability in 18-24 months.

Core Differentiators:

  • AI Trading: Multi-signal synthesis (TA + ML + Sentiment + LLM).
  • Pooling: Fair profit/loss sharing via ownership % = (Net Investment / Total Net) × 100.
  • Low Fees: 0.05% trading/withdrawal; 15% performance above 10% benchmark.
  • Security: OAuth/JWT, atomic MongoDB ops, no custody.

Live demo: trader.dappmentors.org. Join our community for updates!

✨ Key Features

  • Automated Trading Bot: CoinTrader lifecycle (Data Collection → Analysis → Decision → Execution) with Random Forest ML (100 trees, 80/20 split), Ollama LLM reasoning, and TA indicators (EMA-20, RSI-14, MACD).
  • Capital Management: Singleton CapitalManager for thread-safe tracking of deposits, withdrawals, positions, and proportional gains (Realized: (Sell - Buy) × Qty - Fees; Unrealized: (Current - Cost) × Holdings).
  • Risk Controls: ATR trailing stops (Stop = Entry - 2×ATR), volatility-adapted sizing (40-80% capital), tiered profit-taking (1-7%), 15-min cool-downs.
  • Dashboard: Real-time portfolio views, charts (Recharts), modals for deposits/withdrawals.
  • Scheduler: APScheduler for daily coin extraction, 4-hr news analysis, trade execution.
  • Integrations: CoinGecko for data, Google OAuth for auth, MongoDB for state.

📊 Simulated Performance (Sep 15 - Oct 15, 2025)

Our multi-signal strategy outperformed benchmarks across assets. Extended backtests (2020-2025) yield ~22% annualized returns.

Asset Initial Investment Total Return Buy-and-Hold Sharpe Ratio Max Drawdown Win Rate
ETH $12,000 57.36% -9% 2.1 -15.4% 62%
BNB $17,000 58.87% +30.3% 2.1 -4.2% 68%
SOL $11,000 19.1% -16.2% 1.2 -23.5% N/A

For visuals, see backtest notebooks in /backend/testers/.

{
  "type": "bar",
  "data": {
    "labels": ["ETH", "BNB", "SOL"],
    "datasets": [
      {
        "label": "Strategy Return",
        "data": [57.36, 58.87, 19.1],
        "backgroundColor": "#10B981"
      },
      {
        "label": "Buy-and-Hold",
        "data": [-9, 30.3, -16.2],
        "backgroundColor": "#EF4444"
      }
    ]
  },
  "options": {
    "responsive": true,
    "plugins": {
      "title": { "display": true, "text": "30-Day Returns vs. Benchmark" }
    },
    "scales": {
      "y": { "beginAtZero": true }
    }
  }
}

🏗️ Architecture Overview

Full-stack app with Python backend and Next.js frontend.

  • Backend (FastAPI/Python 3.11+): REST APIs, APScheduler jobs, Scikit-learn/Ollama ML.
  • Frontend (Next.js 14/React 18/TypeScript): Tailwind CSS, Recharts for UI/UX.
  • DB: MongoDB (Collections: Users, Trading State, Profit Snapshots).
  • Infra: Docker, Nginx; planned: Redis/Celery for scaling.
graph TD
    A[Frontend: Dashboard/Modals] --> B[API: /auth/login, /coin/top_coins]
    B --> C[CapitalManager: Ownership Calc]
    C --> D[CoinTrader: ML/Sentiment Analysis]
    D --> E[MongoDB: Positions/Snapshots]
    F[External: CoinGecko/News] -.-> D
    G[Scheduler: Daily Jobs] --> D
Loading

Key Endpoints:

Category Endpoint Description
Auth POST /auth/login Google OAuth JWT
Coin Info GET /coin/top_coins?limit=N Top cryptocurrencies
Investment POST /investment/deposit Deposit funds
Wallet POST /wallet/add Add address

See /backend/app/main.py and /docs/api.md for full specs.

🛠️ Getting Started

Prerequisites

  • Node.js 18+ (frontend).
  • Python 3.11+ (backend).
  • MongoDB 7.0+ (local or Atlas).
  • Docker (optional, for full stack).

Installation

  1. Clone the repo:

    git clone https://github.com/yourusername/ai_trader_bot.git
    cd ai_trader_bot
  2. Backend Setup:

    cd backend
    pip install -r requirements.txt  # FastAPI, Scikit-learn, Ollama, etc.
    # Start MongoDB (e.g., mongod)
    python run_dev.py  # API at http://localhost:8000; docs at /docs
  3. Frontend Setup:

    cd frontend
    npm install
    npm run dev  # App at http://localhost:3000
  4. Full Stack (Docker):

    docker-compose up -d  # Starts backend, frontend, MongoDB
    • Backend: http://localhost:8000
    • Frontend: http://localhost:3000
    • Test: curl http://localhost:8000/coin/top_coins?limit=5

Environment Vars: Set MONGODB_URI, OLLAMA_API_KEY in .env.

Running Tests

  • Backend: pytest backend/tests/ (covers CapitalManager, CoinTrader).
  • Frontend: npm run test (React Testing Library).

Edit frontend/app/page.tsx for custom pages; auto-reloads on save.

📈 Trading Strategy

  • Multi-Signal: TA (EMA/RSI/MACD) + RF ML predictions + NLP sentiment + Ollama LLM.
  • Position Sizing: Available Capital × Signal Strength × Volatility Adj.
  • Volatility Buckets: High (>10%): Tight stops; Low (<5%): Larger positions.
  • Backtesting: Use /backend/testers/ for custom runs (e.g., ETH sim: 730 trades, 62% win rate).

Formulas (Appendix B):

  • Ownership: (User Net / Total Net) × 100
  • ATR Stop: Entry - (ATR × 2)

🤝 Team

  • Darlington Gospel (CEO, Dapp Mentors): Backend/AI; LinkedIn.
  • Ebenezer Enietan (Backend): Full-stack/Blockchain; LinkedIn.
  • Bahiru Mulugeta (Frontend): UI Specialist; LinkedIn.

🗺️ Roadmap

  • Short-Term (3-6 Mo): LSTM models, mobile UX, top 50 coins.
  • Medium-Term (6-12 Mo): KYC/AML, Sharpe analytics, API access.
  • Long-Term (12+ Mo): Smart contracts, QPOOL token (100M supply: 40% community), DeFi integrations.

Economic Projections (Y1 Conservative: 500 users, $3.75M TVL, $75K revenue).

🌐 Deployment

  • Vercel (Frontend): Push to main; auto-deploys. See Next.js Deployment Docs.
  • Heroku/AWS (Backend): Use Procfile or Docker.
  • CI/CD: GitHub Actions (/.github/workflows/main.yml) deploys to VPS on push.

📚 Learn More

  • Next.js Docs for frontend.
  • FastAPI Docs for backend.
  • Whitepaper: Full details on strategy, tokenomics (QPOOL utilities: discounts, staking, governance).

🤝 Contributing

  1. Fork & clone.
  2. Create branch: git checkout -b feature/xyz.
  3. Commit: git commit -m "Add XYZ".
  4. Push & PR.

Guidelines: PEP8 for Python, ESLint for TS. No breaking changes without tests.

📋 Project Structure

├─ .github/
│  └─ workflows/main.yml  # CI/CD
├─ backend/
│  ├─ app/
│  │  ├─ coin/            # Models, coin.py
│  │  ├─ services/        # CapitalManager, Scheduler, Handlers
│  │  ├─ trader_bot/      # CoinTrader, ML/News Handlers
│  │  └─ users/           # User models
│  ├─ requirements.txt
│  └─ run_dev.py
├─ frontend/
│  ├─ app/                # Pages: dashboard, whitepaper
│  │  └─ components/      # UI: Charts, Modals
│  ├─ contexts/           # Auth/Global
│  └─ utils/              # API, Interfaces
└─ docker-compose.yml     # Full stack

Stats: 79 files, 72 code files (JS/CSS/Python/TS), 360KB.

⚠️ Disclaimer & Compliance

Simulated platform; no financial advice/guarantees. Production: KYC via Sumsub, Delaware-inc. Risks: Market volatility, regulatory changes. See whitepaper Section 9.4.

📬 Contact

Copyright © 2025 Dapp Mentors. All Rights Reserved.
Version 1.3 | Updated Oct 17, 2025 | License: MIT

About

Our AI-Powered Trading Platform leverages machine learning, historical & real-time market data, and news sentiment analysis to deliver automated trading recommendations (BUY, SELL, HOLD).

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages