Support for perpetuals in the Cross Exchange Market Making strategy?

Author: matej 0x2d4

Original Post Date: 10 Jan 2022

Currently the XEMM supports only market making on spot markets. Fees on perpetuals are low so MM perpetuals can increase capital efficiency. Would you be interested in the XEMM supporting also perpetuals?

Author: PHBR0 x58B

What would be the mechanics details?

If a buy is executed on the maker market (spot), a short of the same value (with the order size depending on the leverage)?

But a sell on the spot would also create a long position on the perpetual market?

Author: Jelle {Cryptobot} 0xe8f

At the moment cross-exchange market making is only possible for Spot to Spot market. I think that adding perpetual markets as the taker exchange to cross-exchange market making can result in better capital efficiency :white_check_mark: improved risk management :white_check_mark:, decrease fees :white_check_mark: increase the use of the DYDX exchange :white_check_mark:and have a better alternative to the spot-perp arbitrage :white_check_mark:strategy,

For me, the most important is to be able to hedge on the perpetual market , but market making on the perpetual market and offsetting it on another market (spot or perpetual) would also be interesting as it could create new sources for exploiting profits and maybe in the future could add support for liquidity mining on perpetual markets?

By allowing hedging on a perpetual exchange your funds are automatically hedged✅(as you buy on spot and short on perpetual or vice versa) resulting in a delta neutral strategy and improvement of risk management options . If your buy maker order gets filled, you automatically hedge it with a taker sell order on the perpetual exchange, resulting in a position that is effectively zero of coin x (as you go long and short at the same time).

The strategy can be ran next to the new Hedge strategy if these improvements are made to the strategy (see github link below this section). That way you can effectively trade delta neutral with periodical checks and rebalancing of the funds so your long positions and short positions remain the same size, even if your bot is not doing 100% what it is supposed to do (we all know that happens sometimes :wink: (minimizing inventory risk).

This increases capital efficiency as you do not need to have x number of tokens on exchange 1 and x amount of tokens on exchange 2 and x amount of tokens on your hedging exchange✅ Cross-collateral is possible and you can use leverage to hedge the position. If you want to hedge your positions you don’t need extra funds to hedge on the perpetual exchange.

Decrease in trading fees :white_check_mark:as fees for perpetual contracts are generally lower than for spot trading. Meaning, higher profits per trade or lower spread, leading to higher liquidity mining rewards.

This strategy also allows for a better alternative than the spot-perp arbitrage strategy .:white_check_mark:As with that strategy you basically exploit the difference between two taker prices instead of a maker and a taker (which results in more opportunities and higher profit potential.

Let me know what u guys think!

Author: Jelle {Cryptobot} 0xe8f

I do think this should be added to the current strategy, and not be a separate strategy. Definitely some logic needs to be changed to accommodate the perpetual markets, but it would be nice if the code could stay as much the same as it is for the spot to spot XEMM, so if people have built their own parameters etc. these can still be used.

Author: Jelle {Cryptobot} 0xe8f

Looking at some opportunities within the XEMM perpetual strategy, Gate.io offers for example a maker rebate. Judging by the coingecko spreads, there is some opportunity here! Effectively 0% for trading on Gate.io and hedging on Binance.