Skip to content

divs-spec/qie-dex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 

Repository files navigation

QIE-DEX

License GitHub Stars GitHub Issues

A brief, compelling description of what QIE-DEX does and why it matters.

🎯 The Problem We're Solving

Traditional decentralized exchanges face three critical challenges:

High Gas Fees: Ethereum-based DEXes can charge $50-200+ per transaction during peak times, making DeFi inaccessible for average users and preventing microtransactions

Slow Transaction Speed: 15-second block times create poor user experience, front-running opportunities, and limit real-world adoption for time-sensitive trading

Complex Token Creation: Launching tokens requires technical expertise, smart contract knowledge, and substantial costs ($1000+), creating barriers for entrepreneurs and businesses

💡 How QIE-DEX Solves These Problems

QIE-DEX leverages the QIE blockchain's superior architecture:

⚡ 25,000 TPS with 1-second finality - Transactions complete faster than credit card payments

💰 Ultra-low fees (0.1% of Ethereum costs) - Makes microtransactions profitable and DeFi accessible to everyone

🛠️ No-code token creator - Launch tokens in seconds without writing a single line of code

🔄 Uniswap V2 architecture - Proven AMM model with familiar interface and battle-tested smart contracts

🌉 Cross-chain bridges - Seamless USDT/USDC transfers from Ethereum and BSC

📊 Decentralized oracles - Accurate price feeds powered by QIE's validator network

📋 Table of Contents

🚀 About

QieDex serves as a decentralized trading and token creation platform built on the high-performance QIE Network. The repository hosts the core qiedex directory for this Uniswap-style DEX implementation. It supports automated cryptocurrency transactions and liquidity provision on the QIE blockchain. QIE-DEX is a Real-Time Trade Route Auditor that verifies DEX trades are executed fairly by comparing expected vs actual execution, recording cryptographic proofs on QIE blockchain, and exposing MEV/slippage exploitation.

Why QIE-DEX?

Route Optimizer Logic:

  • Direct swap calculation using constant product formula (x*y=k)

  • Multi-hop route discovery through intermediate tokens

  • Price impact calculation

  • Route ranking by best output

Proof Generation:

  • Creates proof object with trade parameters

  • Generates unique hash for blockchain storage

  • Links proof to transaction receipt

Smart Features:

  • Real-time route comparison

  • Visual feedback for trade fairness

  • Slippage detection (flags >2% deviation)

  • Historical audit tracking


✨ Features

  • 1. Token Swapping : Trade any QIE-based token instantly with automated market maker (AMM) pricing, similar to Uniswap but with near-zero fees and 1-second confirmation.

  • 2. Liquidity Provision : Provide liquidity to any trading pair and earn 0.3% of all trading fees. Become a market maker and earn passive income from the protocol.

  • 3. Yield Farming & Staking : Stake your liquidity provider (LP) tokens to earn QIEDEX governance tokens. Participate in protocol decisions and earn rewards.

  • 4. No-Code Token Creator : Revolutionary feature allowing anyone to create tokens without coding knowledge - perfect for: Loyalty reward programs, Gaming economies, Community governance tokens, Business utility tokens, NFT project currencies

  • 5. Cross-Chain Bridges : Transfer USDT and USDC seamlessly between:

    i). Ethereum ↔ QIE Network

    ii). Binance Smart Chain ↔ QIE Network

  • 6. Decentralized Governance : QIEDEX token holders can vote on protocol upgrades, fee structures, and ecosystem development proposals.

📦 Installation

Prerequisites

Before you begin, ensure you have the following installed:

Backend (qie-backend)

Runtime Dependencies

  • express ^4.18.2
  • cors ^2.8.5
  • mongoose ^7.3.1
  • dotenv ^16.3.1
  • axios ^1.4.0
  • ws ^8.14.0

Dev Dependencies None

Smart Contracts (qie-contracts) Dev Dependencies

  • hardhat ^2.16.0
  • @nomicfoundation/hardhat-toolbox ^3.0.0
  • chai ^4.3.7
  • ethers ^6.9.0

Frontend (qie-frontend)

Runtime Dependencies

  • react ^18.2.0
  • react-dom ^18.2.0
  • react-scripts 5.0.1

Dev Dependencies None (react-scripts includes its own tooling)

WebSocket Service (qie-websocket)

Dependencies

  • ws ^8.13.0
  • dotenv ^16.3.1
  • express ^4.18.2
  • ethers ^6.7.0
  • axios ^1.4.0
  • node-cron ^3.0.2

Monorepo Root (qie-dex-monorepo)

Dev Dependencies

  • concurrently ^8.2.0
  • npm-run-all ^4.1.5 (Workspaces reference other packages; no runtime dependencies)

Infrastructure / Deployment Tools

  • railway/render (implicit via railway.json config)
  • vercel (implicit via vercel.json config)
  • MongoDB plugin (from project.json)

Clone the Repository

git clone https://github.com/divs-spec/qie-dex.git
cd qie-dex/qiedex

Install Dependencies

npm install
# or
yarn install

Environment Setup

Create a .env file in the root directory and add your configuration:

REACT_APP_API_KEY=your_api_key_here
REACT_APP_API_URL=your_api_url_here
# Add other environment variables

🎮 Usage

Development Server

Start the development server:

npm start
# or
yarn start

The application will be available at http://localhost:3000

Production Build

Create an optimized production build:

npm run build
# or
yarn build

Basic Example

// Add a simple code example showing how to use your project
import { QieDex } from 'qie-dex';

const app = new QieDex({
  // configuration options
});

app.initialize();

🚀 How to Use:

1. Select Tokens: Choose token pair (USDC → ETH, etc.)

2. Enter Amount: Input trade size

3. Simulate Routes: Click "Find Best Route" to see all available paths

4. Record Proof: Save expected output to QIE blockchain

5. Execute Trade: Run trade and verify actual output matches proof

6. View Results: See if trade was fair or had excessive slippage


📁Project Structure

qiedex/
├─ .github/
│  └─ workflows/
│     └─ ci.yml               # CI pipeline configuration
│
├─ backend/
│  ├─ Procfile                # Backend process definition
│  ├─ package.json            # Backend Node.js dependencies and scripts
│  └─ server.js               # HTTP API server entrypoint
│
├─ config/
│  └─ database.js             # Database connection and configuration
│
├─ contracts/
│  └─ scripts/
│     ├─ deploy.js            # Smart contract deployment script
│     ├─ contracts.txt        # Deployed contract addresses / metadata
│     ├─ hardhat.config.js    # Hardhat configuration for QIE network
│     └─ package.json         # Contracts tooling dependencies
│
├─ deployment/
│  ├─ Dockerfile.backend      # Docker image for backend API
│  ├─ Dockerfile.frontend     # Docker image for frontend app
│  ├─ Dockerfile.websocket    # Docker image for websocket service
│  └─ deployment_config.txt   # Infra/deployment configuration notes
│
├─ frontend/
│  ├─ public/
│  │  ├─ index.html           # Frontend HTML shell
│  │  ├─ manifest.json        # PWA / metadata config
│  │  └─ robots.txt           # Crawler configuration
│  ├─ src/
│  │  ├─ index.tsx            # React/TSX frontend entrypoint
│  │  └─ qie_dex_optimizer.tsx# DEX optimizer / main UI logic
│  ├─ .env                    # Frontend environment variables (local)
│  └─ package.json            # Frontend dependencies and scripts
│
├─ test/
│  └─ mobile.js               # Mobile-focused tests / utilities
│
├─ websocket/
│  ├─ Procfile                # Websocket process definition
│  ├─ package.json            # Websocket service dependencies
│  ├─ websocket-server.js     # Websocket server entrypoint
│
├─ .env.example               # Root env template for all services
├─ .gitignore                 # Global Git ignore rules
├─ DEPLOYMENT.md              # Project-level deployment guide
├─ docker-compose.yml         # Orchestrates backend/frontend/websocket
├─ package.json               # Root scripts / dev tooling
├─ railway.json               # Railway deployment config (root)
├─ vercel.json                # Vercel deployment config (root)
└─ LICENSE                    # Project license

Project Architecture

                        +---------------------+
                        |     Frontend (UI)   |
                        |  React / TypeScript |
                        +----------+----------+
                                   |
                                   | HTTP / REST + WebSocket
                                   v
        +--------------------------+--------------------------+
        |                                                      |
