Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ TradeGenius Swap Bot

Automated USDT ↔ USDC swap bot for TradeGenius.com on Solana. This bot helps you generate trading volume by continuously swapping between stablecoins.

Node.js License Platform


⚠️ IMPORTANT: Wallet Setup

Since the bot uses Chrome DevTools Protocol (CDP) to connect to a Chrome browser, you need to set up your wallet in the Chrome profile that the bot will use.

Option 1: Import Wallet to New Chrome Profile (Recommended)

When you start Chrome with --user-data-dir, it creates a fresh profile. You'll need to:

  1. Install your wallet extension (Phantom, MetaMask, etc.) in the new Chrome window
  2. Import your existing wallet using your seed phrase or private key
  3. Connect to TradeGenius and approve the connection

Option 2: Copy Your Existing Chrome Profile

If you want to use your existing Chrome profile with all extensions already set up:

# macOS - Copy your existing profile
cp -r ~/Library/Application\ Support/Google/Chrome ~/chrome-swap-profile

# Then start Chrome with the copied profile
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome \
  --remote-debugging-port=9222 \
  --user-data-dir="$HOME/chrome-swap-profile"

Option 3: Social Login (Apple/Google)

If you use Apple or Google to connect your wallet:

  1. Simply log in to your Apple/Google account in the new Chrome window
  2. Your wallet will sync automatically

πŸ”’ 100% Local & Secure

Everything runs locally on your machine. There are NO security concerns.

  • βœ… No external servers - The bot runs entirely on your computer
  • βœ… No data transmission - Nothing is sent anywhere
  • βœ… No private keys accessed - Bot only automates UI clicks
  • βœ… Open source - You can verify every line of code
  • βœ… CDP is local - Chrome DevTools Protocol only works on localhost
  • βœ… Wallet approval required - Every transaction needs your wallet's confirmation

The bot simply connects to YOUR Chrome browser running on YOUR computer and automates clicking buttons on the TradeGenius website. It's like having a robot click for you - nothing more.


⏱️ Performance & Volume Estimation

Timing Breakdown

Step Duration
Step 1: Select FROM token ~6 seconds
Step 2: Select TO token + Solana ~8 seconds
Step 3: Click MAX ~2 seconds
Step 4: Confirm + Wallet approval ~15 seconds
Wait for Close button ~5 seconds
Total per swap ~35-40 seconds
Interval between swaps 30 seconds
Complete cycle ~65-70 seconds (~1.1 min)

Daily Volume Estimation (24 Hours)

With the default 30-second interval and ~85% success rate:

Balance Swaps/Day Daily Volume Weekly Volume Monthly Volume
$1,000 ~1,100 ~$1.1M ~$7.7M ~$33M
$2,000 ~1,100 ~$2.2M ~$15.4M ~$66M
$3,000 ~1,100 ~$3.3M ~$23.1M ~$99M
$4,000 ~1,100 ~$4.4M ~$30.8M ~$132M
$5,000 ~1,100 ~$5.5M ~$38.5M ~$165M

Actual results may vary based on network conditions, transaction confirmations, and website responsiveness.


✨ Features

  • πŸ”„ Automatic USDT ↔ USDC swaps - Alternates between stablecoins
  • πŸ” Auto-detection - Detects which token is in your wallet
  • ⛓️ Solana chain selection - Automatically selects Solana from chain dropdown
  • πŸ‘› Wallet integration - Works with Phantom, MetaMask, and other browser wallets
  • πŸ” Continuous operation - Runs in a loop with configurable intervals
  • πŸ›‘οΈ Retry mechanism - Automatically retries failed swaps (up to 3 times)
  • πŸ“Š Progress tracking - Counts and displays completed swaps
  • πŸ”„ Auto-recovery - Reloads page if stuck for 15+ seconds

πŸ“‹ Prerequisites

  • Node.js v18 or higher
  • Google Chrome browser
  • A Solana wallet extension (Phantom, MetaMask, Solflare, etc.)
  • USDT or USDC balance on Solana
  • Small amount of SOL for gas fees (~0.01 SOL)

πŸ› οΈ Installation

  1. Clone the repository:
git clone https://github.com/yourusername/tradegenius-swap-bot.git
cd tradegenius-swap-bot
  1. Install dependencies:
npm install
  1. Create environment file (optional):
cp .env.example .env

βš™οΈ Configuration

