AI-Powered Trading Signals with Intellectual Property NFTs
Platypus is a trading platform that combines artificial intelligence, human expertise, and blockchain technology to create, improve, and monetize trading signals as intellectual property (IP) NFTs.
Platypus bridges the gap between AI-generated trading signals and human trading expertise by creating a marketplace where:
- AI generates high-quality trading signals as parent ipNFTs using advanced market analysis
- Human traders can improve these signals to earn derivative ipNFT through their expertise
- All signals are minted as IP NFTs on the Camp Network blockchain
- Revenue is shared between original creators and signal improvers
- Trading is executed directly through integrated exchange APIs
- Framework: React 18 with TypeScript
- Styling: TailwindCSS v4 with custom components
- State Management: Zustand for auth/trading stores
- Data Fetching: TanStack Query for API calls
- Animation: Framer Motion
- Blockchain Integration: Camp Network Origin SDK
- Build Tool: Vite
- Runtime: Node.js with TypeScript
- Framework: Express.js
- Database: MongoDB with Mongoose ODM
- Authentication: JWT + Camp Network Origin integration
- Trading: Hyperliquid exchange API integration
- AI: OpenAI GPT-4/GPT-4o (context analysis) and technical pattern analysis for signal generation
- Security: Helmet, CORS, rate limiting
- Multi-Model Support: GPT-4o and GPT-4o-mini for different use cases
- Advanced Market Analysis: Technical indicators, sentiment analysis, pattern recognition
- Risk Management: Conservative leverage, proper stop-loss placement
- Quality Scoring: Win rate analysis and confidence metrics
- Collaborative Enhancement: Users can improve AI-generated signals
- Quality Assessment: Automated scoring of improvement quality
- Revenue Sharing: 60% revenue share for signal improvers
- IP Protection: Improvements minted as derivative NFTs
- Camp Network Integration: Signals minted as IP NFTs with licensing terms
- Access Control: Token-gated access to improved signals
- Royalty System: Automated revenue distribution
- IPFS Storage: Decentralized metadata storage via Pinata
- Exchange Integration: Direct trading through Hyperliquid
- Position Sizing: Automated risk-based position calculation
- Order Management: Smart order routing with slippage protection
- Performance Tracking: Real-time P&L and analytics
- Platform Metrics: Total signals, users, volume, revenue
- Signal Analytics: Win rates, confidence distribution, performance by model
- Trading Analytics: P&L tracking, leverage distribution, top traders
- User Analytics: Creator rankings, revenue distribution
- Signal Review: Approve/reject signals before minting
- Quality Control: Confidence filtering and manual review
- Platform Management: User management and system monitoring
- Node.js 18+ and npm
- MongoDB database
- Camp Network client credentials
- Hyperliquid API access
- OpenAI API key
- Clone the repository
git clone <repository-url>
cd platypus- Install dependencies
# Install server dependencies
cd server
npm install
# Install client dependencies
cd ../client
npm install- Environment Setup
Server Environment (server/.env):
# Database
MONGODB_URI=mongodb://localhost:27017/platypus
# Authentication
JWT_SECRET=your-jwt-secret-here
PLATFORM_WALLET_ADDRESS=0x...
PLATFORM_WALLET_PRIVATE_KEY=0x...
# Camp Network
CAMP_CLIENT_ID=your-camp-client-id
CAMP_TRUST_JWT=false
ORIGIN_JWKS_URL=https://auth.camp.network/.well-known/jwks.json
ORIGIN_ISSUER=https://auth.camp.network
# Blockchain
CHAIN_ID=123
BASECAMP_RPC_URL=https://basecamp-rpc-url
SIWE_DOMAIN=localhost:3000
# External APIs
OPENAI_API_KEY=sk-...
HYPERLIQUID_API_URL=https://api.hyperliquid.xyz
# Server
PORT=3001
NODE_ENV=developmentClient Environment (client/.env):
VITE_API_URL=http://localhost:3001
VITE_PUBLIC_ORIGIN_CLIENT_ID=your-camp-client-id
VITE_PUBLIC_PINATA_JWT=your-pinata-jwt-token- Database Setup
# Start MongoDB (if running locally)
mongod
# The application will automatically create collections on first run- Start Development Servers
# Terminal 1: Start backend
cd server
npm run dev
# Terminal 2: Start frontend
cd client
npm run dev- Access the Application
- Frontend: http://localhost:5173
- Backend API: http://localhost:3001
platypus/
βββ client/ # React frontend
β βββ src/
β β βββ components/ # Reusable UI components
β β β βββ admin-layout.tsx # Admin dashboard layout
β β β βββ signal-card.tsx # Signal display component
β β β βββ trading-modal.tsx # Trade execution modal
β β β βββ ...
β β βββ pages/ # Page components
β β β βββ dashboard/ # User dashboard pages
β β β βββ landing.tsx # Landing page
β β β βββ auth.tsx # Authentication
β β βββ services/ # API service layers
β β β βββ signals.ts # Signals API
β β β βββ trading.ts # Trading API
β β β βββ camp.ts # Camp Network integration
β β β βββ ...
β β βββ stores/ # Zustand state stores
β β βββ types/ # TypeScript type definitions
β β βββ utils/ # Utility functions
β βββ package.json
β βββ vite.config.ts
β
βββ server/ # Node.js backend
β βββ src/
β β βββ features/ # Feature-based modules
β β β βββ auth/ # Authentication system
β β β βββ signals/ # Signal management
β β β βββ trading/ # Trading execution
β β β βββ analytics/ # Analytics & reporting
β β β βββ ip-redacted-2-client/ # Camp Network integration
β β βββ shared/ # Shared utilities
β β β βββ config/ # Configuration
β β β βββ middleware/ # Express middleware
β β β βββ types/ # Type definitions
β β β βββ utils/ # Utility functions
β β βββ routes/ # API route definitions
β β βββ app.ts # Express app setup
β β βββ server.ts # Server entry point
β βββ package.json
β βββ tsconfig.json
β
βββ README.md # This file
POST /auth/connect- Connect wallet and authenticateGET /auth/profile- Get user profilePUT /auth/profile- Update user profile
GET /signals/public- Get public signalsGET /signals/improvable- Get signals available for improvementPOST /signals- Create new AI signalPOST /signals/:id/improve- Improve existing signalGET /signals/:id- Get signal details
POST /trading/execute- Execute trade from signalPOST /trading/calculate-position- Calculate position sizeGET /trading/opportunities- Get market opportunities
GET /analytics/overview- Platform overview metricsGET /analytics/signals- Signal analyticsGET /analytics/trading- Trading analytics
GET /admin/signals- Get signals for reviewPUT /admin/signals/:id/status- Update signal statusPOST /admin/mint-signal- Mint approved signal as NFT
- JWT Authentication with Camp Network integration
- Encrypted Credentials for exchange API keys
- Rate Limiting on all API endpoints
- Input Validation using Zod schemas
- CORS Protection with configurable origins
- Helmet Security headers
- Error Handling with sanitized responses
- Market Scanning: Analyze top cryptocurrencies by volume
- Technical Analysis: RSI, moving averages, pattern recognition
- Sentiment Analysis: Fear & Greed Index integration
- AI Analysis: GPT-4 generates comprehensive trading signals
- Risk Management: Conservative leverage and stop-loss placement
- Quality Scoring: Win rate and confidence assessment
- Signal Selection: Users browse improvable signals
- Improvement Submission: Suggest entry/exit adjustments or analysis enhancements
- Quality Assessment: Automated scoring based on change significance and reasoning
- Revenue Sharing: 60% revenue share for quality improvements
- IP Protection: Improvements minted as derivative NFTs
- Position Calculation: Risk-based position sizing
- Order Validation: Price movement and margin checks
- Smart Execution: Limit orders with slippage protection
- Risk Management: Maximum leverage and stop-loss enforcement
- Platform Metrics: Total signals, users, volume, revenue
- Signal Performance: Win rates, confidence levels, AI model performance
- Trading Analytics: P&L, success rates, popular symbols
- User Analytics: Creator performance, revenue distribution
- IP Analytics: NFT sales, royalty distribution
- Analytics Caching: 5-minute cache for dashboard metrics
- Signal Caching: 10-minute cache for public signal lists
- User Performance: 1-hour cache for user statistics
- IP NFT Minting: Signals minted as intellectual property
- Access Control: Token-gated signal access
- Licensing Terms: Automated licensing with royalties
- Revenue Distribution: Smart contract-based royalty payments
- Base Camp Testnet: Primary development network
- IPFS Storage: Decentralized metadata storage via Pinata
Server:
npm run dev # Start development server with hot reload
npm run build # Build production bundle
npm run start # Start production server
npm run test # Run test suite
npm run lint # Run ESLintClient:
npm run dev # Start Vite development server
npm run build # Build production bundle
npm run preview # Preview production build
npm run lint # Run ESLint- TypeScript for type safety
- ESLint for code quality
- Prettier for code formatting
- Conventional Commits for git messages
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Ukpaa Chigozie - Platypus Team
- Camp Network for IP NFT infrastructure
- Hyperliquid for DEX trading capabilities
- OpenAI for AI signal generation
- React & Node.js communities for excellent tooling
For more information, support, or questions, please open an issue or contact the development team.