+-------+--------+                                     +-------+--------+
|   Backend API  |                                     |  Websocket     |
| Node.js server |                                     | Server         |
| server.js      |                                     | websocket-...  |
+-------+--------+                                     +-------+--------+
        |                                                      |
        | On-chain calls / events                              | Real-time
        v                                                      v
+-------+----------------------------+               +---------+--------+
|           Smart Contracts          |               |   Database       |
|  contracts/ (Hardhat, deploy.js)  |<-------------->| config/database  |
|  Deployed on QIE blockchain       |   off-chain    | state, user data |
+----------------+------------------+    data        +------------------+

                    +------------------------------------+
                    | Deployment & DevOps                |
                    | Dockerfiles (backend/frontend/ws), |
                    | docker-compose, Railway, Vercel    |
                    +------------------------------------+
  • The frontend consumes the backend REST APIs and subscribes to the websocket server for real-time updates such as order book or trade events.​
  • The backend coordinates business logic, interacts with the smart contracts on the QIE blockchain, and persists off-chain data in the configured database.​
  • The websocket service pushes live data (prices, swaps, liquidity changes) from the backend and contracts to connected clients for a responsive trading UI.​
  • The contracts layer defines and deploys DEX and token-related smart contracts using Hardhat scripts, while the deployment folder plus Docker, Railway, and Vercel configs support containerized and cloud-based deployment of each service

⚙️ Configuration

Application Settings

This document outlines all configuration settings used across the QIE DEX Pro monorepo. Settings are categorized into Backend, Frontend, Database, Smart Contracts, WebSocket services, and additional operational layers.


1. Backend Settings (API Server – Node.js/Express)

Environment Variables
PORT=3001
MONGO_URI=mongodb://localhost:27017/qiedex
REDIS_URL=redis://localhost:6379
JWT_SECRET=<secret>
ENABLE_LIVE_PRICES=true
RATE_LIMIT=10
RPC_URL=<QIE RPC endpoint>
CHAIN_ID=<network id>
CONTRACT_ROUTER=<router address>
CONTRACT_ORDERBOOK=<orderbook address>
API Endpoints
Endpoint Method Description
/api/health GET Health check
/api/orders GET/POST Create or fetch orders
/api/trade/quote POST Route optimization & swap quote
/api/trade/execute POST Executes swap on-chain
/api/user/favorites GET/POST Manage saved pairs
/api/history GET Trade history
/api/analytics GET Platform metrics
Authentication Settings
  • JWT-based authentication
  • Wallet-signature verification via ethers.js
  • Optional API key support
Feature Flags
ENABLE_ROUTE_OPTIMIZATION=true
ENABLE_ORDER_MATCHING=true
ENABLE_AUDIT_PROOFS=true
ENABLE_DEBUG_LOGS=false
ENABLE_SIMULATION_MODE=false

2. Frontend Settings (React)

Environment Variables
REACT_APP_API_URL=http://localhost:3001
REACT_APP_WS_URL=ws://localhost:8080
REACT_APP_CHAIN_ID=<QIE chain id>
REACT_APP_ENABLE_NEW_UI=true
REACT_APP_THEME=dark
REACT_APP_SHOW_ADVANCED_TRADING=true
Theme Customization

Supports UI theme variations:

  • Light/Dark mode
  • Forest Black theme
  • Minimal theme

Primary color palette:

Primary:     #16a34a
Secondary:   #86efac
Background:  #fef9f3
Accent:      #f97316
Trading Settings
  • Slippage control
  • Gas priority settings
  • Chart intervals
  • Mobile layout optimization

3. WebSocket Server Settings

Environment Variables
WS_PORT=8080
PRICE_REFRESH_INTERVAL=3000
ORDER_MATCH_INTERVAL=1000
RPC_URL=<rpc-endpoint>
ENABLE_PRICE_STREAMS=true
ENABLE_ORDER_EVENTS=true
WebSocket Channels
Channel Purpose
price:update Live token price feed
orderbook:update Market depth updates
trade:executed Trade execution notifications
order:triggered Stop/limit order notifications
system:alert System-level alerts

4. Smart Contract Settings (Hardhat)

Hardhat Environment Variables
PRIVATE_KEY=<deployer key>
RPC_URL=<QIE Mainnet/Testnet RPC>
ETHERSCAN_API=<optional>
Deployment
npx hardhat run scripts/deploy.js --network <target>

Contracts managed:

  • Router Contract
  • Audit Registry
  • Order Book Contract

5. Database Settings

MongoDB

Collections:

  • Users
  • Orders
  • Trades
  • Favorites
  • AuditProofs
  • PriceCache
  • OrderTriggers
  • Logs
  • Analytics

Environment variables:

MONGO_URI=mongodb://localhost:27017/qiedex
MONGO_POOL_SIZE=20
MONGO_TIMEOUT=3000
Redis

Used for caching, order book storage, and sessions.

REDIS_URL=redis://localhost:6379
REDIS_TTL=5

6. Additional Categories

A. Security Settings
RATE_LIMIT=10
CORS_ORIGIN=*
ENABLE_INPUT_VALIDATION=true
ENABLE_CSRF=true
B. Deployment Settings

Supports:

  • Docker
  • Kubernetes manifests
  • Nginx reverse proxy routing
  • GitHub Actions CI/CD
C. Dev/Debug Settings
ENABLE_DEBUG_LOGS=true
LOG_LEVEL=verbose
DEV_WATCH_MODE=true
MOCK_PRICE_FEEDS=true

Config File Example

{
  "api": {
    "baseURL": "https://api.example.com",
    "timeout": 5000
  },
  "features": {
    "featureName": true
  }
}

📚 API Documentation

Endpoints

Get Resource

GET /api/resource/:id

Parameters:

  • id (string): Resource identifier

Response:

{
  "status": "success",
  "data": {
    // response data
  }
}

🤝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a new branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Commit your changes (git commit -m 'Add some amazing feature')
  5. Push to the branch (git push origin feature/amazing-feature)
  6. Open a Pull Request

Coding Standards

  • Follow the existing code style
  • Write clear commit messages
  • Add tests for new features
  • Update documentation as needed

Code of Conduct

Please read our Code of Conduct before contributing.

🧪 Testing


✅ Overview

This monorepo contains multiple services (Frontend, Backend, WebSocket, Smart Contracts). Each workspace includes its own isolated testing environment.

This guide explains:

  • How to run tests in each workspace
  • How to run all tests in sequence
  • How to generate and view coverage reports
  • How to create new tests following the project structure

📁 Test Locations

  • Frontend: frontend/src/__tests__/
  • Backend: backend/tests/
  • Smart Contracts: contracts/test/
  • WebSocket: websocket/tests/

▶️ Run Tests (Workspace-Level)

Frontend

cd frontend
npm test

Backend

cd backend
npm test

WebSocket

cd websocket
npm test

Smart Contracts (Hardhat)

cd contracts
npx hardhat test

🔄 Run All Tests (Monorepo)

npm run test --workspaces

This executes all test commands defined in each workspace.


📊 Run Tests With Coverage

Backend / WebSocket / Frontend

npm run test:coverage

Note: Ensure a test:coverage script exists in each workspace.

Hardhat Coverage (optional plugin)

npx hardhat coverage

🧱 Writing New Tests

Frontend (React - Jest + React Testing Library)

  • Create files under src/__tests__/componentName.test.js
  • Use render(), screen, and fireEvent for UI tests.

Backend (Express - Jest / Supertest)

  • API tests should mock DB or use a test MongoDB URI.
  • Place files inside backend/tests/.
  • Use supertest to hit API endpoints.

Smart Contracts (Hardhat Chai Tests)

  • Use ethers + chai assertions.
  • Test gas usage, revert conditions, events.

WebSocket Tests

  • Mock or simulate WebSocket connections.
  • Validate message structure, connection flow, and error conditions.

🛠️ Advanced Testing Features

  • CI/CD Integration: Optional GitHub Actions workflow can run tests on every push.
  • Mock Services: Use mock providers for API and blockchain interactions.
  • Snapshot Testing: Useful for UI and config output.
  • Load Testing: Optional K6/Gatling scripts for backend stress.

❗ Troubleshooting

