Skip to content

A sophisticated Ethereum blockchain monitoring and trading bot designed to detect new token launches, analyze trading patterns, and identify expert trader wallets on Uniswap V2. This bot provides real-time monitoring capabilities for token liquidity events, trading activities, and automated tax calculation for potential trading opportunities.

Notifications You must be signed in to change notification settings

Vector-6/Ethereum_Snipping_Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ethereum Token Snipping Bot

A sophisticated Ethereum blockchain monitoring and trading bot designed to detect new token launches, analyze trading patterns, and identify expert trader wallets on Uniswap V2. This bot provides real-time monitoring capabilities for token liquidity events, trading activities, and automated tax calculation for potential trading opportunities.

🚀 Features

Core Functionality

  • Real-time Liquidity Detection: Monitors Uniswap V2 factory for new token pair creation events
  • Trading Event Detection: Tracks trading start events and liquidity additions from mempool
  • Expert Trader Identification: Analyzes trading patterns to identify successful wallet addresses
  • Tax Calculation: Automated buy/sell tax analysis for tokens
  • Buy Count Tracking: Monitors trading volume and activity patterns
  • Contract Analysis: Extracts function signatures from verified and unverified contracts

Key Modules

  • Liquidity Detection: Real-time monitoring of new token pair creation
  • Trading Event Detection: Mempool monitoring for trading start events
  • Trader Wallet Analysis: Expert trader identification and tracking
  • Tax Analysis: Automated calculation of buy/sell taxes
  • Volume Analysis: Trading volume and activity pattern tracking

📋 Prerequisites

  • Node.js (v14 or higher)
  • MongoDB database
  • Ethereum RPC endpoint (WebSocket recommended)
  • Etherscan API key
  • Private key for testing (optional)

🛠️ Installation

  1. Clone the repository

    git clone <repository-url>
    cd eth-snipping-bot
  2. Install dependencies

    npm install
  3. Environment Setup Create a .env file in the root directory:

    RPC_WSS_URL=wss://your-ethereum-websocket-endpoint
    VIRTUAL_RPC_URL=wss://your-virtual-rpc-endpoint
    MONGODB_URL=mongodb://localhost:27017/eth-snipping-bot
    ETHERSCAN_API=your-etherscan-api-key

🚀 Usage

Available Scripts

# Start the main application
npm start

# Monitor liquidity events
npm run liquidity

# Monitor trading events
npm run trading_event

# Monitor trader wallets
npm run trader_wallet

Individual Module Usage

1. Liquidity Detection

node modules/detect_liquidity.js

Monitors Uniswap V2 factory for new token pair creation events and displays:

  • Pair address
  • ETH and token balances
  • Token information (name, symbol, decimals, total supply)
  • Creation timestamp

2. Trading Event Detection

node modules/detect_trading_event.js

Monitors mempool for trading-related transactions:

  • openTrading() and setTrading(bool) events
  • addLiquidityETH() events
  • Real-time transaction analysis

3. Trader Wallet Analysis

node modules/detect_trader_wallet.js

Analyzes trading patterns to identify expert traders:

  • Tracks wallet addresses with successful trading history
  • Monitors front-running activities
  • Calculates expert level based on trading success
  • Stores data in MongoDB

4. Tax Calculation

node modules/calc_tax_amount.js

Calculates buy/sell taxes for tokens:

  • Simulates buy/sell transactions
  • Analyzes transfer events to determine tax rates
  • Provides detailed tax percentage calculations

📁 Project Structure

eth-snipping-bot/
├── common/
│   └── common.js              # Shared utility functions
├── constants/
│   ├── abi/
│   │   ├── ERC20.json         # ERC20 token ABI
│   │   ├── uniswapV2Factory.json
│   │   └── uniswapV2Router.json
│   └── constants.js           # Contract addresses and constants
├── modules/
│   ├── calc_tax_amount.js     # Tax calculation module
│   ├── detect_liquidity.js    # Liquidity detection
│   ├── detect_trader_wallet.js # Trader analysis
│   ├── detect_trading_event.js # Trading event detection
│   ├── get_buy_count.js       # Buy count tracking
│   ├── get_contract_function.js # Contract analysis
│   └── get_correct_eth.js     # ETH calculation utilities
├── index.js                   # Main application entry point
├── package.json
└── README.md

🔧 Configuration

Environment Variables

Variable Description Required
RPC_WSS_URL Ethereum WebSocket RPC endpoint Yes
VIRTUAL_RPC_URL Virtual RPC for testing Yes
MONGODB_URL MongoDB connection string Yes
ETHERSCAN_API Etherscan API key Yes

Contract Addresses

The bot is configured to work with:

  • Uniswap V2 Factory: 0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f
  • Uniswap V2 Router: 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
  • WETH: 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2

📊 Database Schema

Wallet Lists Collection

{
  address: String,           // Wallet address
  eth_balance: String,       // Current ETH balance
  last_block: Number,        // Last block number
  front_running: Number,     // Front-running count
  expert_level: Number,      // Expert level score
  trading_count: Number      // Total trading count
}

⚠️ Important Notes

Security Considerations

  • Private Key Management: Never commit private keys to version control
  • API Key Security: Keep your Etherscan API key secure
  • Network Security: Use secure RPC endpoints
  • Testing: Always test on testnets before mainnet usage

Legal Disclaimer

This bot is for educational and research purposes only. Users are responsible for:

  • Complying with local regulations
  • Understanding the risks of automated trading
  • Ensuring proper authorization for any trading activities
  • Being aware of potential MEV (Maximal Extractable Value) implications

🐛 Troubleshooting

Common Issues

  1. Connection Errors

    • Verify RPC endpoint URLs
    • Check network connectivity
    • Ensure WebSocket connections are supported
  2. MongoDB Connection

    • Verify MongoDB is running
    • Check connection string format
    • Ensure database permissions
  3. API Rate Limits

    • Monitor Etherscan API usage
    • Implement rate limiting if needed
    • Consider upgrading API plan

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

⚡ Performance Tips

  • Use WebSocket connections for real-time monitoring
  • Implement proper error handling and reconnection logic
  • Monitor memory usage for long-running processes
  • Consider using connection pooling for database operations
  • Implement proper logging for debugging and monitoring

🔮 Future Enhancements

  • Support for Uniswap V3
  • Multi-chain support (BSC, Polygon, etc.)
  • Advanced MEV detection
  • Machine learning for trader pattern analysis
  • Web interface for monitoring and control
  • Alert system for specific events
  • Historical data analysis tools

Disclaimer: This software is provided for educational purposes only. Trading cryptocurrencies involves substantial risk of loss and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to trade, you should carefully consider your investment objectives, level of experience, and risk appetite.

About

A sophisticated Ethereum blockchain monitoring and trading bot designed to detect new token launches, analyze trading patterns, and identify expert trader wallets on Uniswap V2. This bot provides real-time monitoring capabilities for token liquidity events, trading activities, and automated tax calculation for potential trading opportunities.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published