AV1080p
Solana-Sniper-Bot
Rust

solana sniper bot solana sniper bot solana sniper bot solana sniper bot solana sniper bot https://t.me/av1080profit

Last updated Jul 7, 2026
2.0k
Stars
368
Forks
7
Issues
+3
Stars/day
Attention Score
83
Language breakdown
Rust 99.7%
Makefile 0.2%
Shell 0.1%
β–Έ Files click to expand
README

Solana PumpFun/PumpSwap Raydium Copy/Sniper Trading Bot

High-performance Rust bot that monitors wallets and DEX activity on Solana and automatically copies/snipes trades. πŸ“žcontact me PumpFun, PumpSwap, Raydium launchpad, Raydium Cpmm, Raydium Amm, Meteora DBC and Meteora Damm. It integrates a configurable selling engine with dynamic trailing stops. Jupiter is used for token liquidation. Recommended hosting service πŸ‘‰ TradoxVPS

Key Features

  • Real-time monitoring: Yellowstone gRPC stream, parallel task processing
  • Protocols: PumpFun (trade), PumpSwap (notify-only by default)
  • Copy trading: Follow one or many target wallets with exclusions
  • Risk & selling: Take profit, stop loss, dynamic trailing stop, copy-selling of existing balances
  • Tx landing: Zeroslot or normal mode, configurable priority fees
  • Utilities: Wrap/unwrap SOL, close empty token accounts, sell all tokens via Jupiter

How it works (logic)

  • Load .env, build Config and initialize clients (RPC, Yellowstone, ZeroSlot, wallet).
  • Start the BlockhashProcessor, token-account cache, and cache maintenance.
  • Initialize SellingEngine from env and optionally start copy-selling for existing tokens.
  • Launch two monitors in parallel:
- Target wallet monitoring (processor/sniper_bot.rs) - DEX monitoring (processor/sniper_bot.rs), protocol auto-detection or preference
  • Parse candidate transactions/logs, filter excluded addresses and apply limits.
  • Execute swaps. Apply slippage and priority-fee settings; optionally use ZeroSlot mode.
  • Manage positions with the selling strategy (TP/SL/dynamic trailing). Liquidation paths use Jupiter.
  • Maintain a per-token 20-slot time-series (price, buy/sell volume) to detect post-drop bottoms, enabling sniper entries and informed copy trades.
flowchart TD
  A[Start] --> B[Load .env]
  B --> C[Init RPC, Yellowstone, ZeroSlot, Wallet]
  C --> D[Start Blockhash Processor]
  D --> E[Init Token Account Cache]
  E --> F[Start Cache Maintenance]
  F --> G[Init Selling Engine]
  G --> H{Run monitors in parallel}
  H --> I[Target Wallet Monitoring]
  H --> J[DEX Monitoring]
  I --> K[Parse txs/logs]
  J --> K
  K --> L{Protocol match}
  L --> |PumpFun| M[Execute swap]
  L --> |PumpSwap| N[Notify only]
  M --> O[Update selling / copy-sell]
  O --> P[Dynamic trailing / TP / SL]
  P --> Q[Jupiter sell path]
  K --> R[Update 20-slot time series]
  R --> S{Bottom detected?}
  S --> |Yes| M
  S --> |No| H
  N --> Q

Project structure

src/
  common/                # config, constants, logger, caches
  common/timeseries.rs   # 20-slot price & volume time-series, bottom detection
  library/               # blockhash processor, jupiter client, rpc, zeroslot
  processor/             # monitoring, swap/execution, selling, risk mgmt, parsing
  dex/                   # protocol adapters: pumpfun.rs, pumpswap.rs, raydium_launchpad.rs
  block_engine/          # helpers for token accounts & txs
  error/                 # error types
  main.rs                # entrypoint & CLI helpers (wrap/unwrap/sell/close)

Important files:

  • src/main.rs: starts services, parallel monitors, CLI helpers (--wrap, --unwrap, --sell, --close).
  • src/common/config.rs: loads env, builds Config, RPC/yellowstone clients, wallet, slippage, fees.
  • src/processor/sniper_bot.rs: wallet/DEX monitoring orchestration.
  • src/processor/selling_strategy.rs: selling engine with dynamic trailing stop.
  • src/library/jupiter_api.rs: quotes and executes swaps for liquidation.
  • src/library/blockhash_processor.rs: keeps recent blockhashes updated.

Setup

Prerequisites:

  • Rust toolchain (stable), Cargo
  • Access to a Solana RPC (RPC_HTTP) and Yellowstone gRPC endpoint
1) Clone and create env file
cp src/env.example .env

Edit .env with your keys and endpoints

2) Build

cargo build --release

3) Run

cargo run --release

CLI helpers (run one at a time):

cargo run --release -- --wrap      # Wrap WRAP_AMOUNT SOL to WSOL
cargo run --release -- --unwrap    # Unwrap WSOL back to SOL
cargo run --release -- --sell      # Sell all tokens via Jupiter
cargo run --release -- --close     # Close all token accounts (excl. WSOL with balance)

Environment variables

Copy from src/env.example and adjust. Key settings (not exhaustive):

  • Targeting & trading
- COPYTRADINGTARGET_ADDRESS: comma-separated wallet list to follow - ISMULTICOPY_TRADING: true/false - EXCLUDED_ADDRESSES: comma-separated addresses to ignore - COUNTER_LIMIT: max number of trades - TOKEN_AMOUNT: buy amount (qty if SwapInType::Qty) - SLIPPAGE: basis points (e.g. 3000 = 30%) - TRANSACTIONLANDINGSERVICE: 0|zeroslot or 1|normal
  • Fees & priority
- SELLINGUNITPRICE: priority fee for selling txs (default 4000000) - SELLINGUNITLIMIT: compute units for selling - ZEROSLOTTIP_VALUE: tip used in zeroslot mode
  • Selling strategy
- COPYSELLINGLIMIT: initial multiple to start copy-selling - TAKEPROFIT, STOPLOSS, MAXHOLDTIME - DYNAMICTRAILINGSTOP_THRESHOLDS: e.g. 20:5,50:10,100:30,200:100,500:100,1000:100 - DYNAMICRETRACEMENTPERCENTAGE, RETRACEMENTPNLTHRESHOLD, RETRACEMENT_THRESHOLD - MIN_LIQUIDITY - Time-series bottom detection (optional, future envs): BOTTOMMINDROPPCT, BOTTOMSELLDECLINEPCT, BOTTOMSTABILIZESLOTS
  • Sniper focus
- FOCUSDROPTHRESHOLD_PCT: fraction drop to mark token as dropped - FOCUSTRIGGERSOL: buy trigger size after drop (in SOL)
  • Endpoints
- RPC_HTTP: HTTP RPC endpoint - RPC_WSS: optional WSS endpoint - YELLOWSTONEGRPCHTTP: Yellowstone gRPC URL - YELLOWSTONEGRPCTOKEN: Yellowstone token - ZEROSLOTURL, ZEROSLOTHEALTH: ZeroSlot endpoints
  • Wallet
- PRIVATE_KEY: base58-encoded keypair string - WRAP_AMOUNT: SOL amount for --wrap

Example .env snippet:

RPCHTTP=https://rpc.shyft.to?apikey=YOURAPIKEY
YELLOWSTONEGRPCHTTP=https://grpc.ny.shyft.to
YELLOWSTONEGRPCTOKEN=YOURGRPCTOKEN
PRIVATEKEY=YOURBASE58PRIVATEKEY

COPYTRADINGTARGET_ADDRESS=ADDRESS1,ADDRESS2 ISMULTICOPY_TRADING=true EXCLUDED_ADDRESSES=675kPX9MHTj...,CPMMoo8L3F...

TOKEN_AMOUNT=0.001 SLIPPAGE=3000 TRANSACTIONLANDINGSERVICE=zeroslot SELLINGUNITPRICE=4000000 SELLINGUNITLIMIT=2000000 ZEROSLOTTIP_VALUE=0.0025

TAKE_PROFIT=8.0 STOP_LOSS=-2 MAXHOLDTIME=3600 DYNAMICTRAILINGSTOP_THRESHOLDS=20:5,50:10,100:30,200:100,500:100,1000:100


Notes

  • PumpSwap is configured as notification-only by default. Extend dex/pump_swap.rs to enable execution.
  • Ensure your PRIVATE_KEY is a base58 string of sufficient length; the app validates it at startup.
  • If SLIPPAGE exceeds 10000 (100%), it is capped.

License

For personal/educational use. Review and comply with your jurisdiction and exchange/DEX terms.

πŸ”— More in this category

Β© 2026 GitRepoTrend Β· AV1080p/Solana-Sniper-Bot Β· Updated daily from GitHub