{"id":50996173,"url":"https://github.com/casatrick/solana-pumpfun-sniper","last_synced_at":"2026-06-20T09:35:17.041Z","repository":{"id":315216027,"uuid":"1058555444","full_name":"casatrick/solana-pumpfun-sniper","owner":"casatrick","description":"jito shredstream pumpfun sniper bot, dev buy filter, same block sniping, parse mint transaction, the lowest latency, avoid multiple rpc call pumpfun sniper bot-solana pumpfun sniper bot","archived":false,"fork":false,"pushed_at":"2026-02-19T07:34:21.000Z","size":70,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-19T07:36:51.136Z","etag":null,"topics":["bot","pumpfun-sniper","rust","solana"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/casatrick.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-17T08:43:37.000Z","updated_at":"2026-06-10T03:08:14.000Z","dependencies_parsed_at":"2025-09-17T11:24:24.665Z","dependency_job_id":"4d86bd46-08f0-44a0-82d9-51ce6bb4f620","html_url":"https://github.com/casatrick/solana-pumpfun-sniper","commit_stats":null,"previous_names":["roswelly/solana-pumpfun-sniper","casatrick/solana-pumpfun-sniper"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/casatrick/solana-pumpfun-sniper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casatrick%2Fsolana-pumpfun-sniper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casatrick%2Fsolana-pumpfun-sniper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casatrick%2Fsolana-pumpfun-sniper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casatrick%2Fsolana-pumpfun-sniper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/casatrick","download_url":"https://codeload.github.com/casatrick/solana-pumpfun-sniper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casatrick%2Fsolana-pumpfun-sniper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34565240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","pumpfun-sniper","rust","solana"],"created_at":"2026-06-20T09:35:16.339Z","updated_at":"2026-06-20T09:35:17.036Z","avatar_url":"https://github.com/casatrick.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Solana PumpFun Sniper Bot \n\nA high-performance Rust implementation of a Solana PumpFun sniper bot that monitors new token mints and automatically purchases tokens that meet specific market cap criteria.\nupdated including Mayhem Mode Detect\n\n\n## Updates for Cashback\n- Bonding Curve Sell instruction\n\n```\n.remainingAccounts([\n  {\n    pubkey: userVolumeAccumulator, // Index 0\n    isSigner: false,\n    isWritable: true, //  Must be true\n  },\n])\n\n```\n- Added hasCashback in Account\n\n```\nbondingCurve.isCashbackCoin // New boolean field\n\n```\n- Added [true] in createV2\n\n## Features\n\n### Core Features\n- **Real-time monitoring** of PumpFun token mints via Geyser gRPC\n- **Automatic buy** of new tokens above a market cap threshold\n- **Low-latency**: Uses async/await and pre-fetched data for sub-100ms execution\n- **Type-safe**: Built with Rust's type system for reliability\n- **Configurable** via environment variables\n- **Comprehensive error handling** with detailed logging\n\n### Advanced Features (2024)\n- **Same-block execution** for near-instantaneous trade execution\n- **Jito integration** for ultra-fast transaction processing with MEV protection\n- **Multiple gRPC connections** for redundancy and reliability\n- **AI-powered scam detection** to avoid honeypots and rug pulls\n- **Advanced risk management** with stop-loss and take-profit\n- **Intelligent copy trading** to mirror successful traders\n- **Updated bonding curve calculations** for accurate pricing\n- **Real-time market analysis** with ML-based predictions\n\n### Season 2 Features (December 2024)\n- **Instant Migration Detection** for PumpFun Season 2 instant migrations\n- **PumpSwap Integration** monitoring for migrated tokens\n- **Creator Revenue Tracking** for Season 2 revenue sharing\n- **Zero Migration Fees** support for new migration system\n- **Enhanced Liquidity Monitoring** for improved trading conditions\n\n## Requirements\n\n- **Rust 1.70+**: Latest stable Rust toolchain\n- **Access to a Solana Geyser gRPC endpoint**: For real-time transaction monitoring\n- **Helius or other Solana RPC endpoint**: For sending transactions\n- **Solana wallet private key**: Base58 string format\n\n## Environment Variables\n\n### Core Configuration\n| Variable                | Description                                                      |\n|------------------------|------------------------------------------------------------------|\n| `BUYER_PRIVATE_KEY_PATH`| Your Solana wallet private key (base58 string, not a file path)   |\n| `GRPC_ENDPOINT`        | Geyser gRPC endpoint URL                                         |\n| `GRPC_AUTH_TOKEN`      | Authentication token for the gRPC endpoint                       |\n| `SOLANA_RPC_ENDPOINT`  | (Optional) Custom Solana RPC endpoint URL                        |\n| `HELIUS_API_KEY`       | (Optional) Helius API key (used if `SOLANA_RPC_ENDPOINT` is unset)|\n| `MARKET_CAP_THRESHOLD_USD` | (Optional) Minimum market cap threshold in USD (default: 8000.0) |\n| `BUY_AMOUNT_SOL`       | (Optional) Amount of SOL to spend per buy (default: 0.001)      |\n\n### Advanced Features Configuration\n| Variable                | Description                                                      |\n|------------------------|------------------------------------------------------------------|\n| `ENABLE_JITO`          | Enable Jito for ultra-fast transactions (default: true)         |\n| `ENABLE_COPY_TRADING`  | Enable copy trading functionality (default: false)              |\n| `ENABLE_SCAM_DETECTION`| Enable AI-powered scam detection (default: true)               |\n| `ENABLE_SAME_BLOCK_EXECUTION` | Enable same-block execution (default: true)            |\n| `ENABLE_RISK_MANAGEMENT` | Enable advanced risk management (default: true)            |\n| `MAX_SLIPPAGE_PERCENTAGE` | Maximum slippage tolerance (default: 20.0)              |\n| `STOP_LOSS_PERCENTAGE` | Stop-loss percentage (default: 10.0)                        |\n| `TAKE_PROFIT_PERCENTAGE` | Take-profit percentage (default: 50.0)                    |\n| `COPY_TRADING_PERCENTAGE` | Percentage of trader's position to copy (default: 10.0) |\n| `JITO_TIP_LAMPORTS`   | Jito tip amount in lamports (default: 10000)                |\n\n### Season 2 Features Configuration\n| Variable                | Description                                                      |\n|------------------------|------------------------------------------------------------------|\n| `ENABLE_MIGRATION_DETECTION` | Enable instant migration detection (default: true)         |\n| `ENABLE_PUMP_SWAP_MONITORING` | Enable PumpSwap monitoring (default: true)              |\n| `ENABLE_CREATOR_REVENUE_TRACKING` | Enable creator revenue tracking (default: true)      |\n| `MIGRATION_THRESHOLD`  | Migration detection threshold (default: 0.95)                |\n\n## Setup \u0026 Build\n\n1. **Clone the repository**\n   ```sh\n   git clone \u003cyour-repo-url\u003e\n   cd solana-pumpfun-sniper-bot\n   ```\n\n2. **Install Rust** (if not already installed)\n   ```sh\n   curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n   ```\n\n3. **Build the project**\n   ```sh\n   cargo build --release\n   ```\n\n4. **Set up environment variables**\n   ```sh\n   cp env.example .env\n   # Edit .env with your actual values\n   ```\n\n5. **Add Solana Geyser proto file** (required for gRPC)\n   ```sh\n   mkdir -p proto\n   # Download the Solana Geyser proto file\n   curl -o proto/geyser.proto https://raw.githubusercontent.com/solana-labs/solana/master/geyser-plugin-interface/proto/geyser.proto\n   ```\n\n## Usage\n\n1. **Set environment variables** (example for PowerShell):\n   ```powershell\n   $env:BUYER_PRIVATE_KEY_PATH = \"\u003cyour_base58_private_key\u003e\"\n   $env:GRPC_ENDPOINT = \"\u003cyour_geyser_grpc_endpoint\u003e\"\n   $env:GRPC_AUTH_TOKEN = \"\u003cyour_grpc_auth_token\u003e\"\n   $env:HELIUS_API_KEY = \"\u003cyour_helius_api_key\u003e\"\n   ```\n\n2. **Run the bot**\n   ```sh\n   cargo run --release\n   ```\n\n## How it Works\n\n- Subscribes to the PumpFun program on Solana via Geyser gRPC\n- Monitors for new token mints using transaction discriminators\n- Calculates the market cap using the initial SOL deposit and current SOL price\n- If the market cap is above the threshold (default: $8,000), sends a buy transaction\n- Uses pre-fetched blockhash and cached SOL price for low-latency execution\n\n## Architecture\n\n### Core Components\n- **`main.rs`**: Application entry point\n- **`sniper.rs`**: Main sniper bot logic and transaction processing\n- **`config.rs`**: Configuration management and validation\n- **`price_cache.rs`**: SOL price fetching and caching\n- **`error.rs`**: Custom error types and handling\n- **`constants.rs`**: Application constants and known program IDs\n\n### Advanced Components (2024 Updates)\n- **`risk_management.rs`**: Advanced risk assessment and portfolio management\n- **`copy_trading.rs`**: Intelligent copy trading engine with trader analysis\n- **`jito_integration.rs`**: Jito MEV protection and ultra-fast transactions\n- **`grpc_manager.rs`**: Multiple gRPC connection management with failover\n- **`scam_detection.rs`**: AI-powered scam and honeypot detection\n- **`bonding_curve.rs`**: Advanced bonding curve calculations and simulations\n- **`same_block_execution.rs`**: Same-block execution for maximum speed\n\n## Configuration\n\n- **Market cap threshold**: Set `MARKET_CAP_THRESHOLD_USD` environment variable\n- **Buy amount**: Set `BUY_AMOUNT_SOL` environment variable\n- **Logging**: Uses `tracing` for structured logging\n\n## Security\n\n- **Never share your private key.** Use a dedicated wallet for sniping.\n- **Review the code** before running with real funds.\n- **Use environment variables** for sensitive configuration.\n\n## Performance\n\nThe Rust implementation offers several performance advantages:\n\n- **Zero-cost abstractions**: Rust's abstractions compile to efficient code\n- **Memory safety without garbage collection**: No GC pauses\n- **Efficient async runtime**: Tokio provides high-performance async I/O\n- **Compile-time optimizations**: Rust compiler optimizes aggressively\n\n## Documentation\n\n### Quick Start\n- **[QUICKSTART.md](QUICKSTART.md)** - Get running in 5 minutes!\n\n### Comprehensive Guides\n- **[README_RUST.md](README_RUST.md)** - Detailed Rust implementation guide\n- **[DOC_UPDATED.md](DOC_UPDATED.md)** - Complete documentation\n- **[CHANGELOG.md](CHANGELOG.md)** - Version history and updates\n\n### Key Topics\n- **Architecture Overview**: System design and data flow\n- **Advanced Features**: Same-block execution, Jito, AI detection\n- **Configuration Guide**: Environment variables and settings\n- **API Reference**: Complete function documentation\n- **Troubleshooting**: Common issues and solutions\n- **Best Practices**: Recommended usage patterns\n\n## 🛠️ Development\n\n### Building\n```sh\n# Debug build\ncargo build\n\n# Release build (optimized)\ncargo build --release\n\n# Run tests\ncargo test\n\n# Check code\ncargo check\n\n# Format code\ncargo fmt\n\n# Lint code\ncargo clippy\n```\n\n### Adding Features\nThe modular architecture makes it easy to extend:\n- Add new filters in `sniper.rs`\n- Modify configuration in `config.rs`\n- Add new error types in `error.rs`\n- Extend price sources in `price_cache.rs`\n\n## Troubleshooting\n\n- **Build errors**: Ensure you have the latest Rust toolchain\n- **gRPC connection issues**: Check your `GRPC_ENDPOINT` and `GRPC_AUTH_TOKEN`\n- **No buys happening**: Confirm the bot is receiving transactions and market cap logic is correct\n- **Performance issues**: Use release builds (`cargo run --release`)\n\n## License\n\nMIT\n---\n\n*Last Updated: December 2024*\n*Version: 2.0.0* \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcasatrick%2Fsolana-pumpfun-sniper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcasatrick%2Fsolana-pumpfun-sniper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcasatrick%2Fsolana-pumpfun-sniper/lists"}