📝Bot configurations
Last updated
Last updated
The bot uses config.yaml
file to load all the configurations.
Different configuration can greatly impact your profitability using the bot. Tweak it based on your own setup. Join our discord to learn more.
You can also refer the config examples as a starting point to tweak for your own config.
If a config does not exist in your config.yaml file, just refer to config.yaml.example and add the ones you are missing.
This section contains configurations like private keys, api keys.
Private key for your wallet. All formats are supported, you can export from Phantom/Solflare or just use a json file path. The wallet needs to hold enough SOL/WSOL/USDC for your configuration.
This is used for fetching lated priority fee. You can get one for free by register an account on https://www.helius.dev/.
Yellowstone is optional, but having it can greatly reduce your RPC calls and increase the number of mints you can have with Jupiter.
If present, JupV6 API will use it, otherwise JupV6 will be running in pull mode, which is very heavy on the read RPC.
If your yellowstone provider also provides you an x token set it here.
When running the bot with JUPITER_URL=http://0.0.0.0:18080
, the bot will first pull the latest popular token mints from Birdeye, based on last 24h volume. Then spin up a JupV6 API with FILTER_MARKETS_WITH_MINTS
set to the token mints pulled from Birdeye. INTERMEDIUM_MINT_COUNT_FROM_BIRDEYE
configures how many tokens to use from Birdeye. The higher you set for INTERMEDIUM_MINT_COUNT_FROM_BIRDEYE
, the more oppotunity you may see as there are more potential routes from different token pairs. Though higher number also means longer time to get a quote from JupV6 API, and it will also uses more resources from your machine. If YELLOWSTONE_URL
is not set, it is not recommended to set
If YELLOWSTONE_URL
is set, it will be used to start JupV6 API with it, otherwise the JupV6 API will run in pull mode, which is heavy for your read RPC and it is not recommended when you have too many intermedium mints(>100).
If JUPITER_URL
is set to a different value, none of the params in the following form will apply. This can be used when you have a JupV6 API provider, or running it yourself separately.
More info about self-hosted JupV6 can be found here: https://station.jup.ag/docs/apis/self-hosted
Default: false
When set to true, it will not start the Jupiter API locally. This is useful when you want to run multiple bots on the same machine
default: 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P,MoonCVVNZFSYkqNXP6bxHLPL6QQJiMagDL3qcqUQTrG
The full list is here. You can choose which Dex to exclude from your jup api when starting it. Using the address of the Dex not the name, separate by comma. Default exclude Moonshot and Pump.fun
The RPC that is used to read data. When using default JUPITER_URL value, this RPC will also be used to spin up JupV6 API. If this is not set, the value of RPC_URL will be used.
Default: http://0.0.0.0:18080
Endpoint for JupV6 API. When using default value, it will spin up a JupV6 using top popular mints from Birdeye. When set a value other than default, the rest of the parameters in this form will not be applied.
Default: 24
the maxAccounts param that is used to call quote from JupV6. Recommended not setting this higher than 32. The higher this number is, the more routes you can find, though as there's a limit on the total accounts, a higher number here will also cause a higher chance to find an invalid route with too many accounts, and it also takes longer to search.
Default: false
When this is set to true, it will load the market cache from the local file mainnet.json
. This is useful when you run jup and it's very slow to start, or even fail with error reading a body from connection
. You can update the local file with wget https://cache.jup.ag/markets?v=4 -O mainnet.json
Default: 18080
The port jupiter api uses. Note if you change this, you should also change your JUPITER_URL with the same port.
Default: remote
Supported value: europa
, remote
The default behavior(remote) here will fetch a snapshot of all the markets given your intermedium mints, and will only update them on a restart. Europa mode will stream new markets for your mint list to Jupiter, but it can be very heavy for some RPC to handle.
Jup uses thread for 3 things: webserver, update, router. You can config thread count for webserver and update, the rest of the cores will be used for router.
Router thread is handling the workload to find the best route for each quote request. This can be heavy especially when you have USE_DIRECT_ROUTE_ONLY
false.
Make sure you leave some cores beside WEBSERVER_THREAD_COUNT and UPDATE_THREAD_COUNT for routing calculation.
Default: the number of CPU cores on your machine
Routing engine thread = TOTAL_THREAD_COUNT
- WEBSERVER_THREAD_COUNT
- UPDATE_THREAD_COUNT
.
Most of the time you shouldn't need to set this and can just let jupiter use all your cores to enhance performance.
Jup uses thread for 3 things: webserver, update, router. You can config thread count for webserver and update, the rest of the cores will be used for router.
Router thread is handling the workload to find the best route for each quote request. This can be heavy especially when you have USE_DIRECT_ROUTE_ONLY
false.
Make sure you leave some cores beside WEBSERVER_THREAD_COUNT and UPDATE_THREAD_COUNT for routing calculation.
Default: 2
This is how many thread to handle the http requests. The bot is heavily using this so you should consider setting this to a high number if your jupiter quote per second is high.
Jup uses thread for 3 things: webserver, update, router. You can config thread count for webserver and update, the rest of the cores will be used for router.
Router thread is handling the workload to find the best route for each quote request. This can be heavy especially when you have USE_DIRECT_ROUTE_ONLY
false.
Make sure you leave some cores beside WEBSERVER_THREAD_COUNT and UPDATE_THREAD_COUNT for routing calculation.
Default: 4
This is the number of threads used to handle markets update using the data pulled from yellowstone/rpc. If you are using a lot of mints you should consider setting a higher number for this to speed up your price update.
Default: true
When set to true, the bot will only look for 2hop(A -> B -> A) trade. Setting to true will lead to shorter quote time to Jup, with faster landing. Setting to false will lead to more opportunity, but taking more time to quote.
The Bot tries to find profitable route by getting a quote from BASE_MINT to an INTERMEDIUM_MINT for a given trade size, then get another quote from INTERMEDIUM_MINT to BASE_MINT, and combine them together for a potential profitable route. Basically a route from A -> B -> A.
When USE_DIRECT_ROUTE_ONLY
is set to true, the bot will only return route in the form of A -> B -> A like above. For potentially more opportunity, you can set it to false, which can lead to routes like A -> B -> C -> A. The downside of setting this to false is it will slow down the time to get a quote, end up sending out the transaction a bit slower.
You can set as many tokens as possible as the INTERMEDIUM_MINT, though the more you have, the heavier your RPC load is, so you may want to adjust this accordingly.
There are multiple ways for you to define which mints you use as intermedium. The bot will merge all the mints fetched through different ways into one list and use it as intermedium mints.
Default: 0
This param configs how many top tokens to use as intermedium mint that pulled from Birdeye's 24h volume list. This list has high volume but usually low velocity.
https://docs.birdeye.so/reference/get_defi-tokenlist
Default: 0
This param configs how many top tokens to use as intermedium mint that pulled from Birdeye's trending list. Maximum 200. Update every 20min. This list has high velocity new mints, and usually works better with SOL as base mint.
You do not need birdeye api for this.
https://docs.birdeye.so/reference/get_defi-token-trending
Default: 0
Fetch new pools opened through gecko terminal and extract the mints used in the pool. API used here: https://www.geckoterminal.com/dex-api.
Note INTERMEDIUM_MINT_COUNT_FROM_GECKO
can only return ~20-30 mints at maximum due to their limitation on the api.
This provides a way to load intermedium mints for the bots to use. This is useful if you have a set of mints in mind that you want to use, or you write your own script to fetch intermedium tokens for the bot to use.
Example file:
This provides a way to exclude certain mints from intermedium mints.
This is useful when you want to exclude certain mints from birdeye/gecko. Especially if you only want to do SOL arbs and don't want to include USDC/USDT in the route, as it can be heavy for your RPC to load all.
The following example is to exclude USDC/USDT from your intermedium mints.
This allows you to copy trade top players and use whatever intermedium mints they use.
For example, if you want to copy ben/bob's most recent 100 tx:
You can define an overall MAX_MINT_COUNT, and a MAX_MINT_COUNT for every address you are tracking. The bot will rank all the mints by number of times it appears and keep at most MAX_MINT_COUNT
mints. If you have INTERMEDIUM_MINT_EXCLUDE_FROM_FILE
defined, the mints will be excluded first then cut off the top rank.
This section contains configurations for the bot itself.
Default: 60
Unit in minutes. By default, the bot will auto restart every 60min. This will also restart JupV6 if hosted together, to allow fetching the lasted high volume tokens from birdeye. If set to 0, the bot will not auto restart.
Default: true
Whether to run simulateTransaction before sending the transaction. This can help to reduce the number of failed transactions landed on chain if spam mode is enabled.
Default: false
DO NOT SET THIS TO TRUE if you don't know what is a Jito RPC. You have to use a Jito RPC when you enable this. When this is enabled, the bot will use simulateBundle
to run simulation, which can give you the actual profit with the simulation. This value is more accurate than then one calculated from Jupiter quote. This is especially useful when you set spamFeeBps
in your base-mint.json
Note: Most providers don't provide Jito RPC. Right now the only options to get one is to either host a RPC node yourself, or rent a dedicated RPC node from a provider like Helius/Triton.
Default: 0
You can use a fixed COMPUTE_UNIT_LIMIT to avoid the additional computation needed. When this is set to 0, the bot will call jup to get an estimation of the COMPUTE_UNIT_LIMIT and use that instead. Which is more accurate but a bit slower, and will make 2 additional rpc calls getRecentPrioritizationFees and simulateTransaction for each quote.
A suggested value is 250000 for USE_DIRECT_ROUTE_ONLY=true
and 350000 for USE_DIRECT_ROUTE_ONLY=false
The suggested value should work for 90% of the cases.
Note: when using flashloan, the bot will add 100000 to the value to account for the additional instructions needed.
You should not set this to be less than 200000, it may result in not landing anything successfully.
Read more about what is compute unit limit here.
Default: 400
The maximum compute time to send tx for an opportunity. If you are trying to catch an opportunity right after it appears, you usually don't want to send anything when it takes too long to calculate in the first place. If the time took to compute is greater than MAX_COMPUTE_TIME
, the bot won't send any tx for it.
Text that will be added as the last instruction in the transaction. You can use this to distinguish which server you are running the bot from by setting a different value for each server.
When not set a MEMO will NOT be added to your tx.
Default: false
when enabled, will use your Yellowstone to pull blockhash instead of RPC. This can save you a lot of RPC credits. You must also set YELLOWSTONE_URL
to use this.
Default: 0
Units in lamports. Does nothing by default. When set to a none 0 value, the bot will periodically check the wallet's SOL balance, and when it drops below the value, it will unwrap all the WSOL and wrap only the amount needed back, to rebalance the SOL account to avoid running out of SOL. e.g. set this to 1000000000 will auto balance your wsol/sol accounts when your sol drops below 1.
The RPC that is used to read data. When using default JUPITER_URL value, this RPC will also be used to spin up JupV6 API.
Default: false
When enabled and you are using fixed trade size(either using tradeSize or tradeRange with linear strategy), the bot will check if it's the same as last time and not generate a new opportunity for it if it's the same.
Default: false
This will only affect SOL as base mint. When enabled, the bot will unwrap your profit before sending the jito tip/bot fee, which can be very useful if you don't leave much SOL balance in your wallet, or if you are targeting larget opportunities and afraid to not have enough SOL to pay for a big hit.
Default: ''
When set, ths RPC url will be used when loading INTERMEDIUM_MINT_FROM_ADDRESSES
. This is useful when your main RPC does not support transaction history.
Tested you can use a helius free RPC plan with DOWNLOAD_RPC_RATE_LIMIT_PER_SECOND
set to 5 to download all the intermedium mint from addresses.
Default: 0
When set to a none 0 value, it will apply a rate limit when doing RPC calls. This is helpful when using the free plan for some RPC.
Jito provides a way to send transactions through bundles. Bundles will only land when it succeeds, which is perfect for making arbitrage trade!
You can enable jito by setting ENABLE_JITO=true
in your .env
file. The bot will then send all transactions to all jito regions defined in BLOCK_ENGINES
through Jito's http endpoint.
Following is the Jito related configs you can set in your .env
file
Default: true
Whether to use Jito bundle to send transaction. The good part about Jito is, it will never land if the transaction fails. So everything lands is profit. Thought you will need to pay a tip from your profit. See the JITO_TIP_BP param.
Default: ny,amsterdam,frankfurt,tokyo,slc
You should not change this value unless you really know what you are doing. Config which block engines to send to for jito transactions.
Default value: ['dynamic']
Supported values: dynamic, static, fixed
Define which strategy to use when paying for jito's tip. DO NOT use static
and fixed
together.
dynamic: The onchain program will calculate your real profit and use a percentage defined with DYNAMIC_TIP_BP
to pay for the jito tip. This always send through the sendBundle endpoint of jito.
static: This will use a percentage defined with STATIC_TIP_BP
based on the projected profit(the one you see in your opportunity) to pay for the jito tip. This means the actual percentage of the profit when the tx land may not be the same as the projected profit. This will use the sendTransaction endpoint by default, and sendBundle when USE_SEPARATE_TIP_ACCOUNT
is enabled.
fixed: This will use a fixed number(SOL lamports) as your jito profit with FIXED_TIP
. This will use the sendTransaction endpoint by default, and sendBundle when USE_SEPARATE_TIP_ACCOUNT
is enabled.
Note: sendBundle and sendTransaction does not share the same rate limit. they both have 5/ip/wallet/region/s rate limit.
Default: 0
Your TIP_STRATEGIES
need to has dynamic
in it for this to take effect.
Jito tip as part of your profit. 5000 means 50% of your profit will be used as Jito tip. The higher this number, the better chance you may land your transaction, but in return, less profit earned.
Default: 0
Your TIP_STRATEGIES
need to has static
in it for this to take effect.
Jito tip as part of your profit. 5000 means 50% of your projected profit will be used as Jito tip. The higher this number, the better chance you may land your transaction, but in return, less profit earned.
The tx landed with this may not have the same percentage as you defined, as the tip value is set before you send the tx, but the actual profit may vary when it actually landed.
Default: 0
Your TIP_STRATEGIES
need to has fixed
in it for this to take effect.
Use a static jito tip when sending to Jito. Unit is SOL lamports. The bot will always use the same tip for all tx it sends, and still make sure the tx landed are all profitable.
When you set both JITO_TIP_BP
and FIXED_TIP
, bot will send both percentage based and fixed tip transactions.
Note: If you are using this without USE_SEPARATE_TIP_ACCOUNT
set to true, the bot will use sendTransaction
endpoint to sent it, which is using a different rate limit then sendBundle
which is used with JITO_TIP_BP
.
Example with a FIXED_TIP
of 20000 :
https://solscan.io/tx/ZokReqrVXkQgC3gjJoBRDr4sNXKNAuR3Fb4pwD5rFoMRjF4caGwacDEavDiD5CPZRkURgaeCaw73kwqTDSR4F32
Default: 0
Set the max tip the bot pays when using JITO_TIP_BP
. Unit is SOL lamports. The bot also has a max tip amount of 80% of your remaining SOL balance, to avoid missing big opportunities when not having enough SOL left. 0 means no no max tip.
By default, jito has a 5/s/ip rate limit. You can ask for a rate limit raise from jito, and they will give you an uuid that you can set with the bot.
NOTE: Currently the key has a bug and the rate limit for the key is universal not per ip.
Default: false
When this is enabled, response for sending jito bundles will be added to the output log. This is helpful if you are trying to figure out how often you are hitting jito's rate limit, or testing your UUID to see if it works.
Default: false
When this is enabled, a new solana address will be used to send tip in its own tx instead of sending to Jito directly for every Jito transaction. Jito currently is rate limiting bundles based on the accounts in the tx that does the tip, this feature can get around this rate limit by wallet issue to allow you using the same wallet in all locations. This is useful when you have machines in multiple locations but still trying to use the same wallet to run the bot. Example transaction: https://solscan.io/tx/41CBfg3cg1eKvxgJHJ7TqhmrGJ73BxikDVALV7SQYM4FmMqt22Cfpc18f5bErATSUoTDccKtFSVpGQe1WvMr1b9f
Default: false
This will send different TX for different block engines, in theory increase your chance to land, and can some time land multiple tx for the same opportunity.
Default: false
This will use different tip account for different block engines, in theory increase your chance to land, and can some time land multiple tx for the same opportunity.
Spam strategy means you will send many transactions and hope some of them get landed and landed successful. This is a more advanced strategy as you may lose money on gas fee if you didn't config it carefully.
You can enable spam by setting ENABLE_SPAM=true
in you .env
file. The bot will then use all the rpcs you defined for SEND_RPC_URLS
to send potential profitable transactions.
Jito and spam can be enabled together, the bot will just send 2 different transactions, one through jito and one through rpc.
Default: false
Whether to send a normal transaction for every potential arbitrage oppotunity. Note most of the transactions will not even land on chain, for the ones that does, 90% of them will fail. Set ENABLE_SIMULATION=true can help reduce the number of failed transactions.
Default: 0
The COMPUTE_UNIT_PRICE aka gas fee set for the transaction. Note: this is not SOL lamport. Generally the higher this is, the better chance your tx can actually land on chain. Learn more about what this is here: https://solana.com/docs/core/fees#prioritization-fee This only applies to spam, jito transactions set its own value as it's not needed.
Default: 0
This is a config for sendTransaction RPC method, Maximum number of times for the RPC node to retry sending the transaction to the leader. The higher this number, the more chance your tx can land, but also lead to high chance of failure, as retried tx is likely too late for the opportunity.
Default: fixed
Supported strategies: profit-based, fixed, helius. You can only use one of them.
fixed: This will use the value of COMPUTE_UNIT_PRICE
setting to set the compute unit price value.
helius: When using this, you also need to define HELIUS_API_KEY
, PRIORITY_FEE_UPDATE_INTERVAL
and PRIORITY_FEE_PERCENTILE
. This will pull the fee dynamically from helius and use a certain percentile value from it.
profit-based: You can only use this when you have ENABLE_SIMULATION
and ENABLE_JITO_RPC
. This will use the value of SPAM_FEE_BPS
to decide what fee to use for your tx. 100 SPAM_FEE_BPS
means you will pay 1% of your simulated profit as the fee for this tx. This is a very high risk strategy, and can burn you a lot of SOL very quickly. But can also be rewarding when you hit big like this 82 SOL arb.
Default: 60
Unit in seconds. This controls how often the priority fee is updated. This only works when you set priorityFeePercentile in your base-mint.json
The RPCs used to send transactions. This can be the same as RPC_URL
You can also set multiple RPCs here, split by comma. Setting multiple ones can increase the rate of tx landing and success.
Example:
This is an example instruction when setting USE_DIFFERENT_TX_FOR_SENDERS
=true
This image shows that the second RPC in the SEND_RPC_URLS
list sent this tx(first RPC is RPC 0).
Value from 0 to 100(you can set higher than 100 but not recommended). Automatically set COMPUTE_UNIT_PRICE based on current priority fee level. You need to set HELIUS_API_KEY
in order to use this. The bot utilize helius's priority fee api, to fetch the latest priority fee levels. The response is something like the following from the api, value map to the response, aka 0 means min, 25 means low, 50 means medium, 75 means high, 100 means veryHigh. If the current response looks like below, and you set 30 as the value for priorityFeePercentile
, the auto generated COMPUTE_UNIT_PRICE would be 10000 + (60082 - 10000) * ((30 - 25) / 25) = 20016. Note the value for each level will change all the time as market moves.
When this is set, it will override the COMPUTE_UNIT_PRICE
value in .env file.
This should be set together with MAX_COMPUTE_UNIT_PRICE
. The max COMPUTE_UNIT_PRICE
you are willing to set. This is helpful to prevent setting a huge priority fee as market moves.
Example usage of the config:
This allows you to set your gas fee to be a fixed percentage of the projected gain. Note you can only set one of PRIORITY_FEE_PERCENTILE
and SPAM_FEE_BPS
, not both.
Example usage of the config:
This config will use 5% of projected profit as the fee. Note this is not 5% of the final profit, it's 5% of the projected profit that bot calculated based on Jup API. If you set ENABLE_JITO_RPC
, this will be based on the simulated profit, which is more accurate than the projected one.
Default: 0
For helius and profit-based PRIORITY_FEE_STRATEGY, this field is required. This is to prevent you from paying some absurd amount of gas fee.
Default: true
This is a similar config to ENABLE_SIMULATION. The difference is ENABLE_SIMULATION will run the simulation with your RPC_URL before sending it, when you have SKIP_PREFLIGHT=false, the RPC received your transaction will run the simulation before it forward to the validator. This will also make landing slower as it's an additional call, but also it can reduce the failed transactions you land with ENABLE_SPAM.
You should only have at most one of SKIP_PREFLIGHT=false
and ENABLE_SIMULATION=true
. Setting both is not worth it.
Default: 0
Valid values are 0,1,2,3,4,5.
This config will try to limit how long a tx land compares to when you send it when using spam. 0 is no restriction, the same behavior as before. 5 is maximum restriction and will only allow the tx to land within ~1-2 slots. Note the exact restriction time for each level can be affected by your RPC's latency and performance. You may not land anything when you set this value to 4-5 if your RPC is not fast enough.
This config allows you to use a very high fee for spam strategy and also not losing too much money on failed ones.
Default: false
When setting multiple SEND_RPC_URLS
, this config will send a different tx for each of the RPCs. When this config is set to false, the same tx will be send to all RPCs.
You can also see which RPC send the tx in the last instruction of the tx. Index start from 0. See later section for example*.
BloXRoute is a service provider that provides service to send transactions through their endpoint. Our bot has a special collaboration with them to provide you this service at a discounted rate.
Default: false
You need to set ENABLE_SPAM
to true when enabling this. Make sure you set the right value for BLOXROUTE_REGION
when enabling this.
We have a collaboration with BloXroute, when this is set to true, your spam transaction will be sent through BloXroute's Trader API v2, in addition to all your SEND_RPC_URLS.
Note when a tx landed successfully with BloXroute, it charges an additional 0.0005 SOL as fee to use BloXroute's api and send through its staked connection. The bot already takes this into consideration and will fail the tx if your profit is not enough to pay for this fee + the bot fee. But do take this into consideration when you enable it.
This API has a10tx/s rate limit. So it's highly recommended to enable simulation when using this.
Default: ny
Only relevant when you have ENABLE_BLOXROUTE=true
. Valid values are ny
and uk
. Should only set it to be the closest one to your server.
Default: ''
You can set this to use your own key. If not set the bot will use it's own key with 10/s rate limit.
Default: 500_000
The bloxroute fee you pay, in theory the high this is, the faster you tx can be delivered. Minimum is 500_000.
NextBlock is a service provider that provides service to send transactions through their endpoint. Our bot has a special collaboration with them to provide you this service at a discounted rate.
There's no default key for NextBlock, you need to set your own key to use this.
Default: false
You need to set ENABLE_SPAM
to true when enabling this. Make sure you set the right value for NEXTBLOCK_REGION
when enabling this.
Default: ny
Supported region: ny
or uk
You need to set this to use NextBlock
Default: 1000000
The fee you pay to nextblock for each successful transaction
Default: false
Enable debug mode for additional logging
Default: false
When this is enabled, it will output an additional WIN
log when a transaction is landed. Though if you turn this on while having ENABLE_SIMULATION=false, it may consume a lot of your RPC credits.
Default: true
When this is enabled, it will output all the tx the bot sent out, through which provider(jito/rpc/bloxroute etc.). You can turn this off if the log is too overwhelming to you.
Default: false
If you don't want to see the error messages, you can turn this to true which will hide them.
Flashloan is a power tool when you have limited budget. You can set a higher trade size than what you have in your wallet, and get arbitrage opportunities that you usually won't be able to get.
Flashloan may not success 100% of the time. When the vault you are borrowing from does not have enough tokens, your transaction will fail due to insufficient fund. Though this should rarely happen.
When flashloan is enabled with the bot, and you are using SOL as one of your base mint, you should also set WRAP_SOL_AMOUNT
which is the amount of sol you want to wrap into WSOL. The bot will only use flashloan when the amount is larger than WRAP_SOL_AMOUNT
, for trade with less amount it will just use the amount in the wallet, to maximize the potential profit.
Default: false
Whether to enable flashloan. Note you need to have at least 0.5 SOL in the wallet to enable flashloan.
Default: solend
Currently supported values are solend
.
Soland flashloan charges a 0.04% fee based on the amount you borrow. So a trade that borrows 1000 USDC as shown above will need to find an opportunity that gives you at least 1000.4 USDC back for you to make a profit, compares to at least 1000 USDC when you are not using flashloan. This will results in more failed transactions if you send using spam, or less overall landing if use with Jito. The upside is you can get opportunities that is only possible with big amount. You can also use flash loan as a kick start option to minimize your risk of putting too much amount in your wallet.
Solend only adds 2 more instructions instead of 4. So you will run into less Generated transaction is too large
error compares to marginfi, but paying an additional fee as a trade off.
Default: 0
The amount of SOL to wrap into WSOL, only relevant when SOL is used as one of the base mint. By default the bot will wrap the largest amount in your trade size, but when flashloan is enabled you have to define how much you wrap. For all the trade with trade size less than this number, the bot will use the balance in the wallet, for larger ones the bot will use flashloan.
Blind quote strategy is one way to find opportunities with the bot. You define a list of intermedium mints, the base mints you want to trade with(SOL/USDC/USDT), and what trade size you want to trade with. The bot will use your trade size to quote for all the intermedium mints, one buy and one sell, and find profitable routes by combining the buy and sell routes together.
This strategy is a good start for beginner. It's easy to land as it can combine a lot of small opportunities into a big one, and generally less competitive.
You have to specifically set this to true to enable the strategy
This is used to control what base mint you want to use for your trades and what trade size you want to use. Base mint means the token you are going to trade and profit with, currently only SOL/USDC/USDT is supported.
The following setup means the bot will run with SOL and USDC. Note the unit is lamports here. So 1 SOL = 1,000,000,000 lamports. 1 USDC = 1,000,000 lamports. 1 USDT = 1,000,000 lamports.
Using 1 SOL/2.5 SOL/5 SOL as trade size for SOL, and will only try to send the transaction when the opportunity provides at least 0.0005 SOL in profit.
You can use the same mints for different TRADE_SIZE/MIN_QUOTE_PROFIT pair to customize your strategy.
Example:
Default: 1000
Unit in ms. The default value means the bot will wait for 1000ms then try again for the same token-trade size pair. Reducing this number will increase the chance to catch price change right away, but increase the read RPC load.
MIN_QUOTE_PROFIT is the threshold for when to send a transaction for the potential profit, it does not guarantee that the actual profit land on chain will be that. The actual profit landed on chain can vary, and the bot will fail all transactions that ends up with a negative profit, and land all the ones with a profit, even if the profit is smaller than MIN_QUOTE_PROFIT.
This config only works with you have both ENABLE_SIMULATION
and ENABLE_JITO_RPC
. Instead of using the quote profit that generated by jup, which can be very inaccurate sometimes, this allows you to use the simulated profit which is the exactly amount you will get if you land it right at your simulation time.
When this is set to true, no profit check for quote will be used. If you have simulation on the bot will still use that and only keep the ones that passed simulation. Jupiter quote can be very inaccurate sometimes so combining this with with ENABLE_SIMULATION
can find you more opportunities. This can also be used as part of super spam strategy.
Set in lamports on what sizes you want to trade with. Bot will quote jupiter api with the exact trade size you defined here periodically trying to find the most profitable routes.
Example:
If you don't want to manually define every trade size, you can utilize the trade range parameters. To utilize this you need to define 3 params: TRADE_RANGE
, TRADE_RANGE_COUNT
, TRADE_RANGE_STRATEGY
TRADE_RANGE: This defines the lower bound and higher bound for the range(inclusive). Bot will generate trade sizes only within this range. So make sure you have enough balance of the token for the upper bound.
TRADE_RANGE_COUNT: This defines how many different trade size will be generated within the range.
TRADE_RANGE_STRATEGY: Two values are supported right now: linear
and random
. Linear will generate trade sizes evenly within the range, and random will generate a trade size randomly each time.
Note: quote using random is slightly slower than quote using linear or fixed trade size. As for random two quotes are sent out one by one while for fixed size two quotes are sent out together.
You can override JITO/SPAM configs for each base mint you define, this allows more complex strategy setups without the need to run a different instance of the bot.
Here's an example of overriding JITO_TIP_BP
for two base mints. The one without any override will use the global defined value, the one with override will use the override value.
Note: Only JITO/SPAM configs support config override.
Backrun strategy is monitoring large trade onchain, and counter trade the ones found to find arbitrage opportunities. This is a more advanced strategy, and requires yellowstone to run.
Backrun strategy works like the following:
1. Bot will monitor the markets you defined in DEXES_TO_MONITOR, with all the intermedium mints you defined above
2. If a trade cause the pool's price moved more than MIN_PRICE_IMPACT_PCT, bot will try to create a trade to backrun it
3. Bot will use the trade size you defined in TRADE_CONFIGS, to randomly generate a size between MIN_TRADE_BP and MAX_TRADE_BP, based on the trade you are back running
4. Bot will quote the other size of the trade with jupiter, create a full arb trade tx
5. If the tx has profit and it's higher than MIN_QUOTE_PROFIT, bot will send it out
Example config:
You have to specifically set this to true to enable the strategy
You can add memo to all the tx generated from backrun strategy. This will override the BOT level memo.
This will append the slot of the tx you backrun to your memo, you can compare this value to the slot number you tx landed on, to get a sense of how fast you land your tx.
Which dexes to monitor for your intermedium mints. Supported values are:
This will filter out trades that only has a price impact over this number. This is useful as most of the small trades won't generate an arbitrage opportunity.
This is used to control what base mint you want to use for your trades. Base mint means the token you are going to trade and profit with, currently only SOL/USDC is supported.
MIN_QUOTE_PROFIT is the threshold for when to send a transaction for the potential profit, it does not guarantee that the actual profit land on chain will be that. The actual profit landed on chain can vary, and the bot will fail all transactions that ends up with a negative profit, and land all the ones with a profit, even if the profit is smaller than MIN_QUOTE_PROFIT.
This config only works with you have both ENABLE_SIMULATION
and ENABLE_JITO_RPC
. Instead of using the quote profit that generated by jup, which can be very inaccurate sometimes, this allows you to use the simulated profit which is the exactly amount you will get if you land it right at your simulation time.
When this is set to true, no profit check for quote will be used. If you have simulation on the bot will still use that and only keep the ones that passed simulation. Jupiter quote can be very inaccurate sometimes so combining this with with ENABLE_SIMULATION
can find you more opportunities. This can also be used as part of super spam strategy.
Unit in lamports. If the generated opportunity has a trade size smaller than this value, it will be skipped.
Unit in lamports. If the generated opportunity has a trade size bigger than this value, it will be capped at this value instead.
This is a list that contains two value MIN_TRADE_BP
and MAX_TRADE_BP
.
Let's say you see a trade trading 100 SOL for WIF. And you want to counter trade it. Usually you don't want to trade back the full amount as it may not have the best price for you. This config allows you to set a range, the example below means the bot will randomly generate a trade size that is 20% - 30% of the original trade. In this case the generated backrun trade will has a trade size between 20 SOL and 30 SOL.
Note this is a list, so you can define multiple range so that you can capture one trade with multiple tx with different trade sizes.
A list of route types you want to run the bot with. Currently the only supported type is 2hop
, which means a trade like A->B->A. More types will be added later.