I Ran a Market Making Bot On The Bitshares DEX For 5 days. +54% Profit

George Harrap
4 min readMay 26, 2018

Yeah I know….. mileage may vary, depends on alot of variables etc but I still think it worth noting as a point of interest so far.

So, as you have seen me talk about before, Bitshares is awesome and so far ahead of many other projects and has been so for years. However recently a worker proposal was approved (worker proposals are where people get paid by the blockchain for doing something and get voted in) for the creation of market making bot for the Bitshares Decentralised Exchange, called Dexbot. I thought it’d be fun in a personal capacity to try out the bot on a spare computer I had at home myself.

Dexbot is an alpha version of a command line and GUI trading bot that can run on the bitshares DEX when connected to your Bitshares account and wallet. The github is available here and telegram channel here. It is by no means a finished product yet and should not be used in production, only put money into the bot you’d be willing to lose.

Keep in mind my strategy was the ‘relative order’ strategy which optimally performs well in volatile markets. You place orders on the bid and the ask at some spread, when one gets taken you relist it on the other side and make a profit of the difference in between. More information is available at the Dexbot website or on Steemit. Think of it as me wanting to buy an apple for $9 then selling an apple at $11.

I thought I’d give it a go and here are my results from the start of the week till the end of the week.

Firstly some settings:

Market: BTS/ZEPH

Spread: 10%

Strategy: Relative orders

Amount: 30% of balance.

Platform: Ubuntu 16.04 and Win 10.

Ok ready? Lets get into some results so far…….

Day 1 Total Balance:

BTS Balance: 71.08

ZEPH balance: 136.66

Day 5:

BTS Balance: 42.1

ZEPH: 450.64

current balance + current open orders youll need to sum them both for total balance 42.1 BTS and 450.64 ZEPH

Now, for my purposes I am determining performance with reference to either BTS or ZEPH currencies (in my case, ZEPH) as that is what i am denominating gains and losses in. If I compare to USD that is taking an additional variable and pricing metric into the equation which would not be representative of bot performance as it wasnt trading on the BitUSD market. Both the BTS and ZEPH USD denominated prices depreciated during the same time period by approximately the same amount.

We can see there is less BTS and more ZEPH than on day 1 and to find out if we are ahead or not we need to use the current market price to see if I sold some of the ZEPH at the current market price, would I be able to still have more than 71BTS and 136 ZEPH. The difference between Day 1 BTS and Day 5 BTS is:

71.08–42.1 = 28.98 BTS

The current market price at time of writing for BTS/ZEPH is 0.12.

1/0.12 = 8.33 will get us the inverse in ZEPH/BTS.

So 28.98*8.33 = 241.4 ZEPH

Our balance on Day 5 is 450.64 so if we deduct the amount of ZEPH required for us to break even on the BTS (sell 241.4 ZEPH to get back 28.98 BTS) we are left with 450.64–241.4= 209.24 ZEPH and 71 BTS.

Now if we divide the Day 5 and Day 1 balances we get 209.24/136.66 or 53% higher ZEPH balance than when I started. If i wanted to see my gains in BTS, I would sell 209.24–136.66= 72.58 ZEPH to BTS and then I’d be able to have a higher BTS balance instead and calculate gains relative to that.

Over time the bot rebalances the account between both sides of the pair but this is a small timeframe of only 5 days so I thought it would be interesting to calculate performance using this metric. It would be interesting to try other markets like bitUSD/BTS and see how performance stacks up when referenced to USD.

Time for some more testing and am definitely looking forward to future development of Dexbot. Of course only use bots and alpha software if you are aware of the risks and know what you’re getting into with the potential to lose money!

--

--