Real-time arbitrage bot for discovering price discrepancies between traditional stocks and their tokenized counterparts on Solana.
Arbitly Bot is an automated trading system that monitors and executes arbitrage opportunities between traditional stock tokens (like TSLAx) and their tokenized representations (like TSLAr) on the Solana blockchain. When price discrepancies occur relative to the underlying index price, the bot automatically executes profitable swaps.
This bot powers Arbitly.xyz - a platform focused on bridging traditional finance with decentralized markets through real-time arbitrage opportunities.
The bot uses Jupiter Aggregator API to find optimal swap routes across multiple DEXs on Solana. It continuously monitors price differences between:
- Traditional Stock Tokens (e.g.,
TSLAx) - Tokenized stocks on Solana - Tokenized Assets (e.g.,
TSLAr) - Alternative tokenized representations - Index Price - The reference price from traditional markets
When TSLAx < Index Price:
Buy TSLAx → Swap to TSLAr → Sell when TSLAr > Index Price
When TSLAr < Index Price:
Buy TSLAr → Swap to TSLAx → Sell when TSLAx > Index Price
The bot automatically:
- Discovers price discrepancies in real-time
- Calculates profitability (including fees and slippage)
- Executes swaps when opportunities exceed minimum profit thresholds
- Tracks all trades and performance metrics
- ⚡ Real-time Monitoring - Continuous price discovery across multiple DEXs
- 🔄 Multi-DEX Routing - Finds optimal routes via Jupiter Aggregator
- 💰 Profit Optimization - Only executes when profit exceeds configured thresholds
- 📊 Comprehensive Logging - Tracks all opportunities and executions
- 🛡️ Risk Management - Configurable slippage tolerance and position limits
- 🔐 Self-Hosted Jupiter API - Supports circular arbitrage for complex routes
Arbitly Bot
├── Price Discovery → Monitors TSLAx/TSLAr vs Index
├── Jupiter API → Fetches quotes and swap instructions
├── Route Finding → Jupiter Aggregator for optimal swaps
├── Profit Calculation → Accounts for fees, slippage, gas
├── Execution Engine → Solana transaction builder
└── Logging & Metrics → Performance tracking
The bot integrates with Jupiter Aggregator API to:
- Get real-time quotes for token pairs
- Find optimal swap routes across multiple DEXs
- Build swap transactions with proper account structures
- Support circular arbitrage routes (when using self-hosted API)
- Node.js 18+ and npm
- A Solana wallet with funds
- A Solana RPC endpoint (Helius, QuickNode, or Alchemy recommended)
# Clone the repository
git clone <repository-url>
cd Arbitly
# Install dependencies
npm install
# Create .env file
cp .env.example .env
# Edit .env and add your PRIVATE_KEY and MAINNET_RPCCreate a .env file with your credentials:
PRIVATE_KEY=your_base58_encoded_private_key_here
MAINNET_RPC=https://your-rpc-endpoint.com
UPPER_AMOUNT_WITH_DECIMAL=0# Start the bot
npm run dev- Platform: Arbitly.xyz
- Jupiter Aggregator: Jupiter.ag
- Solana Docs: docs.solana.com
Built for Arbitly.xyz | Real-time arbitrage between traditional stocks and tokenized assets