Tests failing inconsistently

  • Clear caches: npm cache verify
  • Delete node_modules and reinstall

Coverage folder not generated

  • Ensure Jest or Hardhat coverage plugin is installed.

WebSocket tests timing out

  • Make sure server closes after tests (server.close()).

Contract tests slow

  • Use Hardhat Network instead of external RPCs.

🚀 Deployment


1. Core Requirements

Before deploying to any platform, ensure the following are ready:

  • Environment variables configured (.env)
  • Build command verified locally (npm run build or yarn build)
  • Production API endpoints set
  • SSL/HTTPS readiness (handled automatically by Vercel/Netlify)

2. Deployment Options

Below are the recommended deployment targets with clear instructions.


▶ Deploy to Vercel

Vercel is recommended for optimal performance and CI-friendly deployments.

Steps
  1. Install the Vercel CLI:
npm i -g vercel
  1. Log in:
vercel login
  1. Deploy:
vercel deploy
  1. For production deployment:
vercel deploy --prod

▶ Deploy to Netlify

Suitable for static builds or serverless-enabled frontends.

Steps
  1. Install Netlify CLI:
npm install -g netlify-cli
  1. Authenticate:
netlify login
  1. Link and deploy:
netlify deploy --prod

▶ Docker Deployment

Ideal for on-premise, VPS, or custom cloud environments.

Build Image
docker build -t qie-dex .
Run Container
docker run -p 3000:3000 qie-dex

3. Additional Deployment Targets

DigitalOcean App Platform
doctl apps create --spec app.yaml
AWS (ECS / ECR)
  • Push Docker image to ECR
  • Deploy via ECS Fargate
Render
  • Connect GitHub repo
  • Auto-build and deploy

4. Troubleshooting & Recovery

Build Failures
  • Confirm Node version compatibility
  • Delete .next or dist folder and rebuild
  • Validate environment variables
API Not Working
  • Check CORS settings
  • Verify API URL used during build
  • Ensure server is reachable externally
Docker Issues
  • Use docker logs <container>
  • Validate exposed ports
  • Rebuild without cache:
docker build --no-cache -t qie-dex .

5. Post‑Deployment Checklist

  • Test all routed pages
  • Validate API responses
  • Confirm environment variables in cloud dashboard
  • Enable HTTPS/SSL
  • Set up monitoring (optional)

6. Suggested Improvements

  • Add CI/CD using GitHub Actions
  • Add deployment badges for Vercel/Netlify
  • Create service health endpoints

Your deployment guide is now ready for Canva or documentation use.

Deployment Guide for QIE-DEX

This document provides a clean, production-ready deployment guide covering Vercel, Netlify, Docker, and major cloud providers.


1. Vercel Deployment (Frontend Only)

Vercel is ideal for deploying the React-based frontend.

Steps
  1. Ensure the frontend is built:
npm run build
  1. Install Vercel CLI:
npm i -g vercel
  1. Deploy:
vercel deploy --prod
  1. Configure:
  • Build command: npm run build
  • Output directory: build
  • Automatically configures CDN, SSL, and CI/CD.

2. Netlify Deployment

Netlify works seamlessly for static frontend deployments.

Steps
  1. Build the frontend:
npm run build
  1. Deploy with Netlify CLI:
netlify deploy --prod
  1. Configuration:
  • Build command: npm run build
  • Publish directory: build

3. Docker Deployment (Full Stack)

Use Docker for containerized backend, frontend, or WebSocket services.

Build Image
docker build -t qie-dex .
Run Container
docker run -p 3000:3000 qie-dex
Docker-Compose (Recommended)
docker-compose up -d

This will orchestrate all services: backend, websocket, and frontend.


4. Cloud Provider Deployments

Below are best‑practice deployment options for production-level infrastructure.

AWS
  • Frontend: S3 + CloudFront
  • Backend: EC2, ECS, or Elastic Beanstalk
  • WebSocket: EC2 or ECS Fargate
  • Secrets: AWS Secrets Manager
  • SSL: ACM
Google Cloud Platform (GCP)
  • Frontend: Firebase Hosting
  • Backend: Cloud Run or GKE
  • WebSocket: Cloud Run (with WebSocket enabled) or GKE
  • Secrets: Secret Manager
