🧩 Key Features of the Solana Sandwich Bot - cryptoking-max/solana-sandwich-bot GitHub Wiki

🧩 Key Features of the Solana Sandwich Bot

⚑ Ultra-Fast Mempool Monitoring

  • Uses private Solana RPC (e.g., Helius, Triton) for near-instant mempool data.
  • Real-time detection of pending swap instructions.
  • Supports both WebSocket and gRPC stream handling.

🧠 Smart Transaction Filtering

  • Filters swap transactions by:

    • Minimum swap amount (e.g., >1000 USDC)
    • Slippage tolerance
    • Liquidity pool depth
  • Targets only Jupiter aggregator or Orca/other DEXes with predictable routing.


πŸ” Profit Simulation Engine

  • Simulates both front-run buy and back-run sell using:

    • Jupiter Quote API
    • Live token prices and estimated slippage
  • Evaluates:

    • Potential price impact
    • Profitability margin (including gas)

🏹 Front-Run + Back-Run Execution

  • Sends manual crafted Solana transactions:

    • With high compute unit price
    • Without pre-flight checks (for speed)
  • Prioritizes your front-run TX before victim’s

  • Executes back-run sell TX after confirmation


πŸ” Secure Key Handling

  • Private key loaded from .env or secure key store
  • Transactions signed locally using @solana/web3.js
  • Option to integrate with ledger or hardware wallet (advanced)

πŸ“Š PnL and Analytics Tracking

  • Logs for each sandwich attempt:

    • Entry/exit price
    • Gas cost
    • Net profit/loss
  • Option to export logs to:

    • JSON
    • CSV
    • MongoDB (optional)

πŸ”” Telegram Alert Integration (Optional)

  • Sends real-time alerts to your Telegram:

    • Successful sandwich
    • TX hashes and PnL
    • Errors or RPC bans
  • Easily integrated using telegraf or node-telegram-bot-api


πŸ›‘ Anti-Detection & Safety

  • Avoids sandwiching whitelisted addresses (e.g., team wallets)
  • Rate-limiting to prevent RPC bans
  • Anti-replay protection (ignore duplicate TXs)

🌐 Modular, Configurable System

  • Simple .env config file:

    RPC_URL=
    PRIVATE_KEY=
    SLIPPAGE=
    MIN_SWAP_AMOUNT=
    
  • Flags for:

    • Dry run / simulate
    • Logging verbosity
    • Alert toggles

πŸ”„ Continuous Operation

  • Handles Solana block finality gracefully
  • Retries dropped transactions
  • Keeps track of latest confirmed block