Kujira.Usk.Market (kujira v0.1.51)

A USK market taked deposits of collateral_token, and allows minting of USK, up to the maximum LTV as quoted by the oracle denoms

Fields

  • :address - The address of the market

  • :owner - The owner of the market

  • :stable_token - The token that is minted

  • :stable_token_admin - The admin address of the stable_token

  • :orca_queue - The address of the Orca Queue that is used to liquidate the collateral token

  • :collateral_token - The token used to back the loan

  • :collateral_oracle_denom - The denom string that is used to price the collateral token

  • :max_ltv - MAximum loan-to-value ratio of a position

  • :full_liquidation_threshold - The value of collateral (as priced by collateral oracle, 6dp), below which a position is 100% liquidated

  • :liquidation_ratio - The amount of a position liquidated when a position is partially liquidated

  • :mint_fee - The amount of the borrowed asset retained as a fee when borrow amount is increased

  • :interest_rate - The interest rate charged. Charged on the amount minted, paid in the collateral_token

  • :max_debt - Tha maximum amount of stable_token

Summary

Types

@type t() :: %Kujira.Usk.Market{
  address: String.t(),
  collateral_oracle_denom: String.t(),
  collateral_token: Kujira.Token.t(),
  full_liquidation_threshold: integer(),
  interest_rate: Decimal.t(),
  liquidation_ratio: Decimal.t(),
  max_debt: non_neg_integer(),
  max_ltv: Decimal.t(),
  mint_fee: Decimal.t(),
  orca_queue: {Kujira.Orca.Queue, String.t()},
  owner: String.t(),
  stable_token: Kujira.Token.t(),
  stable_token_admin: String.t(),
  status: :not_loaded | Kujira.Usk.Market.Status.t()
}

Functions

Link to this function

from_config(channel, address, map)

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