Learn how to use AMM arbitrage strategy
Updated as of v0.33
Before you can use the AMM arbitrage strategy in Hummingbot, you need to install and configure the Gateway API server. The following flowchart shows the typical installation and configuration process for Balancer.
Ensure you have setup the Ethereum wallet and nodes, for more details:
- see Setup Ethereum Wallet
- see Setup Infura Node. Take note of the Ethereum RPC URL to be use later for Gateway Docker settings.
After the installation and configuration is completed, we can create the configuration for AMM arbitrage strategy. The following example shows a step-by-step on configuring the AMM arb strategy.
- In Hummingbot, enter
- Enter the first trading pair, for example
- Enter an exchange connector, for example
- Enter the second trading pair, for example
- Follow on-screen prompts and info for AMM arb parameters.
startto run the strategy.
- To check transactions, you can use etherscan.io to check if any pending transaction gets stuck for too long (> 5 min). If any Tx is got stuck, change the
config ethgasstation_gas_levelto fast, the transaction setting should complete < 1-2 min
For details on each AMM parameters, see the following sections for details. These parameters are fields in Hummingbot configuration files (located in the
/conf folder, e.g.
Enter the first exchange/AMM you would like to trade on.
Enter the first token trading pair for the secondary exchange.
Enter the secondary exchange/AMM you would like to trade on.
Enter the second token trading pair for the secondary exchange.
The order amount for the bid order of the base asset for the first trading pair.
Minimum profitability target required to execute trades.
Percent buffer added to the market 1 exchange price to account for price movement before trade execution.
Percent buffer added to the market 2 exchange price to account for price movement before trade execution.
If true the bot submits both arbitrage taker orders (buy and sell) simultaneously. If false, the bot will wait for first exchange order filled before submitting the other order.
If you prefer to manually set your gas other than using Defipulse.
Two ways to switch network Ethereum mainnet/Kovan testnet
- Delete the Gateway docker container and re-run the
update-gateway.shscript to update the docker image and follow the prompt instructions.