Bot Configuration
This guide explains how to configure your arbitrage bot using the config.toml
file. The configuration file controls various aspects of the bot's behavior, including routing, RPC settings, transaction submission strategies, and more.
Example Configuration File
Here's a complete example of a config.toml
file:
[routing]
[[routing.mint_config_list]]
mint = "34HDZNbUkTyTrgYKy2ox43yp2f8PJ5hoM7xsrfNApump"
pump_pool_list = [
"7USDHmdsFsJGsrvuYWvYHKejJBneCLVk8hdMWVvb7VqA",
]
# Raydium V4 AMM Pools
raydium_pool_list = []
# Raydium CPMM Pools
raydium_cp_pool_list = []
# Raydium CLMM (Centralized Liquidity) Pools
raydium_clmm_pool_list = []
whirlpool_pool_list = []
# Meteora DLMM
meteora_dlmm_pool_list = [
"7h93PJheNPgaVAztMqeFszzkaP1pEdsZyE4n6H9KRVE9",
"3aRvsnLDyDevu9BvpiauGGQpwszXXqW6zLgxjMG57g2N",
"CX2SFVBn6kAWm7utL3ccW3F6B9q9sHLmPTikPfPG9oSS",
]
# Meteora Dynamic Pool
meteora_damm_pool_list = []
# Meteora Dynamic Pool V2
meteora_dammv2_pool_list = []
# SolFi Pool
solfi_pool_list = []
lookup_table_accounts = [
"AnrSWuNc4L4oj54W7g95YEaXfTS58FsSknZdynDqpUJd",
"q52amtQzHcXs2PA3c4Xqv1LRRZCbFMzd4CGHu1tHdp1"
]
process_delay = 400
[rpc]
url = "xxx"
[spam]
enabled = true
sending_rpc_urls = [
"RPC_URL_1",
"RPC_URL_2"
]
compute_unit_price = { strategy = "Random", from = 100, to = 100, count = 1 }
max_retries = 10 # Optional
enable_simple_send = false # Set to true only if your sending RPC doesn't work with the default config
[jito]
enabled = true
block_engine_urls = [
"https://ny.mainnet.block-engine.jito.wtf/api/v1",
"https://tokyo.mainnet.block-engine.jito.wtf/api/v1",
"https://slc.mainnet.block-engine.jito.wtf/api/v1",
"https://amsterdam.mainnet.block-engine.jito.wtf/api/v1",
"https://frankfurt.mainnet.block-engine.jito.wtf/api/v1",
]
uuid = "" # Optional
ip_addresses = [] # Optional. Set only when using multiple IPs. Supports single IP or CIDR format like "192.168.1.0/24"
use_min_profit = true # Optional
min_profit = 10_000 # Optional
use_separate_tip_account = false # Optional
no_failure_mode = false # Optional. DO NOT ENABLE unless you understand the implications
block_engine_strategy = "OneByOne" # "OneByOne" or "AllAtOnce"
[jito.tip_config]
strategy = "Random" # Random/Linear/Exponential/File
from = 10000
to = 100000
count = 3 # Number of different tips to generate. All transactions will be sent together
[flashloan]
enabled = true
[bot]
compute_unit_limit = 600_000 # Recommend at least 300k for DLMM, 450k for Orca/Raydium CLMM
merge_mints = false # Send all mints in the same transaction
base_mint = "So11111111111111111111111111111111111111112" # Optional, defaults to SOL
# memo = "some note" # Optional
[wallet]
private_key = "xxx"
Configuration Sections
Routing
The routing section defines which tokens (mints) and pools the bot should monitor for arbitrage opportunities. The bot's on-chain program checks for profitable routes between different pools and executes trades when opportunities are found.
Currently, the bot supports one pool per type for each configuration. You can define multiple configurations for the same mint with different pool combinations. Future versions will support multiple pools of the same type.
mint_config_list
You can define multiple token and pool configurations. The bot will send a transaction, wait for the specified process_delay
, then repeat for each configured mint.
You can also define more than one Meteora DLMM pool. If you use more than two pools, you'll likely need to add an address lookup table to keep the transaction size manageable.
[[routing.mint_config_list]]
mint = "34HDZNbUkTyTrgYKy2ox43yp2f8PJ5hoM7xsrfNApump"
pump_pool_list = [
"7USDHmdsFsJGsrvuYWvYHKejJBneCLVk8hdMWVvb7VqA",
]
meteora_dlmm_pool_list = [
"7h93PJheNPgaVAztMqeFszzkaP1pEdsZyE4n6H9KRVE9",
"3aRvsnLDyDevu9BvpiauGGQpwszXXqW6zLgxjMG57g2N",
"CX2SFVBn6kAWm7utL3ccW3F6B9q9sHLmPTikPfPG9oSS",
]
meteora_damm_pool_list = []
meteora_dammv2_pool_list = []
raydium_pool_list = []
raydium_cp_pool_list = []
raydium_clmm_pool_list = []
whirlpool_pool_list = []
lookup_table_accounts = [
"AnrSWuNc4L4oj54W7g95YEaXfTS58FsSknZdynDqpUJd",
"q52amtQzHcXs2PA3c4Xqv1LRRZCbFMzd4CGHu1tHdp1"
]
process_delay = 400
Defining Multiple Mints
You can configure multiple mints by duplicating the [[routing.mint_config_list]]
section:
[[routing.mint_config_list]]
mint = "34HDZNbUkTyTrgYKy2ox43yp2f8PJ5hoM7xsrfNApump"
pump_pool_list = [
"7USDHmdsFsJGsrvuYWvYHKejJBneCLVk8hdMWVvb7VqA",
]
meteora_dlmm_pool_list = [
"7h93PJheNPgaVAztMqeFszzkaP1pEdsZyE4n6H9KRVE9",
]
lookup_table_accounts = []
process_delay = 400
[[routing.mint_config_list]]
mint = "7swLujtSwxcNxybT167ii9HXCfy5LZFxNwUEvsZgpump"
pump_pool_list = [
"9iPVQkxUFiL4AQStRqPTcjN2KhZdbqZM7Lmk9vYzgnAT",
]
raydium_cp_pool_list = [
"HXCjThojPP1f9uXdQYe7YdbKugT2PvVoTUyvapkErgBY",
]
lookup_table_accounts = []
process_delay = 400
RPC Configuration
Specify your RPC endpoint URL for reading blockchain data. This is separate from the RPCs used for sending transactions.
[rpc]
url = "YOUR_RPC_URL_HERE"
Spam Configuration
Configure the RPCs used for sending transactions. These can be the same as your reading RPC or different endpoints.
[spam]
enabled = true
sending_rpc_urls = [
"RPC_URL_1",
"RPC_URL_2"
]
compute_unit_price = { strategy = "Random", from = 100, to = 100, count = 1 }
max_retries = 10 # Optional
enable_simple_send = false # Set to true only if your sending RPC doesn't work with default config
Compute Unit Price
When spam is enabled, you must configure the compute unit price. You can set equal from
and to
values with any strategy to get a fixed price for all transactions.
Note: All transactions generated will be sent together.
You can define compute unit price in two formats:
Inline format:
[spam]
compute_unit_price = { strategy = "Random", from = 10000, to = 100000, count = 1 }
Separate section:
[spam.compute_unit_price]
strategy = "Random" # Random/Linear/Exponential/ExponentialRandom/File
from = 10000
to = 100000
count = 3 # Number of different compute unit prices to generate
File-based strategy:
[spam.compute_unit_price]
strategy = "File"
file_path = "cu.txt"
Your file should contain one number per line:
10000
20000
Jito Configuration
Jito provides an alternative transaction submission method. While it has lower success rates due to tip auctions, it eliminates failed transactions.
Important: If using multiple IPs with Jito, don't set up IP rotation locally. Use the bot's built-in support by configuring all IPs in the config file (supports single IP or CIDR format like "192.168.1.0/24").
[jito]
enabled = true
block_engine_urls = [
"https://ny.mainnet.block-engine.jito.wtf/api/v1",
"https://tokyo.mainnet.block-engine.jito.wtf/api/v1",
"https://slc.mainnet.block-engine.jito.wtf/api/v1",
"https://amsterdam.mainnet.block-engine.jito.wtf/api/v1",
"https://frankfurt.mainnet.block-engine.jito.wtf/api/v1",
]
tip_config = { strategy = "Random", from = 10000, to = 100000, count = 1 }
uuid = "" # Optional
use_min_profit = true # Optional, defaults to true
no_failure_mode = false # Optional
use_separate_tip_account = false # Optional
ip_addresses = [] # Optional. Set only when using multiple IPs
block_engine_strategy = "OneByOne" # "OneByOne" or "AllAtOnce"
use_min_profit
Default: true
YOU MAY LOSE MONEY WHEN THIS IS SET TO FALSE
- True: The on-chain program uses the tip amount as minimum profit, ensuring you never lose money (but makes transactions harder to land)
- False: The program ignores tip amount in profit calculations, landing transactions as long as there's any profit. Recommended approach: use very small tips + many IPs, treating tips as gas fees
min_profit
Default: 0
Additional profit requirement beyond tip amount. For example, if you don't want to lose money with Jito, set this to 10,000 when using separate tip accounts or 5,000 otherwise to cover basic transaction fees.
use_separate_tip_account
Default: false
Set to true
when using multiple IPs to circumvent Jito rate limits.
no_failure_mode
Default: false
YOU MAY LOSE MONEY WHEN THIS IS ENABLED
When enabled, unprofitable transactions won't fail, meaning all transactions sent to Jito will succeed and land on-chain. You'll pay tips for all transactions, even unprofitable ones. This bypasses simulations but treats Jito tips as gas fees.
tip_config
Configure tips for Jito transactions. All generated transactions will be sent together, so ensure adequate rate limits.
Inline format:
[jito]
tip_config = { strategy = "Random", from = 10000, to = 100000, count = 1 }
Separate section:
[jito.tip_config]
strategy = "Random" # Random/Linear/Exponential/ExponentialRandom/File
from = 10000
to = 100000
count = 3 # Number of different tips to generate
File-based strategy:
[jito.tip_config]
strategy = "File"
file_path = "tip.txt"
block_engine_strategy
Default: "OneByOne"
- OneByOne: Sends transactions through different URLs sequentially, providing effective 6/s rate limit with Jito
- AllAtOnce: Sends same transaction to all regions simultaneously, increasing success chances when some regions are rate-limited
Flashloan
When enabled, you don't need large amounts of WSOL/USDC in your wallet (just enough to keep WSOL account open). The current flashloan pool contains 30 SOL and 5,000 USDC.
[flashloan]
enabled = true
Bot Configuration
[bot]
compute_unit_limit = 300_000
merge_mints = false
base_mint = "So11111111111111111111111111111111111111112" # Optional, defaults to SOL
compute_unit_price_for_ata_creation = 1_000_000 # Optional, defaults to 1,000,000
# memo = "some note" # Optional
compute_unit_limit
Required parameter. Minimum recommendations:
- 300,000 for Meteora DLMM pools
- 450,000 for Orca/Raydium CLMM pools
- 600,000 for multiple DLMM pools
For DLMM pools, this affects how many bins the bot examines on-chain. Each bin lookup uses ~5,000 compute units, so 300,000 allows examining ~10 bins.
base_mint
Default: SOL (So11111111111111111111111111111111111111112
)
The base token for trading between pools. Currently supports SOL/USDC.
merge_mints
Allows finding opportunities across different mints and pools within one transaction. While this sounds beneficial, it has limitations:
- Transactions become harder to land due to locking too many accounts
- May require higher fees during high market activity
- Needs higher compute unit limits
- Current limits: Up to 3 mints and 7 pools total (4 mints and 8 pools with proper lookup tables)
memo
Adds a memo instruction to all transactions. Useful for tracking performance when running multiple bots/strategies on the same wallet.
Wallet Configuration
[wallet]
private_key = "YOUR_PRIVATE_KEY_HERE"
Store your wallet's private key here. Keep this secure and never share it publicly.