TRUSTBOT is a GUI trading bot built with Electron, designed for automated trading on the Base network (Layer 2). It features multiple trading strategies, real-time WebSocket monitoring, and a robust multi-provider RPC infrastructure for maximum reliability.
- ๐ฅ๏ธ Modern GUI Interface - Intuitive Electron-based desktop application
- โก Real-time Trading - WebSocket integration for instant market response
- ๐ Multi-Provider RPC - Alchemy, QuickNode, Infura + dynamic providers
- ๐ก๏ธ Robust Architecture - Modular design with automatic failover
- ๐ TRUSTSWAP Integration - Optimized 0.25% fee trading through TRUSTSWAP contract
Automated token purchasing with advanced execution modes
- Logic: Purchases tokens using VIRTUAL or other currencies
- Methods: Direct purchase, TWAP (Time-Weighted Average Price)
- RPC Usage: Multi-provider rotation for transaction execution
- Features: Percentage-based amounts, loop execution, parallel wallet processing
Smart token selling with multiple execution strategies
- Logic: Sells tokens for VIRTUAL or other currencies with optimized timing
- Methods: Regular sell, TWAP mode, FSH (Flash Sell All)
- RPC Usage: WebSocket balance monitoring + RPC transaction execution
- Features: Multi-token support, automatic pool detection, blacklist protection
Volume generation through automated buy-sell cycles
- Logic: Creates trading volume by executing rapid buyโsell cycles
- Methods: Parallel execution with consecutive nonces (n, n+1)
- RPC Usage: Real-time balance tracking with WebSocket optimization
- Features: Amount randomization (ยฑ10%), timeout handling, performance tracking
Automated market making with dynamic range trading
- Logic: Provides liquidity through strategic buy-low/sell-high operations
- Methods: Range-based trading with configurable price thresholds
- RPC Usage: WebSocket price monitoring + transaction execution
- Features: Dynamic position tracking, profit optimization, risk management
Genesis contract monitoring and automated token acquisition
- Logic: Monitors genesis contracts for new token deployments and auto-trades
- Methods: WebSocket event detection โ parallel approvals โ immediate swapping
- RPC Usage: Real-time WebSocket monitoring + RPC fallback
- Features: Token blacklist protection, REBUY mode, multi-wallet parallel processing
Primary Providers:
โโโ Alchemy (Primary RPC + WebSocket)
โโโ QuickNode/BlastAPI (Backup RPC)
โโโ Infura (WebSocket + RPC)
โโโ Dynamic RPCs (User configurable)
Failover Strategy:
Sequential provider rotation with health monitoring
- Real-time Balance Monitoring: Transfer event listeners
- Transaction Confirmation: Block event monitoring
- Price Tracking: Swap event detection
- Approval Monitoring: ERC20 approval events
- Provider Redundancy: Infura primary โ Alchemy fallback
Core Trading Flow:
1. Token Resolution (Database โ API โ RPC)
2. Balance Verification (WebSocket + RPC)
3. Approval Management (Unlimited approvals)
4. Transaction Execution (TRUSTSWAP primary + Pool fallback)
5. Confirmation Monitoring (WebSocket events)
- Node.js 16+
- Windows/macOS/Linux
- Base network RPC access
# Clone the repository
git clone <repository-url>
cd trust-bot
# Install dependencies
npm install
# Configure wallets (see Configuration section)
# Edit wallets.json with your settings
# Start the GUI application
npm startEdit wallets.json to configure RPCS:
{
"config": {
"rpcUrl": "YOUR_ALCHEMY_RPC",
"wsUrl": "YOUR_ALCHEMY_WEBSOCKET",
"rpcUrlQuickNode": "YOUR_QUICKNODE_RPC",
"rpcUrlInfura": "YOUR_INFURA_RPC",
"wsUrlInfura": "YOUR_INFURA_WEBSOCKET",
"virtualTokenAddress": "0x0b3e328455c4059EEb9e3f84b5543F74E24e7E1b",
"chainId": 8453
}
}- Launch Application:
npm start - Select Trading Bot: Choose from sidebar (Buy/Sell/Farm/MM/Jeet)
- Configure Parameters: Set amounts, tokens, wallets via GUI
- Monitor Execution: Real-time console with detailed logging
- View Results: Transaction summaries and balance changes
BuyBot Example:
1. Select tokens โ Set amounts โ Choose wallets
2. Configure execution (parallel/sequential)
3. Set gas price and loops
4. Execute โ Monitor real-time progress
SellBot Example:
1. Auto-detect tokens or manual selection
2. Set sell percentages or fixed amounts
3. Choose currency (VIRTUAL/ETH/Custom)
4. Execute โ Track VIRTUAL received
trust-bot/
โโโ main.js # Electron main process
โโโ renderer.js # GUI frontend logic
โโโ wallets.json # Configuration file
โโโ src/
โ โโโ bots/ # Trading bot implementations
โ โโโ config/ # Configuration management
โ โโโ providers/ # RPC provider management
โ โโโ utils/ # Shared utilities
โ โโโ wallets/ # Wallet management
โโโ bots/ # Legacy bot files (compatibility)
- Frontend: HTML/CSS/JavaScript (Electron renderer)
- Backend: Node.js with ethers.js v6
- Blockchain: Base L2 (2-second blocks, no mempool)
- Trading: TRUSTSWAP contract integration
- Monitoring: WebSocket + RPC hybrid approach
- Create service in
src/bots/services/ - Implement bot logic in
src/bots/ - Add GUI components in
renderer.js - Update configuration schema if needed
- Private Key Management: Secure local storage in wallets.json
- Token Blacklist: Hardcoded protection against selling critical tokens
- Transaction Validation: Multiple confirmation layers
- Provider Failover: Automatic switching on RPC failures
- Amount Validation: Prevents dust transactions and over-spending
- WebSocket Events: Replace polling for 90% faster response times
- Parallel Processing: Multi-wallet transactions in same block
- Smart Caching: Balance caching with event-driven invalidation
- Provider Load Balancing: Random selection across healthy providers
- Gas Optimization: Dynamic gas pricing with escalation
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open Pull Request
- Follow existing code structure in
src/directory - Maintain backward compatibility with GUI interface
- Add comprehensive error handling
- Update documentation for new features
- Test with multiple RPC providers
This software is for educational and research purposes. Users are responsible for compliance with applicable laws and regulations. Trading cryptocurrencies involves significant risk of loss.