Create a .env file in the project root:

# Swap interval in seconds (default: 30)
SWAP_INTERVAL_SECONDS=30

# Chrome DevTools Protocol port (default: 9222)
CDP_PORT=9222

Tip: Lower interval = more swaps = more volume, but may be less stable. We recommend 30 seconds for optimal balance.


πŸš€ Usage

Step 1: Start Chrome with Remote Debugging

⚠️ Close ALL Chrome windows first!

macOS:

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome \
  --remote-debugging-port=9222 \
  --user-data-dir="$HOME/chrome-swap-profile"

Windows:

"C:\Program Files\Google\Chrome\Application\chrome.exe" ^
  --remote-debugging-port=9222 ^
  --user-data-dir="%USERPROFILE%\chrome-swap-profile"

Linux:

google-chrome \
  --remote-debugging-port=9222 \
  --user-data-dir="$HOME/chrome-swap-profile"

Step 2: Set Up Your Wallet

  1. Install Phantom (or your preferred wallet) in Chrome
  2. Import or create a wallet
  3. Navigate to TradeGenius Trade
  4. Connect your wallet to TradeGenius
  5. Ensure you have USDT or USDC balance on Solana

Step 3: Run the Bot

node tradegenius-bot.js

Or with npm:

npm start

Step 4: Monitor

The bot will:

  1. πŸ” Detect available stablecoin (USDT or USDC) in your wallet
  2. πŸ“€ Select it as the FROM token
  3. πŸ“₯ Select the opposite stablecoin as TO token (with Solana chain)
  4. πŸ’― Click MAX to use full balance
  5. βœ… Click Confirm and wait for wallet approval
  6. πŸ”„ Repeat the cycle

πŸ“Š Expected Output

πŸš€ Connecting to Chrome on port 9222...
βœ… Connected successfully!
πŸ“ Navigating to TradeGenius...
βœ… TradeGenius loaded

🎯 TradeGenius USDT ↔ USDC Swap Bot
πŸ’‘ Auto-detects wallet token (USDT or USDC)
⏱️ Interval: 30 seconds

==================================================
πŸ”„ STARTING NEW SWAP CYCLE
==================================================

πŸ“Œ Step 1: Detecting and selecting FROM token from wallet...
βœ… FROM token USDC selected

πŸ“Œ Step 2: Selecting TO token (USDT) with Solana chain...
βœ… Solana clicked!
βœ… TO token USDT on Solana selected

πŸ’± Swap: USDC β†’ USDT

πŸ“Œ Step 3: Clicking MAX...
βœ… MAX clicked

πŸ“Œ Step 4: Clicking Confirm...
βœ… Confirm clicked

πŸ‘» Waiting for wallet approval...
βœ… Wallet Confirm clicked
βœ… Close button clicked - Ready for next swap!

βœ… Swap completed: USDC β†’ USDT

πŸŽ‰ Swap #1 completed!
⏰ Next swap in 30 seconds...
==================================================

πŸ›‘ Stopping the Bot

Press Ctrl+C to gracefully stop the bot:

⚠️ Shutting down...
πŸ“Š Total swaps: 42

πŸ”§ Troubleshooting

"ECONNREFUSED" Error

Chrome is not running with debugging enabled:

  1. Close ALL Chrome windows
  2. Start Chrome with --remote-debugging-port=9222
  3. Wait a few seconds before running the bot

"No USDT or USDC found"

  • Check your wallet has USDC or USDT on Solana
  • Make sure your wallet is connected to TradeGenius
  • Try refreshing the page

Transactions Fail

  • Check you have enough SOL for gas fees (~0.01 SOL)
  • Increase SWAP_INTERVAL_SECONDS for more stability
  • Check if TradeGenius website is working properly

Bot Gets Stuck

The bot automatically:

  • Retries failed swaps up to 3 times
  • Reloads the page if stuck for 15+ seconds
  • Presses Escape to close stuck modals

πŸ“ License

MIT License - see LICENSE file for details.


⚠️ Disclaimer

This bot is provided for educational purposes only. Use at your own risk. The developers are not responsible for any financial losses. Always:

  • Test with small amounts first
  • Monitor the bot regularly
  • Understand the risks of automated trading
  • Keep your system and wallet secure

🀝 Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Submit a pull request

πŸ“§ Support

For issues and feature requests, please open a GitHub issue.


Built with ❀️ for the Solana community

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages