PumpFun Sniper Bot
A high-performance Solana sniper bot that detects and trades new PumpFun token launches in the first block using AllenHark's ultra-low latency ShredStream service.
- GitHub Repository: AllenHark-Inc/PumpFun-Sniper
- Releases: Download Latest
Features
- First-Block Sniping — Detects new PumpFun token creations via ShredStream and executes trades in the same block
- Ultra-Low Latency — Direct shred processing for sub-millisecond detection times
- Token 2022 Support — Works with both standard SPL tokens and Token 2022 (SPL-22)
- Automatic Buy/Sell — Configurable automatic buying and selling with profit tracking
- Smart Filtering — Customizable filters for dev buy amounts, token metrics, and spam detection
- Blacklist System — Automatic blacklisting of unprofitable creators to avoid repeat losses
- AllenHark Integration — Optimized for AllenHark Relay and ShredStream services
Before You Start
| Requirement | Description |
|---|---|
| Solana Wallet | A funded wallet with SOL for trading. Create one with: solana-keygen new -o wallet.json |
| RPC Access | API keys from providers like Helius, Shyft, QuickNode, or Alchemy |
| ShredStream | Access to AllenHark ShredStream for real-time data. Sign up at allenhark.com |
Installation
Option 1: Download Pre-built Binaries (Recommended)
Download the latest release from the releases page:
1# Download the latest release
2wget https://github.com/AllenHark-Inc/PumpFun-Sniper/releases/latest/download/pumpfun-sniper-linux-v3.0.4.tar.gz
3
4# Extract
5tar -xzf pumpfun-sniper-linux-v3.0.4.tar.gz
6cd linux
7
8# Make binaries executable
9chmod +x sniperbot sell_token add_blacklist fix_blacklist test_blacklistTip: Check the releases page for the newest version — the filename will match the pattern
pumpfun-sniper-linux-v{VERSION}.tar.gz.
Download Links:
Option 2: Build from Source
Note: Access to the private source code repository requires a one-time purchase of 40 SOL. Contact us via Discord or visit AllenHark.com for access.
Once you have access to the private repository:
1# Clone the private repository (requires access)
2git clone https://github.com/AllenHark-Inc/Ark-Shreds-Consumer-Rs.git
3cd Ark-Shreds-Consumer-Rs
4
5# Build for Linux
6cargo build --release --target x86_64-unknown-linux-gnuConfiguration Reference
Create a config.toml file in the same directory as the sniperbot binary.
Trading Settings
| Option | Type | Description |
|---|---|---|
purchase_amount_sol | Number | Amount of SOL to spend per snipe (e.g., 0.001) |
slippage_basis_points | Number | Slippage tolerance in basis points. 100 = 1%, 200 = 2% |
live | Boolean | true = real trading, false = dry-run mode (no actual transactions) |
1purchase_amount_sol = 0.001
2slippage_basis_points = 100
3live = trueWallet Configuration
| Option | Type | Description |
|---|---|---|
payer_keypair_path | String | Path to your Solana wallet JSON file |
1payer_keypair_path = "./wallet.json"Warning: Never share your wallet keypair file with anyone!
AllenHark Services
| Option | Type | Description |
|---|---|---|
shredstream_uri | String | ShredStream endpoint URL for real-time data |
x_token | String | Your ShredStream authentication token |
relay | String | AllenHark Relay endpoint for fast transaction submission |
keep_alive_url | String | URL to ping for keeping connection alive |
tip_wallet | String | Wallet to receive Jito tips |
tip_lamports | Number | Tip amount in lamports (1 SOL = 1,000,000,000 lamports) |
1shredstream_uri = "http://127.0.0.1:9090"
2x_token = "ss_your_token_here"
3relay = "https://relay.allenhark.com/v1/sendTx"
4keep_alive_url = "https://relay.allenhark.com/ping"
5tip_wallet = "harkYFxB6DuUFNwDLvA5CQ66KpfRvFgUoVypMagNcmd"
6tip_lamports = 1_000_000RPC Configuration
| Option | Type | Description |
|---|---|---|
rpc_pool | Array | List of RPC endpoints to use (load balanced) |
default_rpc | String | Primary RPC endpoint for transactions |
default_wss_rpc | String | WebSocket RPC for streaming blockhash updates |
use_fast_sender | Boolean | Enable Jito-style fast transaction sending |
1use_fast_sender = true
2default_rpc = "https://rpc.shyft.to?api_key=YOUR_KEY"
3default_wss_rpc = "wss://rpc.shyft.to?api_key=YOUR_KEY"
4
5rpc_pool = [
6 "https://mainnet.helius-rpc.com/?api-key=YOUR_KEY",
7 "https://rpc.shyft.to?api_key=YOUR_KEY",
8 "https://solana-mainnet.g.alchemy.com/v2/YOUR_KEY"
9]PumpFun Settings
| Option | Type | Description |
|---|---|---|
user_volume_accumulator | String | PDA derived from your wallet for PumpFun volume tracking |
This is automatically calculated from your wallet on first run. You do not need to set it manually.
Dev Buy Filter
Filter tokens based on how much SOL the developer spent on their initial buy:
| Option | Type | Description |
|---|---|---|
min_dev_buy_sol | Number | Minimum SOL the dev must spend (skip cheap launches) |
max_dev_buy_sol | Number | Maximum SOL the dev can spend (skip potential dumps) |
1min_dev_buy_sol = 0.5 # Only snipe if dev bought with 0.5+ SOL
2max_dev_buy_sol = 4.5 # Skip if dev bought with more than 4.5 SOLWhy filter dev buys?
- Too low (< 0.5 SOL): Often spam or test tokens
- Too high (> 5 SOL): Dev might dump immediately
Transaction Timing
| Option | Type | Description |
|---|---|---|
confirmation_wait_ms | Number | Milliseconds to wait before selling after buy |
balance_check_max_retries | Number | How many times to retry checking token balance |
1confirmation_wait_ms = 2301 # Wait ~2.3 seconds before selling
2balance_check_max_retries = 5 # Retry up to 5 timesSpam Filter
Additional filters to avoid spam tokens. Place under a [spam_filter] section:
| Option | Type | Description |
|---|---|---|
min_buy_sol | Number | Minimum buy amount to consider |
max_buy_sol | Number | Maximum buy amount to consider |
min_tokens | Number | Minimum token amount in transaction |
min_accounts | Number | Minimum accounts in transaction (real tokens have more) |
1[spam_filter]
2min_buy_sol = 0.01
3max_buy_sol = 10.0
4min_tokens = 1000
5min_accounts = 8Account Whitelist (Optional)
Only snipe tokens from specific wallet addresses:
| Option | Type | Description |
|---|---|---|
account_include | Array | List of wallet addresses to whitelist |
1account_include = [
2 "ABC123...",
3 "DEF456..."
4]Leave this unset to snipe all qualifying tokens.
Complete Configuration Example
1# === TRADING ===
2purchase_amount_sol = 0.001
3slippage_basis_points = 100
4live = true
5
6# === WALLET ===
7payer_keypair_path = "./wallet.json"
8
9# === ALLENHARK SERVICES ===
10shredstream_uri = "http://127.0.0.1:9090"
11x_token = "ss_your_token_here"
12relay = "https://relay.allenhark.com/v1/sendTx"
13keep_alive_url = "https://relay.allenhark.com/ping"
14tip_wallet = "harkYFxB6DuUFNwDLvA5CQ66KpfRvFgUoVypMagNcmd"
15tip_lamports = 1_000_000
16
17# === RPC ===
18use_fast_sender = true
19default_rpc = "https://rpc.shyft.to?api_key=YOUR_KEY"
20default_wss_rpc = "wss://rpc.shyft.to?api_key=YOUR_KEY"
21rpc_pool = [
22 "https://mainnet.helius-rpc.com/?api-key=YOUR_KEY",
23 "https://rpc.shyft.to?api_key=YOUR_KEY"
24]
25
26# === FILTERS ===
27min_dev_buy_sol = 0.5
28max_dev_buy_sol = 4.5
29confirmation_wait_ms = 2301
30balance_check_max_retries = 5
31
32[spam_filter]
33min_buy_sol = 0.01
34max_buy_sol = 10.0
35min_tokens = 1000
36min_accounts = 8
37
38# account_include = [] # Optional: whitelist specific creatorsDownload Initial Blacklist (Recommended)
Download the pre-populated blacklist to avoid known malicious wallets:
1# Download the latest blacklist (updated daily)
2wget https://allenhark.com/blacklist.jsonl -O blacklist.jsonl
3
4# Or use curl
5curl -o blacklist.jsonl https://allenhark.com/blacklist.jsonlThe blacklist is updated daily with high-frequency token launchers and known rug pullers. The bot will automatically update this file as it detects unprofitable trades.
Learn more: Blacklist Guide
Usage
Start the Bot
1./sniperbotThe bot will:
- Connect to ShredStream
- Monitor for new PumpFun tokens (both standard and Token 2022)
- Filter based on your settings
- Buy qualifying tokens
- Sell after confirmation
- Track profits and update blacklist
Utility Commands
| Command | Description |
|---|---|
./sell_token --token <MINT> | Manually sell a specific token |
./add_blacklist <WALLET> | Block a creator wallet |
./test_blacklist <WALLET> | Check if wallet is blacklisted |
./fix_blacklist | Repair corrupted blacklist file |
Examples:
1# Manually sell a token
2./sell_token --token GRTZHBm1X6N6rx99UowUbnTDUe5AFStJHqcw5bGApump
3
4# Add wallet to blacklist
5./add_blacklist 7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU
6
7# Check if wallet is blacklisted
8./test_blacklist 7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU
9
10# Repair corrupted blacklist
11./fix_blacklistFees
Important: The bot charges 0.001 SOL before each buy and 0.001 SOL after each sell (total 0.002 SOL per complete trade cycle). Fees are charged regardless of trade profitability and are non-refundable.
Remove Fees: Purchase source code access for 40 SOL to remove all usage fees and customize the bot. Contact us on Discord or visit AllenHark.com.
Understanding the Output
The bot provides detailed real-time metrics:
⚡ Event Latency: 234 μs (direct channel, no ZMQ!)
🔄 Processing Mint: GRTZHBm1X6N6rx99UowUbnTDUe5AFStJHqcw5bGApump
🚀 PRE-FLIGHT TIME: 1.234ms (Channel -> Serialized, no ZMQ!)
✅ Token account confirmed and available
💰 Token account balance: 1234567 tokens
🔄 Preparing SELL transaction...
✅ Sell transaction sent!
💰 Profit Calculation:
Initial SOL balance: 10.123456789 SOL
Final SOL balance: 10.125678901 SOL
Rent recovered: 0.002039280 SOL
Total profit (with rent): 0.004261392 SOL
Recommended Settings
Beginner (Safe)
1purchase_amount_sol = 0.001
2slippage_basis_points = 200
3min_dev_buy_sol = 1.0
4max_dev_buy_sol = 3.0
5live = false # Test in dry-run mode first!Moderate
1purchase_amount_sol = 0.005
2slippage_basis_points = 150
3min_dev_buy_sol = 0.5
4max_dev_buy_sol = 4.0
5live = trueAggressive (High Risk)
1purchase_amount_sol = 0.01
2slippage_basis_points = 100
3min_dev_buy_sol = 0.3
4max_dev_buy_sol = 5.0
5confirmation_wait_ms = 1500
6live = trueSecurity Best Practices
- Never share your wallet keypair (
wallet.json) - Keep your RPC API keys private — don't commit
config.tomlto public repos - Keep your ShredStream token private — don't share your
x_token - Start with small amounts — test with
purchase_amount_sol = 0.001first - Use dry-run mode — set
live = falseto test without real transactions - Monitor your wallet balance — the bot will spend SOL on every qualifying token
- Review the blacklist regularly — ensure it's not blocking legitimate opportunities
Risk Disclaimer
Trading cryptocurrencies involves significant risk of loss. This bot is provided as-is with no guarantees of profit.
- PumpFun tokens are highly volatile and risky
- Many tokens are scams or rug pulls
- You may lose all SOL spent on trades
- Past performance does not guarantee future results
- Usage fees (0.002 SOL per trade cycle) are charged regardless of trade outcome and are non-refundable
- Always trade responsibly and only with funds you can afford to lose
Troubleshooting
| Problem | Solution |
|---|---|
| Bot won't start | Check config.toml exists and is valid TOML format |
| No tokens being sniped | Verify ShredStream is running and accessible, check filter settings |
| Transactions failing | Ensure wallet has enough SOL, increase slippage_basis_points |
| Blacklist errors | Run ./fix_blacklist to repair corruption |
| ShredStream not connecting | Verify shredstream_uri and x_token are correct |
Additional Troubleshooting Steps
- Delete and re-download blacklist:
curl -o blacklist.jsonl https://allenhark.com/blacklist.jsonl - Check RPC endpoints: Ensure all URLs in
rpc_poolare reachable - Verify wallet balance: Make sure you have enough SOL for trades + fees + tips
- Check AllenHark Relay: Ensure
relayURL is accessible
Support
- GitHub Repository: github.com/AllenHark-Inc/PumpFun-Sniper
- Blacklist Guide: allenhark.com/docs/blacklist
- Discord Support: discord.gg/JpzS72MAKG
- AllenHark Services: allenhark.com
Built with ⚡ by AllenHark | Powered by AllenHark ShredStream