All the external/public functions of Pools.sol can be called by other contracts even before Pools.solcontract is initialized. This can lead to exceptions, state corruption or incorrect accounting in other contracts, which may require redeployment of said contract.
Recommend using a factory pattern that will deploy and initialize atomically to prevent front-running of the initialization,
OR
Given that contracts are not using delegatecall proxy pattern, it is not required to use a separate init() function to initialize parameters when the same can be done in a constructor. If the reason for doing so is to get the deployment addresses of the various contracts, which may not all be available at the same time, then consider rearchitecting to create a globals contract which can hold all the globally required addresses of various contracts. see Maple protocols for example.
OR
Prevent external/public functions from being called until after initialization is done by checking initialization state tracked by the inited variable.
strictly-scarce (vader) dipsuted:
dmvt (judge) commented:
