The codebase is organized into several modules:
- engine/ - Core trading logic including copy trading, selling strategies, and transaction parsing
- dex/ - Protocol-specific implementations for PumpFun and PumpSwap
- services/ - External services integration including Telegram notifications
- common/ - Shared utilities, configuration, and constants
- core/ - Core system functionality
- error/ - Error handling and definitions
To run this bot, you will need to configure the following environment variables:
GRPC_ENDPOINT- Your Yellowstone gRPC endpoint URLGRPC_X_TOKEN- Your Yellowstone authentication token- `` - Wallet address(es) to monitor for trades (comma-separated for multiple addresses)
To enable Telegram notifications:
TELEGRAM_BOT_TOKEN- Your Telegram bot tokenTELEGRAM_CHAT_ID- Your chat ID for receiving notifications
PROTOCOL_PREFERENCE- Preferred protocol to use (pumpfun,pumpswap, orautofor automatic detection)COUNTER_LIMIT- Maximum number of trades to execute
The bot now includes a comprehensive token tracking system that:
- Tracks Bought Tokens: When the bot successfully buys a token, it's added to a tracking system
- Prevents Invalid Sells: The bot will only attempt to sell tokens it actually owns
- Monitors Balances: A background service checks token balances every 30 seconds
- Auto-Cleanup: Tokens with zero or very low balances are automatically removed from tracking
--check-tokens: Display current token tracking status--wrap: Wrap SOL to WSOL--unwrap: Unwrap WSOL to SOL--close: Close all token accounts
# Build the project
cargo build --release
# Run the bot
cargo run --releaseOnce started, the bot will:
- Connect to the Yellowstone gRPC endpoint
- Monitor transactions from the specified wallet address(es)
- Automatically copy buy and sell transactions as they occur
- Send notifications via Telegram for detected transactions and executed trades
- Added PumpSwap notification mode (can monitor without executing trades)
- Implemented concurrent transaction processing using tokio tasks
- Enhanced error handling and reporting
- Improved selling strategy implementation
For questions or support, please contact the developer.