Kujira.Orca.Queue (kujira v0.1.80)
An individual Orca Liquidation Queue
Fields
:address- The contract address:owner- The account authorized to make changes to contract config:collateral_token- The token that is being liquidated:bid_token- The token that is used to buy the collateral:bid_pools- The aggregate amounts of bids at each supported discount amount. The contract confug containsmax_slotandpremium_rate_per_slot, which define these pools:activation_threshold- The total amount of bids, above which the activation_delay must pass before a bid can be activated. This isbid_thresholdon the contract interfaace:activation_delay- The time in seconds that must pass before a bid can be activated. This iswaiting_periodon the contract interface
Summary
Functions
Assigns the current state to the bd_pools from a direct contract query response
Enumerates all bid pools based on contract config
Types
@type t() :: %Kujira.Orca.Queue{ activation_delay: integer(), activation_threshold: integer(), address: String.t(), bid_pools: [Kujira.Orca.Pool.t()], bid_token: Kujira.Token.t(), collateral_token: Kujira.Token.t(), liquidation_fee: Decimal.t(), owner: String.t(), withdrawal_fee: Decimal.t() }
Functions
from_config(channel, address, map)
@spec from_config(GRPC.Channel.t(), String.t(), map()) :: {:ok, t()} | :error
load_pools(pools, queue)
Assigns the current state to the bd_pools from a direct contract query response
populate_pools(queue, max_slot, premium_rate_per_slot)
Enumerates all bid pools based on contract config