A professional, gamified crypto trading platform on Solana, inspired by rugs.fun with enhanced trader-friendly features and advanced analytics.
RugFork is a Solana-based platform that replicates rugs.fun's core mechanics while introducing unique features like:
- Lower fees (1% vs 2%) - More trader-friendly
- Custom RugScore - Advanced risk assessment algorithm
- Enhanced analytics - Real-time market insights
- Adjustable prize pool splits - Flexible tournament rewards
- RugPass NFT system - Leveling and rewards
- Cross-chain support - Future expansion ready
- Token Launchpad: Launch memecoins with customizable parameters (supply, liquidity, fees)
- Sidebet Mechanic: Bet on token price movements with multipliers (2x-100x)
- Rug Royale: Competitive tournaments with SOL prizes
- RugScore Analytics: Real-time risk scoring based on multiple factors
- RugPass: NFT-based leveling system with XP and airdrop rewards
- Real-time Analytics: Comprehensive market insights and trading patterns
- Leaderboards: Multiple ranking systems (traders, winners, volume, XP)
- Achievement System: Unlock rewards and boost XP
- Risk Assessment: Multi-factor rug score calculation
- Tournament System: Create and join competitive events
- Solana: Fast, low-cost transactions
- Rust/Anchor: Smart contract development
- Modular Architecture: Organized instruction modules
- Node.js: API server with TypeScript
- Express.js: Web framework with middleware
- PostgreSQL: Relational database
- Prisma: Type-safe database ORM
- Redis: Caching and session storage
- Solana RPC: Blockchain integration
- Next.js: React framework with App Router
- TypeScript: Type-safe development
- Tailwind CSS: Utility-first styling
- Framer Motion: Smooth animations
- Recharts: Data visualization
- Solana Wallet Adapter: Wallet integration
- Docker: Containerization
- Docker Compose: Local development
- AWS/Vercel: Production deployment
- Helius/QuickNode: Enhanced RPC providers
- Rust 1.70+
- Node.js 18+
- Solana CLI
- Anchor CLI
- PostgreSQL
- Docker & Docker Compose
- Clone and setup
git clone <repo-url>
cd RugFork
npm install- Setup Solana
# Install Solana CLI
sh -c "$(curl -sSfL https://release.solana.com/v1.18.15/install)"
# Setup devnet
solana config set --url devnet
solana airdrop 2- Setup Database
cd backend
npx prisma migrate dev
npx prisma generate- Deploy Contracts
cd contracts
anchor build
anchor deploy --provider.cluster devnet- Start Development
# Using Docker (Recommended)
docker-compose up -d
# Or manually
cd backend && npm run dev &
cd frontend && npm run devRugFork/
├── contracts/ # Solana smart contracts (Rust/Anchor)
│ ├── programs/ # On-chain logic
│ │ ├── rugfork/ # Main program
│ │ │ ├── src/
│ │ │ │ ├── lib.rs # Program entry point
│ │ │ │ ├── state.rs # Account structures
│ │ │ │ ├── errors.rs # Custom error codes
│ │ │ │ ├── instructions/ # Modular instructions
│ │ │ │ │ ├── initialize_pool.rs
│ │ │ │ │ ├── place_sidebet.rs
│ │ │ │ │ ├── settle_sidebet.rs
│ │ │ │ │ ├── rug_score.rs
│ │ │ │ │ ├── rug_royale.rs
│ │ │ │ │ ├── user_profile.rs
│ │ │ │ │ ├── launch_token.rs
│ │ │ │ │ ├── crash_pool.rs
│ │ │ │ │ └── update_pool_params.rs
│ │ │ │ └── mod.rs # Module exports
│ │ │ ├── tests/ # Unit tests
│ │ │ └── Anchor.toml # Anchor config
│ ├── migrations/ # Deployment scripts
│ └── target/ # Build artifacts
├── backend/ # Node.js API server
│ ├── src/
│ │ ├── routes/ # API endpoints
│ │ │ ├── tokens.ts # Token management
│ │ │ ├── bets.ts # Betting system
│ │ │ ├── users.ts # User management
│ │ │ ├── leaderboard.ts # Rankings
│ │ │ └── analytics.ts # Analytics & insights
│ │ ├── services/ # Business logic
│ │ │ ├── solana.ts # Solana RPC interactions
│ │ │ └── rugscore.ts # Risk calculations
│ │ ├── middleware/ # Auth, validation
│ │ │ ├── auth.ts # JWT authentication
│ │ │ └── errorHandler.ts # Error handling
│ │ └── index.ts # Server entry
│ ├── prisma/ # Database schema
│ │ └── schema.prisma # Prisma schema
│ └── package.json # Dependencies
├── frontend/ # Next.js frontend
│ ├── src/
│ │ ├── app/ # App Router pages
│ │ │ ├── page.tsx # Landing page
│ │ │ ├── launch/ # Token launch
│ │ │ ├── sidebet/ # Betting interface
│ │ │ ├── royale/ # Tournament system
│ │ │ ├── analytics/ # Analytics dashboard
│ │ │ └── layout.tsx # Root layout
│ │ ├── components/ # Reusable components
│ │ │ ├── providers/ # Context providers
│ │ │ └── layout/ # Layout components
│ │ └── lib/ # Utilities
│ └── package.json # Dependencies
├── scripts/ # Utility scripts
│ ├── deploy.sh # Basic deployment
│ ├── deploy-enhanced.sh # Enhanced deployment
│ └── setup.sh # Development setup
├── docs/ # Documentation
│ ├── api.md # API documentation
│ └── contracts.md # Smart contract docs
├── docker-compose.yml # Local development
├── .env.example # Environment template
└── README.md # This file
- Modular Design: Organized instruction modules for maintainability
- Comprehensive State: Enhanced account structures with metadata
- Error Handling: Custom error codes for better debugging
- Events: Emit events for off-chain tracking
- Security: Input validation and access controls
- RESTful Design: Clean API endpoints with proper HTTP methods
- Type Safety: Full TypeScript implementation
- Database Integration: Prisma ORM with PostgreSQL
- Real-time Data: Solana RPC integration for live data
- Analytics Engine: Advanced risk scoring and market analysis
- Authentication: JWT-based user authentication
- Modern UI: Terminal/Matrix aesthetic with smooth animations
- Responsive Design: Mobile-first approach
- Real-time Updates: Live data synchronization
- Wallet Integration: Seamless Solana wallet connection
- Data Visualization: Charts and graphs for analytics
- Progressive Enhancement: Works without JavaScript
- Customizable Parameters: Supply, liquidity, fees
- Automatic Pool Creation: Instant trading availability
- RugScore Calculation: Real-time risk assessment
- Creator Rewards: Fee sharing for pool creators
- Multiplier System: 2x to 100x multipliers
- Crash Detection: Automatic settlement
- Win/Loss Tracking: Comprehensive statistics
- XP Rewards: Experience points for activity
- Competitive Play: Rank-based competitions
- Prize Distribution: Configurable reward splits
- Time-based Events: Scheduled tournaments
- Leaderboards: Multiple ranking systems
- NFT-based Levels: Unique pass NFTs
- Benefits Unlocks: Fee discounts, XP multipliers
- Achievement Rewards: Unlock new features
- Community Status: Exclusive access
- Smart Contract Audits: Recommended security reviews
- Input Validation: Comprehensive parameter checking
- Access Controls: Role-based permissions
- Rate Limiting: API protection
- Error Handling: Graceful failure management
- Multisig Support: Pool fund protection
- Platform Statistics: Total pools, bets, volume, users
- Market Analysis: Trading patterns and trends
- Risk Assessment: Multi-factor rug scoring
- User Analytics: Behavior and performance tracking
- Liquidity Analysis: Pool depth assessment
- Holder Distribution: Concentration risk
- Volume Patterns: Trading activity analysis
- Age Factors: Time-based risk assessment
- Social Signals: Community activity metrics
anchor deploy --provider.cluster mainnet-betadocker build -t rugfork-backend .
docker run -p 3000:3000 rugfork-backendnpm run build
vercel deploychmod +x scripts/deploy-enhanced.sh
./scripts/deploy-enhanced.sh devnet- ✅ Core smart contracts
- ✅ Basic frontend
- ✅ API endpoints
- ✅ Database schema
- ✅ Modular contract architecture
- ✅ Advanced analytics
- ✅ Tournament system
- ✅ RugPass integration
- ✅ Comprehensive API
- 🔄 Cross-chain support
- 🔄 Mobile application
- 🔄 Advanced trading tools
- 🔄 Social features
- 🔄 AI-powered insights
- 🔄 Third-party integrations
- 🔄 API marketplace
- 🔄 Developer tools
- 🔄 Community governance
- 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
- Follow TypeScript best practices
- Write comprehensive tests
- Document new features
- Follow the existing code style
- Ensure security best practices
MIT License - see LICENSE file for details
This is a high-risk trading platform designed for educational and entertainment purposes. Only trade with funds you can afford to lose. The platform involves significant financial risk and should be used responsibly.
- Documentation: docs.rugfork.com
- Discord: Join our community
- Twitter: @RugFork
- GitHub Issues: Report bugs
- rugs.fun: Original inspiration and mechanics
- Solana Foundation: Blockchain infrastructure
- Anchor Framework: Smart contract development
- Community: Feedback and contributions
Built with ❤️ for the Solana ecosystem
Combining Grok's innovative ideas with professional implementation for the ultimate trading experience.
