Before the constructor code is executed, state variables are initialised to their specified value if you initialise them inline, or their default value if you do not.
Setting ownerSplit to 0 in the constructor is redundant.
Removing ownerSplit = 0; can make the code simpler and save some gas.
Handle
WatchPug
Vulnerability details
As per the Solidity documenation:
Setting
ownerSplit
to0
in the constructor is redundant.Removing
ownerSplit = 0;
can make the code simpler and save some gas.https://github.com/code-423n4/2021-10-defiprotocol/blob/7ca848f2779e2e64ed0b4756c02f0137ecd73e50/contracts/contracts/Factory.sol#L18-L22
Recommendation
Remove the redundant code.