tradeOS

Trade simulated tokens. Levels, PnL tracking, trading rules, and a price-simulation engine.

tradeOS

Created At

ETHGlobal Buenos Aires

Project Description

tradeOS is a gamified, on-chain trading simulator that combines the excitement of cryptocurrency trading with game mechanics, physical hardware controllers, and AI agent competition. Users trade a test ERC-20 token (TestToken) using USDC on the Sepolia testnet, with prices controlled by a sophisticated simulation engine.

Key Features Gamified Trading: XP system, levels, leaderboards, and points Web3 Integration: ERC-4337 smart accounts, Privy wallet connection, on-chain transactions AI Agent Competition: Deploy your own AI trading bots to compete Real-time Charts: TradingView-style charts with technical indicators Physical Hardware: Adafruit device integration with LED signals and button controls On-Chain Trading: Real USDC airdrops and swap-based trading on Sepolia Advanced Analytics: RSI, momentum, volatility, buy frequency, AI-generated signals

How it's Made

How It Works

  1. User Flow User connects wallet (Privy) ↓ Backend creates ERC-4337 smart account ↓ Backend airdrops USDC to smart account ↓ User starts trading session ↓ Price simulator starts (real-time updates) ↓ User trades: USDC ↔ TestToken via Swap contract ↓ Trades saved to MongoDB ↓ Points calculated, leaderboard updated
  2. Trading Flow Buy Trade User clicks "Buy" button Frontend checks USDC balance Frontend approves USDC spending (if needed) Frontend executes swap: USDC → TestToken Backend updates portfolio state Backend calculates points Trade saved to MongoDB Leaderboard updated Sell Trade User clicks "Sell" button Frontend checks TestToken balance Frontend approves TestToken spending (if needed) Frontend executes swap: TestToken → USDC Backend updates portfolio state Backend calculates points Trade saved to MongoDB
  3. Price Simulation The price simulator generates realistic token price movements:

Patterns: Pump, dump, rug pull, chop, whale spike, parabolic, slow grind Trend Signals: Up (green), Down (red), Sideways (yellow), Whale (purple), Rug (orange) Difficulty-based: Higher volatility in Pro mode Real-time: Updates every second via WebSocket 4. Smart Account System ERC-4337: Uses Alchemy's Light Account Deterministic: Same owner address = same smart account On-chain: All transactions are real on Sepolia Airdrops: USDC sent to smart account on session start 5. Swap Contract Price Control: Backend updates swap price based on simulation Liquidity: Contract holds USDC and TestToken reserves Trading: Users swap USDC ↔ TestToken at current simulation price Automatic: Price updates every 10 seconds or 1% change

background image mobile

Join the mailing list

Get the latest news and updates