Fixed spread vs market price strategy

Order classification and price

In the following, we call any non-ADA token commodity, and we call ADA currency. An order offering currency in exchange for commodity is called a buy order, whereas an order offering commodity in exchange for currency is called a sell order.

Price is described in display unit1 of currency token per display unit of commodity token.

Given a market price M and a variable δ defined as spread, the bot would place the following orders, where exact numbers and volumes are determined by the configuration:

  • Buy orders at price:

    • M * (1 - δ)

    • M * (1 - δ - δ / 2)

    • M * (1 - δ - δ / 2 - δ / 2)

    • And so on, where nth buy order's price is given by M * (1 - δ - (n - 1) * δ / 2).

  • Sell orders at price:

    • M * (1 + δ)

    • M * (1 + δ + δ / 2)

    • M * (1 + δ + δ / 2 + δ / 2)

    • And so on, where the nth sell order's price is given by M * (1 + δ + (n - 1) * δ / 2).

If the market price has drifted way higher ("way higher" as directed by the configuration) than the price at which buy orders were placed, buy orders would be canceled. Likewise, if the price has drifted way lower than the price at which sell orders were placed, those sell orders would be canceled.

Last updated