zetamarkets/sdk

Delta Exchange Arbitrage Bot

Closed this issue · 0 comments

Build a simple arbitrage script between the SOL/USD, BTC/USD and ETH/USD options on Delta Exchange and Zeta. Given these options are both USD collateralized, arbitrage should be much easier to maintain with a few edge cases.

  1. Delta Exchange's expiries are at 12PM UTC on Fridays
  2. Collateral obligations must be met between both exchanges.

The ideal options arbitrage script would:

  1. Be able to pull data using Zeta's SDK and Delta Exchange's programmatic interface in order to compare and contrast options of the same tenor, and same strike.
  • Be able to identify clear arbitrage opportunities for weekly options, where bids and offers are in cross.
  • Be able to programmatically send orders to arbitrage away options which are in cross with each other.
  • On a partial fill / no fill, be able to implement retry / position close logic to ensure there are no residual risks from legging the trade.
  • Be able to manage margin considerations and alert when the margin obligations on either exchange are in risk of call
  • Consider transaction costs in the calculation of any arbitrage opportunity.
  • Contain robust logging of the observed orderbooks on both exchanges as well as any bot actions in order to accurately diagnose and debug actions.
  1. Be able to extend upon arbitrage bot 1) and also:
  • Perform call spread, put spread and butterfly arbitrage across the two venues in the case of mispriced spreads
  • Perform calendar arbitrage across the two venues in the case of mispriced spreads
  • manage net delta across each exchange by hedging with futures (perpetual or dated) such that margin obligations are lessened on both exchanges
  • Contain a 2 week log of the bot running in production with verifiable trading logs.