Open code423n4 opened 2 years ago
Create market is successfully done in the test. For all Pool/Index/CDSTemplates, two ways of deployment process is taken.
Simply, deploy This way, constructor set initialized to true. initialize() cannot be executed and this is ok since this contract is used as original of future clones.
deploy from Factory.sol This creates a contract that delegate-calls to the Pool/Index/CDSTemplate. From the test, you can see initialize() is executed successfully since the created contracts can only have the default value of the type (bool's default is false)
Lowering to non-critical as this could me made much clearer with some comments and can be thought of as a code clarity issue.
Handle
danb
Vulnerability details
https://github.com/code-423n4/2022-01-insure/blob/main/contracts/PoolTemplate.sol#L157
initialize requires
initialize
to be false, but it's set in the constructor to true.