Gitcoin Bounty: Custom Strategy for Market Protocol (SBTC/LBTC)

We are collaborating with Market Protocol on a gitcoin bounty to develop a custom strategy to trade SBTC and LBTC:

Feel free to post any questions, comments here.

Here’s a question from Market Protocol’s github:

@alexjg: rationale here for separating out into a new/different strategy is that the calculations are different enough that I thought it may not make sense to add additional complexity to the original xemm strategy which is being used as-is. I’ll ask our devs to chime in here, as well as respond to your specific question.

Yes that’s right. You can refer to the market classes for price calculations. For example if you look at binance market at hummingbot/market/binance/binance_market.pyx, you can find c_get_price(self, str symbol, bint is_buy) function.

Which calculations are different though? Am I correct in thinking that the only thing that is different is the way that the price is calculated for the hedging calculation, or are there other things I have missed?

From my reading of the c_get_price function the price actually comes from the OrderBookMessage applied by the market specific OrderBookTracker. That’s why I’m suggesting that we would just modify the OrderBookMessage for LBTC or SBTC, so that the price is calculated based on the leverage calculations.

Am I misunderstanding how the leverage calculations would be applied? Or am I missing additional difference from the cross market strategy?

Apologies if my questions are basic, I haven’t worked in finance for a pretty long time so I don’t have a great understanding of the domain.

1 Like