Kujira.Bow.Pool.Xyk (kujira v0.1.47)

A instance of the BOW XYK Market Making strategy.


  • :address - The address of the contract

  • :owner - The owner of the contract

  • :fin_pair - The FIN Pair that this pool market-makes for

  • :token_lp - The receipt token minted when deposits are made to the pool

  • :token_base - The base token of the FIN Pair

  • :token_quote - The quote token of the FIN Pair

  • :decimal_delta - Base decimals - Quote decimals. Used to assert correct price_precision

  • :price_precision - Maximum number of decimal places of the human price when submitting orders

  • :intervals - The space between orders placed by the contract

  • :fee - The premium calculated on top of the XY=K algorithm, used to size orders

  • :status - The current deposit status



@type t() :: %Kujira.Bow.Pool.Xyk{
  address: String.t(),
  decimal_delta: integer(),
  fee: Decimal.t(),
  fin_pair: {Kujira.Fin.Pair, String.t()},
  intervals: [Decimal.t()],
  owner: String.t(),
  price_precision: integer(),
  status: Kujira.Bow.Status.t(),
  token_base: Kujira.Token.t(),
  token_lp: Kujira.Token.t(),
  token_quote: Kujira.Token.t()


Link to this function

from_config(channel, address, arg3)

@spec from_config(GRPC.Channel.t(), String.t(), map()) ::
  {:error, GRPC.RPCError.t()} | {:error, :invalid_config} | {:ok, t()}