DigitalOcean
  • Use App Platform or Droplets
  • Managed MongoDB available
  • Good for small/medium teams

5. Production Checklist

Before deployment, ensure:

Environment
  • NODE_ENV=production
  • MongoDB production URI configured
  • Contract addresses and RPC URLs set
  • WebSocket/REST API URLs updated
Security & Performance
  • HTTPS enabled
  • Reverse proxy (Nginx) configured
  • Rate limiting enabled
  • Environment variables secured
  • Logs + monitoring enabled
Testing
  • Health checks enabled
  • API regression tests run
  • Smart contracts tested & verified

🛠️ Technologies Used

Technologies Used

Backend Technologies

  • Node.js: Core runtime for backend services.
  • Express.js: HTTP server framework used to build RESTful APIs.
  • MongoDB: NoSQL database used for storing users, trades, orders, and analytics.
  • Redis: In-memory cache for price feeds, sessions, and order book acceleration.
  • WebSocket (ws): Real-time communication layer for streaming prices, orders, and trades.
  • Ethers.js: Blockchain interaction library for signing and executing smart contract functions.
  • Hardhat: Development and testing environment for Solidity smart contracts.
  • Solidity: Smart contract programming language.
  • OpenZeppelin: Secure smart contract library.
  • Ethers.js (client-side): Wallet connection and blockchain operations.

Frontend Technologies

  • React 18: Core UI library for building the trading interface.
  • Tailwind CSS 3: Utility-first CSS framework for styling.
  • React Router: Routing and navigation management.
  • TradingView / Chart.js: Candle charts and technical indicators.
  • WebSocket Client: Real-time price and order updates.

Database & Storage

  • MongoDB: Main data store for trades, orders, user settings.
  • Redis: High-speed caching and rate limiting.
  • IPFS: Decentralized storage for proofs and logs.
  • Blockchain Storage: Immutable, on-chain audit records.

DevOps & Infrastructure

  • Docker / Docker Compose: Containerized development & deployment.
  • Kubernetes: Production-grade orchestration and scaling.
  • GitHub Actions: CI/CD automation for builds, tests, and deployments.
  • Nginx: Reverse proxy and SSL termination.
  • PM2: Node process manager for backend services.

Additional Systems

  • Monitoring Tools: For logs and performance metrics.
  • CDNs: Faster static asset delivery.
  • Security Middleware: Helmet.js, CSP, sanitization layers.

This section outlines the complete technology stack used to build the QIE DEX application.

🗺️ Roadmap

QIE DEX – Roadmap & Issue Resolution Guide

Project Kickoff Roadmap (How to Start the Project)

1. Planning & Requirements
  • Define core features: trading engine, order book, wallet integration, UI.
  • Identify user personas: traders, liquidity providers, analysts.
  • Prepare technical requirements and system design outline.
  • Create milestone-based delivery plan.
2. Architecture & System Design
  • Design overall architecture: frontend, backend, WebSocket, blockchain, DB.
  • Select technology stack: React, Express, MongoDB, Redis, Hardhat.
  • Define contracts structure: router, order book, audit registry.
  • Create diagrams for data flow, component interaction, and APIs.
3. Development Setup
  • Initialize monorepo (frontend, backend, WebSocket, contracts).
  • Configure environment variables and folder structure.
  • Set up Docker for local development environment.
  • Install all dependencies and tools.
4. Smart Contract Development
  • Implement base token swap router.
  • Develop order book contract.
  • Add audit proof registry.
  • Test contracts with Hardhat and integrate scripts for deployment.
5. Backend API Development
  • Build REST endpoints for orders, trades, analytics.
  • Integrate contract functions via ethers.js.
  • Implement rate-limiting, validation, and error handling.
  • Connect MongoDB and Redis for state and caching.
6. WebSocket & Matching Engine
  • Build WebSocket server for real-time updates.
  • Implement order matching logic for limit/stop orders.
  • Enable trade feed, price updates, and notifications.
  • Optimize latency and caching mechanisms.
7. Frontend Development
  • Build trading UI (React + Tailwind).
  • Add wallet integrations and contract interactions.
  • Implement charts, order forms, order book, trade history.
  • Optimize for mobile and responsive behavior.
