Skip to content

Sviche/Variational-Trading-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 Variational Bot

Python Version Status Platform Trading Telegram Channel Telegram Chat

Professional trading bot for Variational Protocol (Arbitrum DEX) with batch hedging strategies

🇷🇺 Русская версия


🚀 Overview

Variational Bot is a powerful tool for automated trading on Variational Protocol (Arbitrum), designed for efficient management of large numbers of accounts with minimal effort.

The bot uses batch account processing (batch trading) with automatic long/short position balancing to reduce risks and maximize profits.


📱 Join Our Community

Telegram Channel Telegram Chat


✨ Key Features

  • 🎯 Hedge Strategy — automatic balancing of longs and shorts (sum of longs = sum of shorts)
  • Two Trading Modes — LIMIT (saves on fees) and MARKET (fast execution via quote-based flow)
  • 🔄 Hybrid Architecture — Pool + Queue + Workers for scaling to 100+ accounts
  • 🛡️ Automatic Onboarding — SIWE-based account registration with one command
  • 📊 Real-time Data — REST API price feeds with caching for fast updates
  • 🎮 Graceful Shutdown — safe termination on Ctrl+C with automatic position closing
  • 💾 SQLite Database — secure storage of credentials and statistics
  • 🔁 Retry Logic — automatic retries on failures (exponential backoff)

🛠️ Core Capabilities

Trading Features

  • ✅ Batch trading (3+ accounts per batch)
  • ✅ Limit orders with adaptive offset and retry logic (up to 5 attempts)
  • ✅ Market orders via quote → accept flow for fast execution
  • ✅ Automatic position management (TP/SL/time-based)
  • ✅ Support for 50+ trading pairs on Variational

Scalability

  • ✅ Dynamic batch formation from account pool
  • ✅ Load balancing between accounts (cooldown system)
  • ✅ Parallel processing via Worker Pool
  • ✅ Scaling to 100+ accounts

Automation

  • ✅ Automatic account onboarding via SIWE (Sign-In with Ethereum)
  • ✅ Private key synchronization with DB on startup
  • ✅ Automatic Cloudflare challenge solving (captcha service integration)
  • ✅ Automatic referral code application

⚙️ Quick Start

1. Install Dependencies

python -m venv venv

.\venv\Scripts\activate.bat

pip install -r requirements.txt

# OR

git clone https://github.com/Sviche/Variational-Trading-Bot.git

cd Variational-Trading-Bot

pip install -r requirements.txt

2. Configuration

Create configuration files:

  • user_data/private_keys.txt — your Ethereum private keys
  • user_data/proxies.txt — proxies for each account
  • Edit settings.py if needed

3. Deposit Funds

Manually deposit USDC to each wallet on Variational (Arbitrum) before launching

4. Launch

python main.py

That's it! On first run, automatic onboarding of all accounts will occur, and the bot will start trading.

Note: Full installation guide available in INSTALL.md


📖 Documentation


📋 Requirements

  • Python 3.10 or higher
  • Ethereum private keys
  • HTTP/SOCKS5 proxies (one per account)
  • Minimum 3 accounts to work in batch mode
  • USDC balance on Arbitrum for each wallet

🏗️ Architecture

Account Pool (100 accounts)
    ↓
Batch Generator (creates tasks every 5s)
    ↓
Task Queue (task buffer)
    ↓
Worker Pool (workers process in parallel)
    ↓
Accounts → Cooldown → Available

Hybrid approach: Pool + Queue + Workers for controlled load and scalability.


💡 Economics

LIMIT Mode (default)

  • Fee: ~0% (Maker)
  • Speed: ~100s per position
  • Lower costs for high-volume trading

MARKET Mode (fast farming)

  • Fee: ~0% (Taker)
  • Speed: ~2s per position
  • 50-100x faster

🔒 Security

  • ✅ Private keys stored locally (not in code)
  • ✅ SQLite DB with credentials protected at OS level
  • ✅ Proxies for request anonymization
  • ✅ Graceful Shutdown for safe termination
  • ✅ Automatic position closing on stop

⚠️ Disclaimer

This software is provided "as is" for educational purposes. Cryptocurrency trading involves risks. Use at your own risk.


📄 License

MIT License


Made with ❤️ for Variational Protocol community

About

Professional trading bot for Variational Protocol (Arbitrum DEX) with batch hedging strategies

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages