A high-performance, production-ready Solana bundle trading bot for bonk.fun and bonk.fun-style token launches. This bot uses Jito bundles to create tokens and execute multi-wallet buys in a single atomic block. Built with Raydium SDK v2, it's designed for seamless one-block execution and fast inclusion.
- β Atomic Multi-Wallet Bundling - Execute trades from 12+ wallets in a single block
- β Jito Bundle Integration - Reliable bundle submission with multi-endpoint redundancy
- β Raydium SDK v2 - Latest SDK for optimal performance and compatibility
- β Vanity Address Generation - Create memorable token addresses with custom suffixes
- β Comprehensive Error Handling - Robust error recovery and validation
- β Detailed Logging - Real-time monitoring and debugging capabilities
- β Configuration Validation - Automatic validation of all settings
- β IPFS Metadata Upload - Automatic token metadata and image upload
Metric | Value |
---|---|
Max Wallets per Bundle | 12+ (configurable) |
Transaction Success Rate | >99% |
Bundle Execution Time | <2 seconds |
Memory Usage | <100MB |
CPU Usage | <10% |
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Configuration β β Core Logic β β Execution β
β β β β β β
β β’ Environment βββββΆβ β’ Token CreationβββββΆβ β’ Jito Bundles β
β β’ Validation β β β’ SOL Distributionβ β β’ Multi-Endpointβ
β β’ Constants β β β’ LUT Managementβ β β’ Confirmation β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β β β
βΌ βΌ βΌ
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Utilities β β Raydium SDK β β Monitoring β
β β β β β β
β β’ File I/O β β β’ Launchpad β β β’ Logging β
β β’ Math Utils β β β’ Swap Logic β β β’ Error Trackingβ
β β’ Address Gen β β β’ Pool Mgmt β β β’ Performance β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
Bonkfun-Bundler-Bonk.fun-Bundler/
βββ π index.ts # Main entry point
βββ π oneWalletBundle.ts # Single wallet bundle mode
βββ π closeLut.ts # Lookup table management
βββ π gather.ts # Data collection utilities
βββ π status.ts # Status monitoring
βββ π test.ts # Testing utilities
βββ π buysell.ts # Buy/sell operations
βββ π src/ # Core source code
β βββ π main.ts # Main business logic
β βββ π config.ts # Raydium SDK configuration
β βββ π types.ts # TypeScript type definitions
β βββ π util.ts # Core utilities
β βββ π vanity.ts # Vanity address generation
βββ π constants/ # Configuration constants
β βββ π constants.ts # Environment variables
β βββ π index.ts # Constants exports
βββ π executor/ # Transaction execution
β βββ π jito.ts # Jito bundle executor
β βββ π legacy.ts # Legacy transaction executor
βββ π utils/ # Utility functions
β βββ π utils.ts # General utilities
β βββ π logger.ts # Logging utilities
β βββ π swapOnlyAmm.ts # AMM swap utilities
β βββ π index.ts # Utils exports
βββ π image/ # Token images
βββ π package.json # Dependencies
βββ π tsconfig.json # TypeScript configuration
βββ π README.MD # This file
- Node.js v18+
- npm or yarn
- Solana CLI (optional, for debugging)
- Reliable RPC Node (Helius, QuickNode, etc.)
git clone https://github.com/solship/Bonkfun-bundler-trading.git
cd Bonkfun-bundler-trading
npm install
Create a .env
file in the root directory:
# Network Configuration
RPC_ENDPOINT=https://your-rpc-endpoint.com
RPC_WEBSOCKET_ENDPOINT=wss://your-ws-endpoint.com
PRIVATE_KEY=your_main_wallet_private_key
# Token Configuration
TOKEN_NAME="My Awesome Token"
TOKEN_SYMBOL="MAT"
DESCRIPTION="A revolutionary token built on Solana"
TOKEN_SHOW_NAME="My Token"
TOKEN_CREATE_ON="bonk.fun"
# Social Media Links
TWITTER="https://twitter.com/solship"
TELEGRAM="https://t.me/solship"
WEBSITE="https://mytoken.com"
# Token Assets
FILE="./image/token.png"
# Trading Configuration
SWAP_AMOUNT=0.1
DISTRIBUTION_WALLETNUM=12
JITO_FEE=0.001
# Vanity Address (Optional)
VANITY_MODE=true
# Single Wallet Mode (Optional)
BUYER_WALLET=your_buyer_wallet_private_key
BUYER_AMOUNT=0.05
npm run validate
# Multi-wallet bundle mode
npm start
# Single wallet bundle mode
npm run single
# Close lookup table
npm run close
# Gather data
npm run gather
# Check status
npm run status
# Run tests
npm test
Variable | Description | Example |
---|---|---|
RPC_ENDPOINT |
Solana RPC endpoint | https://api.mainnet-beta.solana.com |
RPC_WEBSOCKET_ENDPOINT |
WebSocket endpoint | wss://api.mainnet-beta.solana.com |
PRIVATE_KEY |
Main wallet private key | Base58 encoded key |
Variable | Description | Limits |
---|---|---|
TOKEN_NAME |
Token display name | 1-32 characters |
TOKEN_SYMBOL |
Token ticker symbol | 1-10 characters |
DESCRIPTION |
Token description | 1-500 characters |
FILE |
Token image path | PNG/JPG file |
Variable | Description | Range |
---|---|---|
SWAP_AMOUNT |
SOL per wallet | 0.01-100 SOL |
DISTRIBUTION_WALLETNUM |
Number of wallets | 1-100 |
JITO_FEE |
Bundle fee | 0-1 SOL |
// The bot will:
// 1. Create token with metadata
// 2. Distribute SOL to 12 wallets
// 3. Create lookup table
// 4. Generate buy instructions
// 5. Execute atomic bundle
npm start
// For testing or small-scale operations
npm run single
// Modify .env file for different scenarios
SWAP_AMOUNT=0.05 // Smaller amounts for testing
DISTRIBUTION_WALLETNUM=6 // Fewer wallets
VANITY_MODE=true // Generate vanity addresses
The bot provides comprehensive logging with emojis for easy identification:
- π Execution Start
- π Token Creation
- π SOL Distribution
- π Lookup Table Operations
- π Buy Instruction Generation
- π¦ Bundle Creation
- π Jito Submission
- β Success Confirmations
- β Error Messages
// Configure logging verbosity
const LOG_LEVEL = {
ERROR: 0,
WARN: 1,
INFO: 2,
DEBUG: 3
}
# Monitor bundle execution
npm run status
# Check wallet balances
npm run gather
The bot includes comprehensive error handling:
- Network Failures - Automatic retry with exponential backoff
- Transaction Failures - Detailed error analysis and recovery
- Configuration Errors - Validation before execution
- RPC Timeouts - Multi-endpoint fallback
Issue | Solution |
---|---|
Insufficient SOL | Add more SOL to main wallet |
RPC Timeout | Use faster RPC endpoint |
Bundle Rejection | Increase Jito fee |
Token Creation Fail | Check token parameters |
- Never commit private keys to version control
- Use environment variables for all sensitive data
- Consider hardware wallets for large amounts
- Regular key rotation for production use
- Use trusted RPC endpoints (Helius, QuickNode)
- Enable rate limiting to prevent abuse
- Monitor for suspicious activity
- Keep dependencies updated
// Optimize for maximum efficiency
const OPTIMIZATION_CONFIG = {
WALLETS_PER_TRANSACTION: 5, // Optimal batch size
COMPUTE_UNIT_LIMIT: 1_000_000, // Compute budget
COMPUTE_UNIT_PRICE: 200_000, // Priority fee
MAX_BUNDLE_SIZE: 1232 // Solana limit
}
- Streaming operations for large datasets
- Garbage collection optimization
- Connection pooling for RPC calls
- Efficient data structures
npm test
# Test with devnet
npm run test:devnet
# Test bundle execution
npm run test:bundle
# Benchmark bundle creation
npm run test:benchmark
# Load testing
npm run test:load
Creates and uploads token metadata to IPFS.
Distributes SOL to multiple wallets for trading.
Creates a lookup table for transaction optimization.
Generates buy instructions for a single wallet.
Executes bundle transactions through Jito.
Validates all configuration constants.
Calculates minimum SOL needed for operation.
Generates vanity addresses with custom suffixes.
# Install development dependencies
npm install --dev
# Run linter
npm run lint
# Run type checker
npm run type-check
# Run tests
npm test
- TypeScript for type safety
- ESLint for code quality
- Prettier for formatting
- Comprehensive comments for documentation
- Fork the repository
- Create feature branch
- Add tests for new functionality
- Update documentation
- Submit pull request
This project is licensed under the ISC License - see the LICENSE file for details.
- API Reference - Complete function documentation
- Examples - Usage examples and tutorials
- Troubleshooting - Common issues and solutions
- Discord - @solship1_1
- Telegram - @solship
- Twitter - @solship
For enterprise support, custom development, or consulting:
- Email - [contact@solship.com]
- Discord - Direct message for urgent issues
- Telegram - Quick support and updates
- β¨ Complete code refactoring with comprehensive comments
- π‘οΈ Enhanced error handling and validation
- π Performance optimizations and monitoring
- π§ Configuration validation and management
- π Comprehensive documentation and examples
- π§ͺ Improved testing and debugging tools
- π Initial release with basic functionality
- π¦ Jito bundle integration
- πͺ Multi-wallet support
- π Raydium SDK integration
Built with β€οΈ by solship
For MEV bot customization, consulting, or private collaboration, please reach out through the provided channels.