Closed code423n4 closed 2 years ago
defsec
The contract has an unnecessary ==true comparison in its require statement. Since require already checks if the condition is true, there is no need for it to be compared.
https://github.com/code-423n4/2022-01-insure/blob/19d1a7819fe7ce795e6d4814e7ddf8b8e1323df3/contracts/PoolTemplate.sol#L612 https://github.com/code-423n4/2022-01-insure/blob/19d1a7819fe7ce795e6d4814e7ddf8b8e1323df3/contracts/Factory.sol#L122 https://github.com/code-423n4/2022-01-insure/blob/19d1a7819fe7ce795e6d4814e7ddf8b8e1323df3/contracts/Factory.sol#L142 https://github.com/code-423n4/2022-01-insure/blob/19d1a7819fe7ce795e6d4814e7ddf8b8e1323df3/contracts/Factory.sol#L166
Code Review
Removing == true saves a tiny amount of gas.
https://github.com/code-423n4/2022-01-insure-findings/issues/194
Handle
defsec
Vulnerability details
Impact
The contract has an unnecessary ==true comparison in its require statement. Since require already checks if the condition is true, there is no need for it to be compared.
Proof of Concept
Tools Used
Code Review
Recommended Mitigation Steps
Removing == true saves a tiny amount of gas.