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
FundManagerproxies. - Each FundManager owns eight factories — one per fund component (Fund, FundShare, DepositQueue, RedeemQueue, Oracle, FeeManager, RiskManager, Strategy).
- StandaloneStrategyDeployer owns one factory for standalone strategies.
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)
EveryTransparentUpgradeableProxy 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’sproxyAdmincontrol of all its fund proxies).