Kujira.Ghost.Vault.Status (kujira v0.1.80)

The current deposit and borrow totals

Fields

  • :deposited - The amount of deposit_token deposited

  • :borrowed - The amount of the Vault deposit_token lent out

  • :rate - The current interest rate charged on lent tokens

  • :deposit_ratio - The ratio between deposit_token and receipt_token

  • :debt_ratio - The ratiop between the debt_token and the amount of deposit_token owed by the borrowing Market

Summary

Types

The direction of the adjustment to the Vault Status: user deposit, user withdrawal, market borrow, market repay

t()

Functions

Returns all adjustments to the Vault.Status contained in a tx_response

Types

Link to this type

adjustment()

@type adjustment() :: :deposit | :withdrawal | :borrow | :repay

The direction of the adjustment to the Vault Status: user deposit, user withdrawal, market borrow, market repay

@type t() :: %Kujira.Ghost.Vault.Status{
  borrowed: integer(),
  debt_ratio: Decimal.t(),
  deposit_ratio: Decimal.t(),
  deposited: integer(),
  rate: Decimal.t()
}

Functions

Link to this function

from_query(map)

@spec from_query(map()) :: :error | {:ok, t()}
Link to this function

from_tx_response(response)

@spec from_tx_response(Cosmos.Base.Abci.V1beta1.TxResponse.t()) ::
  [{{Kujira.Ghost.Vault, String.t()}, adjustment(), integer()}] | nil

Returns all adjustments to the Vault.Status contained in a tx_response