Kujira.Bow.Pool.Xyk (kujira v0.1.80)
A instance of the BOW XYK Market Making strategy.
Fields
: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
Summary
Functions
Returns the next order placed by the pool for a given set of intervals
Returns the orders placed by the pool for a given set of intervals
Returns the ratio of deposits that are deployed into the pool for a given interval configuration
Types
@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() }
Functions
compute_order(p, i, atom)
@spec compute_order(t(), Decimal.t(), :bid | :ask) :: {t(), {:bid | :ask, Decimal.t(), non_neg_integer()}}
Returns the next order placed by the pool for a given set of intervals
compute_orders(p)
@spec compute_orders(t()) :: [{:bid | :ask, Decimal.t(), non_neg_integer()}]
Returns the orders placed by the pool for a given set of intervals
from_config(channel, address, arg3)
@spec from_config(GRPC.Channel.t(), String.t(), map()) :: {:error, GRPC.RPCError.t()} | {:error, :invalid_config} | {:ok, t()}
utilization(xyk)
Returns the ratio of deposits that are deployed into the pool for a given interval configuration