Kujira.Usk.Margin (kujira v0.1.47)

A margin contract for USK "wraps" the basic Market contract, allowing minted USK to purchase collateral from FIN, before posting it as collateral to a regular position. It also allows a position holder to take profits by minting more USK against an appreciating collateral asset, or repaying some of the USK debt to cover a falling collateral price

Fields

  • :fin_pair - The FIN pair that is used to buy and sell collateral

  • :market - The underlying config of the USK CDP market

Summary

Types

@type t() :: %Kujira.Usk.Margin{
  fin_pair: {Kujira.Fin.Pair, String.t()},
  market: Kujira.Usk.Market.t()
}

Functions

Link to this function

from_config(channel, address, map)

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