XEMM HIP: Minor Improvements

Author: Jelle {Cryptobot} 0xe8f

Original Post Date: 4 Jul 2022

General Description:

This is part of a 4 part HIP consisting of:

  • XEMM triangular arbitrage
  • XEMM automatic rebalancer
  • XEMM Minor Improvements
  • XEMM latency optimization

In the past two months, I have significantly improved the XEMM strategy, which allows me to better manage slippage, run XEMM with triangular arbitrage, significantly scale up campaign exposure, and spend 60% less time on managing my XEMM strategies.

Unfortunately, as I am not a developer, my code is written unprofessionally and is for personal use only. However, as I think all users will benefit from these improvements, I think these ideas should be further developed by a professional programmer. My code can be used as a guide, and I will further assist (if needed) any developer who wants to further develop these ideas.

This proposal will first be published on the commonwealth forum so users can add comments, give their opinions and share ideas. Later, the proposals will be put up for a vote as a HIP.

Minor Improvements:

Below a list of minor improvements to the XEMM strategy:

Minorderamount: specify a minimum order amount for placing a maker trade. This generally solves a problem in which your maker trades were placed on an exchange that allows order sizes below $10, while hedging on the taker exchange was not possible because the min order value must be above $10. In the past, this has resulted in lots lot of buys, without any sells as the sell amounts were below the minimum required amount on the taker exchange.

Top_depth_tollerance_taker: a parameter to better manage slippage. This parameter will add a multiplier to the order size for the effective_hedging_price (taker) calculation. If your order size is 100 tokens and the top_depth_tollerance_taker parameter is set to 10. The bot will calculate the taker price as if you want to hedge 110 tokens instead of 100, creating more room for error without reducing the profitability. Personally, I think that this parameter is essential for this strategy as it allows for better risk management.

Add min_profitability output of maker and taker order to terminal: To better manage profitability, display the min profitability in the terminal based on the maker fill price and the taker order price. Or the maker fill price and the average taker fill price.

*MP in the above image does mean Maker Price, not Max Profit.

I would like to get your opinion on this idea before submitting this as a HIP.

Feel free to DM me on discord: @Jelle {Cryptobot}

Github Link: GitHub - jellebuth/Jelle-V2.2

Do you want to have it as an additional config param? I think the problem you described could be fixed in the the order amount calculations logic.

Add min_profitability output of maker and taker order to terminal
Can you elaborate on this a bit more? What is 0.286 on your screenshot? What calculations are behind this min_profitability?
I calculate profit after a trading round (both maker and taker orders are completed) and make actions depending on the output (change order amount, min_profitablility, etc). But the logic behind could be unreliable for everyone. I’m wondering what is your way.

I remember you have filled_order_delay config paramter. Do you think it’s worth adding it? I usually use it.

I also think about a tool against fast market moves (spikes). Something similar to PMM moving_price_band.