First of all, we would like to welcome you to the DEXBot community! Whether you interact with other members of the community or not by using DEXBot you are contributing to increased liquidity on decentralised markets.
The DEXBot project was born when a group of individuals from around the globe started discussing ways to increase liquidity on decentralised markets. The idea of free, open source trading software (market making software to be precise) was a popular one.
DEXBot’s main focus is to increase liquidity and it does this by only offering tools/ strategies for adding orders to the books rather than removing them. It is a market maker, not a market taker.
DEXBot can be used on any market on the BitShares blockchain.
To begin with download the latest version here:
Make sure you download the correct file for your operating system, in this case the file will include “win64” in the name and will have a file extension of “.zip”.
Once downloaded, extract the file to a folder of your choice and double click the “DEXBot-gui” application. DEXBot will now install and a screen will pop up prompting you for a “wallet password”.
This screen is not asking you for your blockchain wallet password. DEXBot creates a file (wallet) that secures your keys by encryption. You will later need to input your keys so that DEXBot can make changes to the blockchain, this is how those keys are secured. Choose a good password. You will next be greeted by the DEXBot dashboard where you will want to create a worker. Please read the “Worker Types” section before proceeding to the “Creating a Worker” section.
There are currently two types of worker available both with a variety of settings which the user can customise to suit their needs. The two worker types are very different in how they work.
With SO workers numerous orders are placed across the order books and help to increase order book depth. The user will select a range that they want the orders placed within and increments that they want the orders spaced apart. They will also select a spread, this is the gap between your highest buy order and your lowest sell order. Once setup, if price moves up and fills your lowest sell order, DEXBot will automatically use the funds to replace the filled sell order with a lower buy order above your previously highest buy order whilst maintaining the desired spread. If the price dips and fills your newly placed buy order DEXBot will use the funds to replace with a new sell order.
In this scenario your placed orders would look and change like the image below with buy orders in green, spread in white and sell orders red. You would have sold at $157, re-bought lower at $149 and be back where you started, ready to take advantage of the next price move.
Profits from each successful trade, like above, are spread across all orders, maintaining the originally intended mode type. DEXBot will replace all orders on the books with slightly larger ones, so the next time you make a profit you will make a little bit more.
Some features of the SO workers are as follows:
SO workers do not need to be left running all the time. If you leave an SO worker running it might be more profitable but it is not necessary. If you leave an SO worker running it will replace orders as they are filled allowing you to take advantage of all price moves. If you setup an SO worker and then close DEXBot the orders will remain on the book, any filled orders will be replaced the next time you restart the worker. You may however miss out on some action if price bounces back and forth between the same orders whilst DEXBot is offline and unable to replace them.
SO workers can be started one sided. If the user starts with only one asset, DEXBot will place orders closer to the market price and wait until one fills. Profits will be used to add orders to the other side until the strategy is completely balanced (according to the configuration).
SO workers have 5 different strategy modes, they are as follows:
Mountain mode concentrates funds more to the centre of the range (around the spread) and less towards the outer limits. It makes more profit “right now” and compounds profits faster, but it’s less good if the price decides to drift significantly towards the boundaries of the range.
Valley mode is the opposite of Mountain mode and is for bootstrapping a market or for use on a highly-volatile one. It makes little profit if price stays where it started, but can withstand a massive change and loves volatility as larger orders are filled towards the boundaries of the selected range.
Buy Slope mode is where order size is fixed in the BASE asset over the whole range. Regardless of the price (of QUOTE asset), orders will be the same size and make a similar profit. This mode makes sense only if you start of with much more BASE than QUOTE. All profit will be made in QUOTE asset.
Sell Slope mode is the exact opposite of Buy Slope mode. Order sizes are fixed in QUOTE asset. You can achieve the same by using Buy Slope but swapping BASE and QUOTE.
Neutral mode is for any market, and it is a nice balance between Valley mode and Mountain mode. It will work well in stable times and also with extreme movements. If you don’t know what to choose, use this. It makes the least assumptions. It doesn’t rely on volatility nor on stability.
This strategy places a buy order below the centre price and a sell order above the centre price at a user defined spread. Once an order is filled DEXBot will reset both orders and wait to carry out the process again. Users would use this strategy hoping to profit from the spread, attempting to frequently buy low and sell high.
The strategy adds liquidity close to the current price, and so serves traders wanting to buy or sell right now with as little slippage as possible. Lowering the spread on a market tends to increase trade activity.
This strategy requires DEXBot to be online constantly.
There are a few different parameters for the RO strategy and various means of acquiring them. They are as follows:
(distance between buy and sell orders to be placed)
Fixed Spread. A user would input their desired spread and unselect “dynamic spread” option.
Dynamic Spread makes your spread depend on the market’s spread — making it change every time new orders are created and has a couple of options available such as “market depth”. If the “market depth” option is set to “0” it will calculate spread from the closest buy and sell orders on the books other wise spread will be calculated from desired order book depth. “Dynamic spread factor” is how many percent of the market spread should our spread be, inputting less than 100% will give us a spread smaller than the current market spread.
Centre Price (to be thought of as the reference price for placing own orders)
Fixed Centre Price is pretty self-explanatory. You input a centre price and DEXBot will place orders at a given spread from this price, when an order is filled it will reset both orders at the same prices and will repeat this process until you end the worker.
Dynamic Centre Price will measure the centre price from either the closest buy and sell orders or you can input a desired market depth. This can be very handy in illiquid markets where a stray dust order might cause DEXBot to place orders somewhere you might not consider to be the centre. There may also be situations where traders try and manipulate DEXBot into placing orders lower or higher than desired by placing a small order way above the previous highest buy for example. In these situations, it is very helpful to measure centre price from a certain depth in the order book.
Centre Price Offset Based on Asset Balances shifts the calculated centre price up or down in order to assist in keeping the portfolio in balance — to not end up holding only the other asset, and to help maximize profits. When price goes up you will find that you get lots of sell orders filled and less buy orders filled causing an unequal holding of assets. In these situations you may find it helpful to offset the centre price in order to make it more likely that your buy orders are filled in an attempt to keep buy and sells equal as well as asset balances.
Order Size (size of orders to be placed)
Fixed Order Size is priced in “Quote Asset” for both buy and sell orders. “Relative order size” must be unchecked for this option to be available.
Relative Order Size is based on how much of the asset you have. 10% means it will allocate 10% of the “Base Asset” you have and 10% of the “Quote Asset” you have. This helps to keep asset reserves balanced as when you accumulate more of one asset your order size will increase (on that side) and when filled it will help re-balance reserves.
Reset Options (when you want DEXBot to reset the orders being placed)
Reset Orders on Partial Fill. If left unchecked, orders will be reset only when one is completely filled. “Fill threshold” means what percent of the order must be filled to trigger order resets.
Price Change will keep an eye on the market centre price and if it changes more than desired amount it will trigger an orders reset.
Order Expiration is based in seconds and allows you to reset orders at desired intervals.
Creating A Worker
So now you have an idea of what tools are available to you, I’m fairly confident your keen to get started and start experimenting with your new toy! Whilst experimenting and familiarising yourself with the DEXBot software I highly recommend starting off with small amounts of funds.
From the DEXBot dashboard select “Add Worker”, from there you will be greeted with the following screen:
Before you select your strategy and input required “Worker Parameters”, you will need to input your wallet address (account) and private active key. You can find your private active key on the DEX under the “permissions” section as seen below, make sure you are on the “active permissions” tab and not “owner” or “memo”. Click on your public key as shown below:
After clicking on your public key, you will be greeted with the “Private key viewer” window, as shown below, where you can reveal your private key by clicking show. You will be prompted for your password if you are not already logged in. For this demonstration I have used the BitShares DEX but it should be the same process on other exchanges like XBTS, CryptoBridge or OpenLedger.
After inputting your account and key you are ready to select the assets you want to trade and the strategy in which to do so and required parameters.
Native BitShares assets, such as smart coins, are inputted in the following format:
BTS, USD, CNY etc.
Due to the large number of exchanges utilising the BitShares blockchain, they tend to prefix their assets so users are aware which asset has been credited by which exchange, for example:
XBTSX.BTC, SPARKDEX.BTC, OPEN.BTC etc.
- NOTE: You can type into the BASE asset dropdown box.
You can also select which asset you desire the blockchain fees to be paid in. DEXBot will hold a small amount back for placing and cancelling orders, so there is no need to buy BTS in order to trade with DEXBot. Although it is worth pointing out that it is cheaper to pay fees in BTS and there is a chance an assets fee pool could run out, making it impossible to pay fees with a certain asset. If this happens, contact the asset issuer and ask them to top up the fee pool.
I hope this guide helps, if you need further support please join us in our telegram room via the link below:
Or to discuss market conditions and appropriate strategy/ settings, join us in our community room:
Original read and rate here https://medium.com/@CryptoKong123/market-making-dexbot-user-guide-ae7b5808b3b6