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.

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

RequirementDescription
Solana WalletA funded wallet with SOL for trading. Create one with: solana-keygen new -o wallet.json
RPC AccessAPI keys from providers like Helius, Shyft, QuickNode, or Alchemy
ShredStreamAccess 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_blacklist

Tip: 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-gnu

Configuration Reference

Create a config.toml file in the same directory as the sniperbot binary.

Trading Settings

OptionTypeDescription
purchase_amount_solNumberAmount of SOL to spend per snipe (e.g., 0.001)
slippage_basis_pointsNumberSlippage tolerance in basis points. 100 = 1%, 200 = 2%
liveBooleantrue = real trading, false = dry-run mode (no actual transactions)
1purchase_amount_sol = 0.001
2slippage_basis_points = 100
3live = true

Wallet Configuration

OptionTypeDescription
payer_keypair_pathStringPath to your Solana wallet JSON file
1payer_keypair_path = "./wallet.json"

Warning: Never share your wallet keypair file with anyone!


AllenHark Services

OptionTypeDescription
shredstream_uriStringShredStream endpoint URL for real-time data
x_tokenStringYour ShredStream authentication token
relayStringAllenHark Relay endpoint for fast transaction submission
keep_alive_urlStringURL to ping for keeping connection alive
tip_walletStringWallet to receive Jito tips
tip_lamportsNumberTip 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_000

RPC Configuration

OptionTypeDescription
rpc_poolArrayList of RPC endpoints to use (load balanced)
default_rpcStringPrimary RPC endpoint for transactions
default_wss_rpcStringWebSocket RPC for streaming blockhash updates
use_fast_senderBooleanEnable 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

OptionTypeDescription
user_volume_accumulatorStringPDA 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:

OptionTypeDescription
min_dev_buy_solNumberMinimum SOL the dev must spend (skip cheap launches)
max_dev_buy_solNumberMaximum 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 SOL

Why filter dev buys?

  • Too low (< 0.5 SOL): Often spam or test tokens
  • Too high (> 5 SOL): Dev might dump immediately

Transaction Timing

OptionTypeDescription
confirmation_wait_msNumberMilliseconds to wait before selling after buy
balance_check_max_retriesNumberHow 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 times

Spam Filter

Additional filters to avoid spam tokens. Place under a [spam_filter] section:

OptionTypeDescription
min_buy_solNumberMinimum buy amount to consider
max_buy_solNumberMaximum buy amount to consider
min_tokensNumberMinimum token amount in transaction
min_accountsNumberMinimum 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 = 8

Account Whitelist (Optional)

Only snipe tokens from specific wallet addresses:

OptionTypeDescription
account_includeArrayList 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 creators

Download 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.jsonl

The 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./sniperbot

The bot will:

  1. Connect to ShredStream
  2. Monitor for new PumpFun tokens (both standard and Token 2022)
  3. Filter based on your settings
  4. Buy qualifying tokens
  5. Sell after confirmation
  6. Track profits and update blacklist

Utility Commands

CommandDescription
./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_blacklistRepair 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_blacklist

Fees

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 = true

Aggressive (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 = true

Security Best Practices

  1. Never share your wallet keypair (wallet.json)
  2. Keep your RPC API keys private — don't commit config.toml to public repos
  3. Keep your ShredStream token private — don't share your x_token
  4. Start with small amounts — test with purchase_amount_sol = 0.001 first
  5. Use dry-run mode — set live = false to test without real transactions
  6. Monitor your wallet balance — the bot will spend SOL on every qualifying token
  7. 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

ProblemSolution
Bot won't startCheck config.toml exists and is valid TOML format
No tokens being snipedVerify ShredStream is running and accessible, check filter settings
Transactions failingEnsure wallet has enough SOL, increase slippage_basis_points
Blacklist errorsRun ./fix_blacklist to repair corruption
ShredStream not connectingVerify 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_pool are reachable
  • Verify wallet balance: Make sure you have enough SOL for trades + fees + tips
  • Check AllenHark Relay: Ensure relay URL is accessible

Support


Built with ⚡ by AllenHark | Powered by AllenHark ShredStream