High-Performance Queue System: Non-blocking trade replication handles 1000+ followers per leader without slowing down order execution. Queue processes 10 followers concurrently with automatic retry on failure.
Instant Order Response: Leader orders return in under 200ms regardless of follower count. Trade replication happens asynchronously in the background.
Leader/Follower System: Complete social trading infrastructure with leader profiles, approval workflow, market declarations, and performance tracking.
Per-Market Allocations: Followers allocate funds per trading pair (e.g., 10 BTC + 100 USDT for BTC/USDT). Base amount for SELL orders, quote amount for BUY orders.
Multiple Copy Modes: Choose from proportional (percentage-based), fixed amount, or fixed ratio copy modes to match your investment strategy.
Customizable Risk Controls: Set max position size, daily trade limits, daily loss limits, and automatic stop-loss/take-profit triggers per subscription.
Profit Share Distribution: Leaders earn configurable profit share (0-50%) from follower profits, automatically calculated and distributed on trade close.
On-Demand Statistics: ROI, win rate, P&L, and volume calculated in real-time from trade data. Redis caching (5-minute TTL) ensures fast responses.
Leader Discovery & Ranking: Browse, filter, and search leaders by trading style (Scalping, Day Trading, Swing, Position), risk level, performance metrics, and follower count.
Leader Market Declarations: Leaders explicitly declare which markets they trade (e.g., BTC/USDT, ETH/USDT). Only declared markets trigger copy trading.
Leader Verification System: Admin approval workflow with status tracking (Pending, Active, Suspended, Rejected). Full audit trail of all admin actions.
Follower Portfolio Management: Allocate funds per market, adjust settings, pause/resume/stop subscriptions, and track P&L across all followed leaders.
Ecosystem Spot Trading Integration: Seamlessly integrates with Ecosystem trading module. Safe imports ensure system works even if copy trading addon is not installed.
Comprehensive Audit Logging: Timeline view of all system events with filters by entity type, action, user, and date range. IP address tracking for security.
Daily Limit Protection: Automatic daily reset of trade counts and loss tracking with configurable thresholds per follower subscription.
Auto Stop-Loss Trigger: Automatically pause subscription when loss threshold is reached to protect follower funds.
Auto Take-Profit Trigger: Lock in gains by automatically pausing when profit target is achieved.
Leader Dashboard: Dedicated dashboard for leaders with follower count, total trades, win rate, ROI, and earnings tracking.
Follower Dashboard: Portfolio overview with allocation breakdown, available vs used amounts, P&L by market, and complete trade history.
Admin Dashboard: Platform overview with total leaders, followers, volume, average ROI, and pending approvals. Real-time statistics.
Admin Leader Management: View, approve, reject, suspend, or activate leaders. Full detail pages with follower lists and trade history.
Admin Follower Management: View all subscriptions, pause/resume/stop followers, access detail pages with allocation and transaction history.
Admin Audit Logs: Complete audit trail with timeline visualization, entity linking, and admin action tracking.
Platform Statistics API: Public endpoint for platform-wide stats (total leaders, followers, volume, average ROI, win rate).
Batch Statistics Calculation: Optimized queries calculate stats for multiple leaders in single database calls for leaderboard performance.
Transaction History: Complete financial history with allocations, trade costs, profits, losses, and profit share distributions.
Failed Trade Recovery: Automatic retry mechanism (up to 3 attempts) with exponential backoff for failed copy trades.
Email Notifications: Automated emails for subscription events, trade executions, and limit triggers.
Comprehensive REST API: Full API coverage for all operations with proper authentication and error handling.
Multi-Language Support: Full internationalization with 80+ language translations.
Admin Permission System: Granular permissions for dashboard, leaders, followers, trades, transactions, audit logs, and settings.
Soft Delete Support: Paranoid mode deletion for data recovery and audit compliance.
Full Documentation: Comprehensive documentation with installation guide, admin features, user features, and settings configuration.
Technical Highlights
Queue-Based Architecture: CopyTradeQueue class processes trades asynchronously with configurable concurrency (default: 10 followers at once).
Safe Import System: triggerCopyTrading() in safe-imports.ts ensures ecosystem orders work even without copy trading installed.
Statistics Calculator: On-demand calculation from copyTradingTrade table – no redundant stat storage in database.
Redis Caching: 5-minute TTL for leader stats, 3-minute for allocation stats. Auto-invalidation on trade close.
Batch Processing: calculateBatchLeaderStats() fetches all leader stats in optimized queries for leaderboard.
Null Safety: Comprehensive null checks throughout frontend with nullish coalescing (??) operators.
Cron Integration: Queue processor auto-starts with cron system. processPendingCopyTrades runs every 10 seconds.