Event Queue listeners
OB listeners
Subscriptions
zo market infos
map asset index to asset key
map market index to market key
gets market type
Called by the keepers to update the borrow and supply multipliers.
The inclusive start index of the collateral array.
The exclusive end index of the collateral array.
Called by the keepers regularly to cache the oracle prices.
Only used for testing purposes. An array of user-set prices.
Get the index of the collateral in the State's collaterals list using the mint public key.
The mint's public key.
Gets the funding info object for a given market. Funding will be undefined in the first minute of the hour. Make sure to handle that case!
Get the index of a market in the State's PerpMarkets list using the market symbol.
The market symbol. Ex:("BTC-PERP")
Get the vault public key and the CollateralInfo object for a collateral using the mint public key.
The mint's public key.
The vault public key and the CollateralInfo object.
Get the ZoMarket DEX accounts for a market using the market object ( { dexMarket: ZoMarket; bids: Orderbook; asks: Orderbook } )
Load all assets
Load all market infos
Load all ZoMarket DEX Accounts
use a backup confirmed
listener
minimum time difference between state updates, to prevent constant reloads
minimum time difference between cache updates, to prevent constant reloads
Called by the keepers every hour to update the funding on each market.
The market symbol. Ex:("BTC-PERP")
computes supply and borrow apys
Gets the state signer's pda account and bump.
An array consisting of the state signer pda and bump.
Generated using TypeDoc
The state account defines program-level parameters, and tracks listed markets and supported collaterals.