Kujira.Ghost.Position (kujira v0.1.23)
An item representing the collateral deposit vs debt position of a particular address for a particular market
Fields
:market
- The market where the position is held:holder
- The address that owns the position:collateral_amount
- The amount of collateral_token that has been deposited:debt_shares
- The amount of debt_token minted and owned by this position:debt_amount
- The resultant amount of debt owed, based on thedebt_ratio
Summary
Types
The direction of the adjustment to the Position: collateral deposit, collateral withdrawal, debt borrow, debt repay
Functions
Returns all adjustments to positions found in the tx response
Types
adjustment()
@type adjustment() :: :deposit | :withdrawal | :borrow | :repay
The direction of the adjustment to the Position: collateral deposit, collateral withdrawal, debt borrow, debt repay
TODO: Add :liquidation
Functions
from_query(market, vault, arg3)
@spec from_query(Kujira.Ghost.Market.t(), Kujira.Ghost.Vault.t(), map()) :: :error | {:ok, t()}
from_tx_response(response)
@spec from_tx_response(Cosmos.Base.Abci.V1beta1.TxResponse.t()) :: [{{Kujira.Ghost.Market, String.t()}, String.t(), adjustment()}] | nil
Returns all adjustments to positions found in the tx response