Introducing the BlackBot

Guy
Incent Loyalty
Published in
5 min readDec 6, 2017

--

Prompt settlement without undue slippage is vital if Incent is to succeed as a reward currency amongst mainstream merchants and consumers. We’ll be using the Waves DEX to ensure a 24/7 market, but liquidity and orderbook depth is currently lacking. Here’s how we plan to address that.

In order for Incent to be useful to consumers, it must be possible to buy and sell it around the clock, with minimal delays and as close to market price possible. Our flagship concept of ‘Open Value’ starts to look a whole lot less attractive if $10 of Incent can only be sold for $8 because the orderbooks are too thin.

We’ll be making heavy use of the Waves DEX, since it runs 24/7 without interruption, is totally secure, and has very low fees. In order to take advantage of the liquidity on centralised exchanges, we plan to arbitrage DEX against Bittrex and others, passing volumes through to them whenever it’s of benefit.

Ultimately the market will be able to support itself, but in the early stages we need to ensure that DEX itself has at least a minimum of activity on it so that, whatever else is going on, we know we can settle orders without customers taking a hit.

Marketmaking bot

With this is mind, we’ve always intended to run various marketmaking operations. One strand of these takes the form of a trading bot that we designed this way back at the beginning of our journey. Before, in fact — it’s based on the same premise that this bot uses, back in the Bitscan days. Whilst the theory is good (it’s based on the well-known grid-trading strategy), implementation is everything and that particular iteration of the tradebot was somewhat glitchy due to lack of programming expertise.

Fortunately, we’ve had some help this time. Peter Black, a long-term member of our Incent community and the developer of the PyWaves Python library for Waves, has volunteered to work on the project. Back in the day, this trading algorithm was dubbed the ‘GuyBot5000’ for reasons that will hopefully be forever lost in the mists of Incent lore. Whilst the algorithm remains the same, due credit must be given for actually building a working version of it, and so the new iteration will henceforth be known as the BlackBot, which in any case sounds a lot cooler. Here’s how it works.

Buy low, sell high, rinse, repeat

Grid trading doesn’t care about which way the market’s going — in fact, as a profitable strategy it works best in ranging markets, though in our case we’ll be using it to facilitate what we hope will be a steady rise in the value of Incent. The strategy places a ladder of sells at regular intervals above market price, and another ladder of buys beneath it. If a sell is filled, those funds are used to place a buy just beneath that sell. Thus you can think of the grid as a series of pairs of buys/sells stretching up and down the price chart, with either the buy or sell in each pair always active.

For example, let’s say the last price is 2000 satoshis you’ve got sells laddered up at 2100, 2200, 2300… If the price hits 2100, you immediately use those funds to place a new buy at 2000. If it drops to 2000 again, you buy back the Incent you sold at 2100. If it rises further, you sell at 2200 and open a buy at 2100. Whichever way the price moves, you’re providing depth — buffering the market and smoothing out any peaks and troughs. Additionally, if you open and then close a trade within a tranche (e.g. you sell at 2200, then buy back at 2100) then you make a small profit — though this is a nice bonus in our case, since our primary aim is to increase liquidity with the intention of facilitating settlement and attracting enough traders to develop a mature market.

We intend to place tranches 1% apart, rather than a fixed amount, so that merchants will never have to worry about more slippage than that on orders below a certain size (probably around $100). Assuming all goes to plan, we’ll end up having sold tranches of Incent all the way up to a point where the price is an order of magnitude greater than it is now. The good news is that the magic of compound interest means you don’t have to spend a lot in dollar terms to support the market all the way up to a 10x in price. (If you’re interested, then starting at a price of $0.20, you’d need 230 tranches of Incent spaced at 1% to hit $2 each, for a total of 36,000 Incent. That seems like a smallish price to pay for 1,000% appreciation.)

How we hope you’ll help

The bot is currently in testing — it’s already working as planned, but we’re obviously keen to ensure there are safeguards for the edge cases where it doesn’t function properly for one reason or another.

Once we’re ready, what we intend to do is open source the BlackBot so that anyone can use it on DEX, with any pair of tokens. Waves is getting a major overhaul with an incredible new user interface for the wallet and DEX, and the Waves-NG algorithm enabling massively increased throughput, so we expect the platform will attract many, many more users and traders in the coming weeks and months. There is benefit in deploying the BlackBot for any token that currently lacks liquidity, which includes many of the tokens that also trade on centralised exchanges.

The bot is written in Python and can easily be customised for different pairs of tokens, tranche sizes, spacing, and so on. We’ll make sure there’s a BTC-INCNT and/or WAVES-INCNT market, and we hope that other people will run the bot on these too to increase the depth. But they can also run it on other pairs, providing a wider benefit for the DEX. (There’s no reason you couldn’t run it on BTC-WAVES or BTC-ETH, grinding out a little profit every time the market moves up and down 5%, for example.)

Stay tuned for more developments, and we hope to have some code for the community to review and test themselves soon.

--

--

Guy
Incent Loyalty

UK-based cryptocurrency communicator. Class of 2014.