Skip to main content
Source: src/Factory.sol

Responsibility

Factory is a generic proxy factory + registry, reused for every entity type in the system. Each factory instance is configured with one implementation address and stamps out TransparentUpgradeableProxy instances of it, while recording every proxy it created (isEntity). Where factories appear:
  • FundManagerDeployer owns one factory that creates FundManager proxies.
  • Each FundManager owns eight factories — one per fund component (Fund, FundShare, DepositQueue, RedeemQueue, Oracle, FeeManager, RiskManager, Strategy).
  • StandaloneStrategyDeployer owns one factory for standalone strategies.
The registry matters for trust decisions: e.g. FundManager.createStrategyForFund uses fundFactory.isEntity(caller) to verify the caller is a genuine fund it deployed. isEntity only means “this factory deployed it”; upgrading existing proxies is done through their ProxyAdmins, not the factory.

Proxy admin model (OZ v5)

Every TransparentUpgradeableProxy auto-deploys its own ProxyAdmin contract, owned by the address passed at creation. Upgrades go through that ProxyAdmin. The system computes ProxyAdmin addresses deterministically (CREATE, nonce 1) where it needs them.
  • create(initData) — ProxyAdmin owner = the factory’s owner.
  • createFor(initData, proxyAdminOwner) — ProxyAdmin owner = an explicit address (used by FundManager to give each tenant’s proxyAdmin control of all its fund proxies).

Function reference

FundManager · FundManagerDeployer