Kujira.Ghost.Market (kujira v0.1.80)
A Ghost market takes deposits of collateral_token, and allows borrowing of the vault.deposit_token, up to the maximum LTV as quoted by the oracle denoms
Fields
:address
- The address of the market:owner
- The owner of the market:vault
- The address of Vault that the Market draws from: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:partial_liquidation_target
- The target LTV when a position is partially liquidated:borrow_fee
- The amount of the borrowed asset retained as a fee when borrow amount is increased
Summary
Types
@type t() :: %Kujira.Ghost.Market{ address: String.t(), borrow_fee: Decimal.t(), collateral_oracle_denom: String.t(), collateral_token: Kujira.Token.t(), full_liquidation_threshold: integer(), max_ltv: Decimal.t(), orca_queue: {Kujira.Orca.Queue, String.t()}, owner: String.t(), partial_liquidation_target: Decimal.t(), status: :not_loaded | Kujira.Ghost.Market.Status.t(), vault: {Kujira.Ghost.Vault, String.t()} }
Functions
from_config(channel, address, map)
@spec from_config(GRPC.Channel.t(), String.t(), map()) :: {:ok, t()} | :error