Skip to main content

Entity–relationship model with roles

Entity-relationship model

Contracts

The community multisig controls DEFAULT_ADMIN_ROLE and _TIMELOCK_ROLE (via the OpenZeppelin TimelockController contract). Other roles will be controlled by an ops multisig, EOAs for OpenZeppelin Defender keepers, and external strategists.

BasketManager

Roles Functions Notes
  • The _TIMELOCK_ROLE is critical for setting parameters that affect the protocol’s operation, such as fees and adapters.
  • _BASKET_TOKEN_ROLE is dynamically assigned to basket tokens during their creation, allowing them to call specific functions like proRataRedeem.

BasketToken

Roles Functions Notes
  • The _BASKET_MANAGER role is only given to the BasketManager contract at the BasketToken creation, ensuring only the BasketManager contract can call critical functions during the rebalance cycle.
  • The contract uses a fallback mechanism for failed redemptions, which is triggered by the BasketManager.

FeeCollector

Roles Functions Notes
  • The _BASKET_TOKEN_ROLE is dynamically assigned by the BasketManager to basket tokens, allowing them to notify fees.
  • Only the protocol treasury or admin can claim treasury fees.

AssetRegistry

Roles Functions Notes
  • The _MANAGER_ROLE is critical for adding and managing assets in the registry.
  • The contract uses a bit flag system to represent enabled assets, which is updated dynamically based on asset status.

StrategyRegistry

Roles Functions Notes
  • The _WEIGHT_STRATEGY_ROLE is used to validate weight strategies before calling their supportsBitFlag function.

ManagedWeightStrategy

Roles Functions Notes
  • The _MANAGER_ROLE is critical for setting target weights, which directly affect the strategy’s behavior.
  • The contract uses a mapping to store target weights for each bit flag.