Token Registry
StrategyProxyFactory contract.#
The TokenRegistry is used to register Estimators for each DeFi protocol and register tokens to use a specific Estimator for estimating it's value. If a token is unregistered it will use the default estimator. This contract is owned by the StrategyProxyFactory so that it may register new strategies when they are created. All other token registrations can be done using wrapper functions in the#
Add EstimatorThe addEstimator()
function registers an Estimator address and maps it to the index of an EstimatorCategory
enum
.
#
Add ItemThe addItem()
function registers a token address and maps it with the index of an EstimatorCategory
enum
and the index of an ItemCategory
enum
.
#
EstimatorCategoryThe EstimatorCategory
type is an enum
that is used to determine what Estimator to use for a token.
#
ItemCategoryThe ItemCategory
type is an enum
that is used to categorize the main token types recognized by a Strategy: Basic, Synth, Debt, and Reserve