Skip to content

interchained/iTRADE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

iTRADE — Interchained Multiplayer Trading Arena

License: GNU General Public License v3.0 Copyright: 2024-2026 Interchained https://interchained.org

A real-time multiplayer trading simulation where up to 40 players compete in volatile simulated crypto markets. Features creator-owned arenas, provably fair mechanics, and a prize pool distribution system. All gameplay uses IGP (simulated) against real USDx entry fees.

Features

  • Up to 40 Players — Live competitive trading (max 10 AI bots to fill lobbies)
  • Creator Arenas — Premium users create permanent branded arenas with custom slugs (8-10 chars). Arena slug becomes the trading pair: e.g. IGP/MOONSHOT
  • Arena Revenue — Arena creators earn 5% of every game's prize pool automatically
  • Prize Distribution — Top 5 split the pool: 30% / 15% / 10% / 5% / 5%
  • 5 USDx Entry Fee — Real value at stake; forfeit on voluntary leave
  • Provably Fair — Atomic Redis Lua scripts for all balance operations
  • Arena Pages — Dedicated /itrade/[slug] pages with game history and stats

Stack

Layer Technology
Backend FastAPI, Redis (atomic Lua for balance ops)
Frontend Next.js 15, React 19, TypeScript
Realtime WebSockets for live price feeds
Auth JWT — premium subscription required to play

Quick Start

# Backend
pip install -r requirements.txt
cp .env.example .env
uvicorn main:app --reload --port 8000

# Frontend
npm install && npm run dev

Game Flow

1. Player enters arena → 5 USDx deducted atomically
2. Lobby waits for MIN_PLAYERS (or timeout → bots fill)
3. Game starts → 10,000 IGP distributed to all players
4. Volatile price simulation runs for game duration
5. Top 5 by portfolio value win prize pool shares
6. USDx credited atomically; arena owner gets 5% cut

Arena Creation

Arenas are permanent and owned by their creator (premium users only). The slug becomes the in-game currency symbol:

  • Slug: MOONSHOT → Trading pair: IGP/MOONSHOT
  • Accessible at: /itrade/moonshot

Environment Variables

REDIS_URL=redis://localhost:6379/0
JWT_SECRET=<your-secret>

License

GNU General Public License v3.0 — see LICENSE

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors