Closed code423n4 closed 2 years ago
Jujic
A variable is being assigned its default value which is unnecessary. Removing the assignment will save gas when deploying.
ownerSplit = 0;
https://github.com/code-423n4/2021-12-defiprotocol/blob/205d3766044171e325df6a8bf2e79b37856eece1/contracts/contracts/Factory.sol#L22
Remix
Remove the assignment.
Duplicate of #45
Handle
Jujic
Vulnerability details
Impact
A variable is being assigned its default value which is unnecessary. Removing the assignment will save gas when deploying.
Proof of Concept
https://github.com/code-423n4/2021-12-defiprotocol/blob/205d3766044171e325df6a8bf2e79b37856eece1/contracts/contracts/Factory.sol#L22
Tools Used
Remix
Recommended Mitigation Steps
Remove the assignment.