# PumpFun Sniper - Product Knowledge Base ## Overview **Status:** Active **Type:** High-frequency Trading Bot **Infrastructure:** AllenHark Relay, ShredStream (0-Slot) The PumpFun Sniper is a specialized bot for sniping new token launches on Pump.fun in the very first block. It leverages direct shred access (ShredStream) to detect token creation before RPCs, and the AllenHark Relay to land buy transactions in the same slot. ## Configuration (`config.toml`) The bot is configured via a TOML file. This is the standard configuration for deployment. ```toml # Trading Parameters purchase_amount_sol = 0.001 # SOL to spend per snipe slippage_basis_points = 100 # 100 = 1% slippage tolerance live = true # Set false for dry-run mode # Wallet Configuration payer_keypair_path = "./wallet.json" # AllenHark Services (for best performance) relay = "https://relay.allenhark.com/v1/sendTx" quic = "84.32.223.83:4433" shredstream_uri = "http://[IP_ADDRESS]:9090" tip_wallet = "harkYFxB6DuUFNwDLvA5CQ66KpfRvFgUoVypMagNcmd" tip_lamports = 1_000_000 # 0.001 SOL tip per transaction # PumpFun Configuration user_volume_accumulator = "YOUR_DERIVED_PDA" # RPC Pool rpc_pool = [ "https://mainnet.helius-rpc.com/?api-key=YOUR_KEY", "https://rpc.shyft.to?api_key=YOUR_KEY" ] # Dev Buy Filter min_dev_buy_sol = 0.5 max_dev_buy_sol = 4.5 # Spam Filter [spam_filter] min_buy_sol = 0.01 max_buy_sol = 10.0 min_tokens = 1000 min_accounts = 8 ``` --- ## Usage Guide ### Installation ```bash # Download binary wget https://github.com/AllenHark-Inc/PumpFun-Sniper/releases/latest/ tar -xzf sniperbot-linux-x86_64.tar.gz chmod +x sniperbot sell_token add_blacklist fix_blacklist test_blacklist ``` ### CLI Commands **1. Start Sniper** ```bash ./sniperbot --config config.toml ``` **2. Manual Shell** ```bash ./sell_token --token ``` **3. Blacklist Management** ```bash # Add wallet ./add_blacklist # Check wallet ./test_blacklist # Repair database ./fix_blacklist ``` --- ## Features 1. **0-Slot Entry**: Detects mints via ShredStream (UDP) and sends via Relay (QUIC). 2. **Smart Filtering**: * **Dev Buy**: Filters based on amount of SOL the developer buys. * **Spam**: Analyzes token metadata and distribution. * **Blacklist**: Cross-references verified rug-pullers. 3. **Auto-Management**: * Automatic Stop-Loss / Take-Profit. * Disconnects automatically if `shredstream` goes down to prevent blind buying. --- ## Detailed Q&A ### Operation & Funding **Q: How much SOL should I keep in the bot wallet?** A: We recommend keeping at least **0.5 - 1.0 SOL** in the wallet. * **Reason:** You need enough for the `purchase_amount_sol` + `tip_lamports` + Solana Rent + Transaction Fees. If your balance drops too low, transactions will fail locally before being sent. **Q: What is "Dry Run" mode?** A: When `live = false` in your config, the bot does everything *except* send the transaction. It listens to shreds, filters tokens, and logs "I WOULD have bought Token X". This is excellent for tuning your filters (e.g., `min_dev_buy_sol`) without losing money. ### Performance & Networking **Q: Why does the bot shutdown automatically?** A: The bot has a safety "Dead Man's Switch". If it stops receiving data from `shredstream` (the shred source) for more than 5 seconds, it will automatically shut down. * **Why:** Operating on stale data is dangerous. You might try to buy a token that rug-pulled 10 seconds ago. * **Fix:** Ensure your ShredStream provider (or local Jito node) is stable. **Q: What is "0-Slot" really?** A: "0-Slot" means landing in the same block the token was created. * **Standard RPC:** You see the token in Block N, you send tx, it lands in Block N+1 or N+2. * **AllenHark Setup:** You see the "shred" (raw data) of Block N while it is being built. You send the tx immediately. The leader packs your tx into the *end* of Block N. ### Troubleshooting **Q: I keep filtering out good tokens. How do I fix this?** A: Check your `min_dev_buy_sol`. * If set to `0.5`, you will miss launches where the dev only spent `0.2` SOL. * Lowering it increases risk (more spam/rugs). Raising it increases safety but misses "micro-launches". Adjust based on your risk tolerance. **Q: How do I take profits manually?** A: If the auto-seller hasn't triggered yet but you want out: 1. Open a second terminal. 2. Run `./sell_token --token `. This will force an immediate dump of your entire position for that token using the configured relay.