Aggregator Contract
The Aggregator Contract implements the functions required in the Aggregator Interface.
Additionally, it implements state variables for the management of markets across multiple Auctioneers, tracking whitelisted Auctioneers.
The Aggregator contract keeps a unique set of market IDs across multiple Tellers and Auctioneers. Additionally, it aggregates market data from multiple Auctioneers in convenient view functions for front-end interfaces.
Methods
currentCapacity
Returns current capacity of a market
Parameters
Returns
findMarketFor
Returns the market ID with the highest current payoutToken payout for depositing quoteToken
Parameters
Returns
getAuctioneer
Get the auctioneer for the provided market ID
Parameters
Returns
getTeller
Returns the Teller that services the market ID
Parameters
Returns
isInstantSwap
Does market send payout immediately
Parameters
Returns
isLive
Is a given market accepting purchases
Parameters
Returns
liveMarketsBetween
Returns array of active market IDs within a range
Should be used if length exceeds max to query entire array
Parameters
Returns
liveMarketsBy
Returns an array of all active market IDs for a given owner
Parameters
Returns
liveMarketsFor
Returns an array of all active market IDs for a given quote token
Parameters
Returns
marketCounter
Counter for bond markets on approved auctioneers
Returns
marketPrice
Calculate current market price of payout token in quote tokens
Accounts for debt and control variable decay since last deposit (vs _marketPrice())
Parameters
Returns
marketScale
Scale value to use when converting between quote token and payout token amounts with marketPrice()
Parameters
Returns
marketsFor
Returns an array of all active market IDs for a given payout and quote token
Parameters
Returns
marketsForPayout
Market IDs for payout token
Parameters
Returns
marketsForQuote
Market IDs for quote token
Parameters
Returns
marketsToAuctioneers
Auctioneer for Market ID
Parameters
Returns
maxAmountAccepted
Returns maximum amount of quote token accepted by the market
Parameters
Returns
payoutFor
Payout due for amount of quote tokens
Accounts for debt and control variable decay so it is up to date
Parameters
Returns
registerAuctioneer
Register a auctioneer with the aggregatorOnly Guardian
A auctioneer must be registered with an aggregator to create markets
Parameters
registerMarket
Register a new market with the aggregatorOnly registered depositories
Parameters
Returns
Errors
Aggregator_OnlyAuctioneer
Last updated