Kujira.Bow.Leverage.Position (kujira v0.1.57)
An item representing the collateral deposit vs debt position of a particular address for a particular market
Fields
:idx- Position ID:holder- The address that owns the position:debt_shares_base- The amount of the base debt token borrowed by this position:debt_amount_base- The resultant amount of debt owed, based on thedebt_ratio:debt_shares_quote- The amount of the quote debt token borrowed by this position:debt_amount_quote- The resultant amount of debt owed, quoted on thedebt_ratio:lp_amount- The total LP token collateral owned by the position:collateral_amount_base- The base amount that the current LP token is worth:collateral_amount_quote- The quote amount that the current LP token is worth
Summary
Functions
Returns the liquidation price of the position
Types
Functions
from_query(vault1, vault2, status, arg4)
@spec from_query( Kujira.Ghost.Vault.t(), Kujira.Ghost.Vault.t(), Kujira.Bow.Status.t(), map() ) :: :error | {:ok, t()}
liquidation_price(leverage, position)
Returns the liquidation price of the position