8. Testing & QA
  • Write unit tests for backend and contracts.
  • Perform UI and integration testing.
  • Run end-to-end scenarios with Cypress.
  • Conduct load testing for WebSocket and API.
9. Deployment
  • Containerize services with Docker.
  • Deploy to cloud (AWS, GCP, Vercel, DigitalOcean).
  • Configure CI/CD pipelines.
  • Set up domain, SSL, and monitoring.
10. Post-Launch
  • Monitor performance, logs, and user behavior.
  • Apply optimizations and patch updates.
  • Begin roadmap features for Q2–Q4.

Q1 – Completed Milestones

  • Core decentralized exchange (DEX) functionality delivered
  • Order book and matching engine implemented
  • Smart contracts deployed on QIE blockchain
  • Mobile-responsive interface optimized

Q2 2025 – In Progress

  • Leverage trading system (up to 10x)
  • Liquidity mining and rewards module
  • Governance token (QIEDEX) integration
  • Cross-chain swapping bridge

Q3 2025 – Planned

  • NFT marketplace module
  • Fiat on-ramp provider integrations
  • Expanded charting and real-time analytics
  • Social trading features (copy trading, leaderboards)

Q4 2025 – Planned

  • Native mobile applications (iOS & Android)
  • Institutional trading API
  • Automated trading bot framework
  • Multi-language global support

Issue Resolution Guide

1. Frontend Issues

Common Symptoms: UI breaks, wallet not connecting, charts not loading

Steps to Resolve:

  • Ensure npm install is completed in /frontend
  • Verify .env contains correct API & WebSocket URLs
  • Clear browser cache and restart dev server: npm start
  • Check browser console for CORS or CSP errors

2. Backend API Issues

Common Symptoms: API returning 500 errors, routes not responding

Steps to Resolve:

  • Confirm MongoDB is running: docker ps or mongod
  • Restart backend: npm run dev
  • Check server.js environment variables
  • Inspect logs for validation or rate-limit failures

3. WebSocket Issues

Common Symptoms: Live order book not updating, trade feed lag

Steps to Resolve:

  • Restart WebSocket server: npm run dev inside /websocket
  • Confirm port 8080 is not blocked
  • Validate Redis is running if caching is enabled
  • Check for client-side disconnections in browser console

4. Smart Contract / Blockchain Issues

Common Symptoms: Trades not executing, high slippage errors

Steps to Resolve:

  • Ensure Hardhat network or QIE RPC is online
  • Re-deploy contracts: npx hardhat compile && npx hardhat run scripts/deploy.js
  • Confirm wallet is connected to correct network
  • Validate liquidity availability and router path

5. Database Issues (MongoDB / Redis)

Common Symptoms: Missing data, trades not visible, slow performance

Steps to Resolve:

  • Check containers: docker-compose up -d
  • Verify connection strings in backend .env
  • Rebuild indexes for large collections
  • Clear Redis caches to remove stale order book data

6. Deployment Issues

Common Symptoms: Vercel or server deployment failures

Steps to Resolve:

  • Ensure build folder exists in frontend
  • Validate configuration files (vercel.json, package.json, docker-compose)
  • Check server logs for network binding errors
  • Ensure Node version matches project requirements

Escalation Guide

If the issue persists after following the steps above:

  1. Check GitHub Issues for known bugs
  2. Review CI/CD and commit logs
  3. Enable debug logs in backend and WebSocket servers
  4. Contact the QIE DEX support team

This section is structured for inclusion in a README or Canva documentation page. Let me know if you want a visually styled Canva version (color blocks, icon headers, or timeline graphics).

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

📧 Contact

Divyani - @ikrakizoi - ikrakizoi2607@gmail.com

Project Link: https://github.com/divs-spec/qie-dex

🙏 Acknowledgments

  • Thanks to QIE-DEX for inspiration
  • Node.js & React.js for making development easier

⭐ If you find this project useful, please consider giving it a star on GitHub!

Made with ❤️ by Divyani

About

Build a Real-Time Trade Route Auditor that verifies DEX trades are executed fairly by comparing expected vs actual execution, recording cryptographic proofs on QIE blockchain, and exposing MEV/slippage exploitation.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors