A high-performance liquidity sniping bot for Uniswap V5 and Unichain L2, featuring async mempool monitoring, Flashbots integration, and honeypot detection.
- Python 3.10+
- Alchemy or Infura WebSocket RPC
- (Optional) Flashbots reputation key
# Clone the repository
git clone https://github.com/yourusername/evm-mempool-sniper.git
cd evm-mempool-sniper
# Create virtual environment
python -m venv .venv
.venv\Scripts\activate # Windows
# source .venv/bin/activate # Linux/Mac
# Install dependencies
pip install -r requirements.txt
# Configure environment
cp .env.example .env
# Edit .env with your RPC URLs and private keypython sniper.pyExpected Output:
=================================================================
UNISWAP SNIPER BOT v1.0.0
Mempool Monitor | Flashbots Protect | Multi-Chain
=================================================================
[2024-05-22 14:30:15] INFO: Starting Ethereum mempool monitor...
[2024-05-22 14:30:17] INFO: Connected to Sepolia Testnet via Infura.
[2024-05-22 14:31:02] EVENT: PairCreated detected on Uniswap V2!
[2024-05-22 14:31:02] EVENT: PairCreated detected on Uniswap V2! Token: 0x....8f2a (TEST/ETH)
[2024-05-22 14:31:02] ACTION: Initiating buy transaction... Gas: 150 gwei
[2024-05-22 14:31:03] SUCCESS: Buy transaction confirmed in block 5678901.
[2024-05-22 14:31:05] INFO: Calculating arbitrage opportunity...
[2024-05-22 14:31:06] ACTION: Executing sell on Sushiswap...
[2024-05-22 14:31:08] SUCCESS: Sell transaction confirmed. Simulated Profit: +0.045 ETH
[2024-05-22 14:31:10] INFO: Continuing mempool scan...
Edit .env with your settings:
# RPC Endpoints (WebSocket required)
ETH_WSS=wss://eth-mainnet.g.alchemy.com/v2/YOUR_KEY
# Wallet (use dedicated wallet!)
PRIVATE_KEY=your_private_key
# Flashbots
FLASHBOTS_RELAY=https://relay.flashbots.netTrading parameters in sniper.py:
SNIPE_AMOUNT_ETH = 0.5 # ETH per snipe
SLIPPAGE_PERCENT = 5.0 # Max slippage
PRIORITY_FEE_GWEI = 2.5 # Miner tip
MAX_BUY_TAX = 10.0 # Max acceptable taxMIT License - see LICENSE for details.
Built with ❤️ for the Web3 community







