Automated arbitrage trading bot that finds and executes profitable trades between KyberSwap and Larry DEX on Base network.
Ready to earn passive income through automated arbitrage trading? Follow these simple steps:
- Python 3.8 or higher
- At least 0.002 ETH in your Base wallet for trading
- Your wallet's private key
# Clone this repository
git clone https://github.com/btb-finance/ArbitrageBot.git
cd ArbitrageBot
# Install dependencies
pip3 install web3 aiohttp python-dotenv
- Set up your private key in
.env
file:
PRIVATE_KEY=0xYOUR_ACTUAL_PRIVATE_KEY_HERE
BASE_RPC_URL=https://mainnet.base.org
- Fund your wallet with ETH on Base network (minimum 0.002 ETH)
python3 arbitrage_bot.py
That's it! The bot will automatically:
- ✅ Monitor for profitable arbitrage opportunities every 30 seconds
- ✅ Execute trades when profit exceeds 1.20%
- ✅ Return all profits directly to your wallet (0% fees)
- ETH → LARRY: Uses KyberSwap to convert ETH to LARRY tokens
- LARRY → ETH: Sells LARRY on Larry DEX bonding curve
- Profit: Keeps the difference (typically 1-5% per successful trade)
2025-05-27 11:41:16 - INFO - Bot initialized for account: 0x68f4...69a4
2025-05-27 11:41:16 - INFO - Account balance: 0.003528 ETH
2025-05-27 11:41:18 - INFO - ETH->LARRY->ETH: 0.001 ETH -> 1021.27 LARRY -> 0.001021 ETH (Profit: 2.09%)
2025-05-27 11:41:18 - INFO - 🎯 Profitable opportunity found! Profit: 2.09%
2025-05-27 11:41:20 - INFO - ✅ Arbitrage executed successfully!
Edit arbitrage_bot.py
to customize:
TRADE_AMOUNT_ETH = "0.001" # Amount per trade
MIN_PROFIT_PERCENTAGE = 1.20 # Minimum profit % to execute
- Profit threshold protection - Only trades when profitable
- Gas limit protection - Prevents excessive gas usage
- Balance checking - Ensures sufficient funds before trading
- Error handling - Robust error recovery and logging
- Slippage protection - Uses KyberSwap's built-in slippage handling
- Smart Contract:
0xC14957db5A544167633cF8B480eB6FbB25b6da19
(Base Mainnet) - Network: Base (Chain ID: 8453)
- DEX Integration: KyberSwap Aggregator + Larry DEX
- Trade Direction: ETH → LARRY → ETH
- Protocol Fees: 0% (all profits go to you)
- Typical Profit: 1-5% per successful trade
- Trade Frequency: Varies with market conditions (could be multiple times per hour during volatile periods)
- Gas Costs: ~0.001-0.002 ETH per transaction
Issue | Solution |
---|---|
"Insufficient balance" | Send more ETH to your wallet |
"No profitable opportunities" | Normal during stable markets, try lowering profit threshold |
Transaction failures | Check ETH balance for gas fees |
API errors | Temporary issues, bot will retry automatically |
- Smart Contract Risk: Interacts with audited but experimental DeFi protocols
- Market Risk: Arbitrage opportunities depend on market volatility
- Gas Risk: High network congestion can reduce profitability
- Impermanent Loss: None (no liquidity provision involved)
- 🕐 Run during high volatility periods for more opportunities
- ⛽ Monitor Base network gas prices
- 💰 Keep adequate ETH balance for gas fees
- 📊 Watch the logs to understand market patterns
- 🔄 Consider running multiple instances with different trade amounts
arbitrage-larry/
├── arbitrage_bot.py # Main bot script
├── bot_setup.md # Detailed setup guide
├── requirements.txt # Python dependencies
├── .env # Your private configuration
├── src/
│ └── ArbitrageLarryImproved.sol # Smart contract source
└── README.md # This file
The arbitrage logic is handled by our deployed smart contract at:
0xC14957db5A544167633cF8B480eB6FbB25b6da19
Contract features:
- Bidirectional arbitrage support
- MEV protection
- Gas optimization
- Emergency controls
- Zero protocol fees
Found a bug or want to improve the bot? Pull requests welcome!
MIT License - Feel free to fork and modify for your own use.
⚡ Start earning with automated arbitrage today! ⚡
Disclaimer: Cryptocurrency trading involves risk. Only trade with funds you can afford to lose.