Advancing the PMM strategy

Author: Alkhalifah 0xa5f

Original Post Date: 8 May 2022

Hi all,

I have been using the pure market making strategy for around 7 months, and there are many features I would like to be added which I think will make the PMM strategy more advanced. In this thread, I will start with proposing two features and I would like to have your opinion.

Before further elaborating in my proposal, I would like to explain how I am currently using the pure market making strategy.

As you know, there are currently way too many crypto projects and tokens being launched on a weekly basis, and I have noticed that many tokens on emerging crypto exchanges have lucrative spreads on the 1 min chart, which I am trying to take advantage of using the pure market making strategy. I will take the crypto dot com exchange and the QI/USDT pair as an example to explain what I am doing and what I would need to be added to the PMM strategy to make it more advanced.

As you can see in the chart of QI/USDT below, there is more than 2% of spread between bids and asks on the 1min chart, this can be taken advantage of using the PMM to make profits and this is what I have been doing. However, I have noticed that those spreads come and go and it is not effective nor efficient keep Hummingbot running for all of the pairs on an emerging exchange because:

  1. once the spreads go back to normal levels, the trading fees will eat up all the profits

  2. assuming we use min_spread to pause the bots when the spread is back to normal levels, it takes a lot of time, effort, and computer cloud fees to keep hundreds of Hummingbot instances running on all of the pairs on an emerging exchange.

Therefore, I would like to propose the following new feature to be added to the PMM strategy to help traders take advantage of such markets:

  1. The option of adding multiple markets through one Hummingbot instance (similar to the liquidity_mining strategy)

The purpose behind this new parameter is to make it feasible to launch and manage many pairs through one single instance

  1. The option of market selling the base asset back to the quote asset once (or maybe after a certain customized duration) the spread goes below the min_spread

The purpose behind this new parameter is to limit exposure risk of an emerging crypto asset with low liquidity

Best regards,

Author: cgambit 0xdEa

Thank you for your interests in PMM to gain more features. We too are looking for ways to improve it. Let me share my opinions.

(1st Proposal)

A feature like liquidity_mining strategy for PMM may be cutting off its flexibility to set different parameters like spreads, order amount, etc for different pairs.

Although, we need more resources to spin up individual instances for each pair, I opine this is good trade off for flexibility on treating each pair respectively according to its volatility & volume.

One solution for managing hundreds of bots (if you have that many) might be using Kubernetes, whereby you can change config files’ settings simultaneously.

As for saving service fees, you may want to try & Contabo cloud services.

Thus, personally, this proposed feature is unnecessary.

(2nd Proposal)

Providing PMM a ‘market’ order type is a game-changer. It will drastically lessen the bot management as it can auto-rebalance itself to gain more liquidity mining rewards, while also minimizing inventory risk or stacking.

We have discussed this topic to some devs who confirmed that this feature is feasible, although to note that some exchanges like Gate_io does not allow ‘market’ order type.

We do hope that this feature will gain more interests & be implemented as soon as possible.

Author: jamesPmagic 0x4eF

The proposed ideas are great. However my personal opinion is that instead of having one strategy (PMM) with a lot of variables and options, it is better to just develop new strategies that implement the suggestions proposed above. I feel that adding complexity to existing strategies could lead to unexpected behaviours and bugs.

Author: PHBR0 x58B

Agree with @jamesPmagic here. This would work better as a new strategy.

Also, we do have an approved HBOT reward budget to new strategies and improvements

Check this page on how to request participation on dev grants

Author: Jelle {Cryptobot} 0xe8f

Thanks for these ideas. I use something similar to what you describe in your second idea.

I have implemented something similair to what you describe in your second proposal. I have implemented a take profit level (similair to the one in perpetual market making) and and something similar to a stop loss. Whenever the take profit target is not hit within x minutes/seconds. I will place maker orders at the top bid/ask price to get filled as quickly as possible. This allows me to keep a constant inventory over time.

I personally liked the idea of a stop loss and take profit level and think it will be a good addition to PMM. Especially as it is suited for beginners.

I do not fully agree with @jamesPmagic I think that (unless you are a programmer) the current PMM strategy is quite limited and new features should be added, however these improvements should be carefully chosen (by the community). Adding a new strategy would also add complexity to the overall codebase as improvements should then be made to another strategy instead of one strategy only.

I would suggest to look at the take profit and stop loss params in perpetual market making and putting you proposal up for a vote and see what the community thinks.