Closed code423n4 closed 2 years ago
Duplicated of #2 at For loop optimizaion
Duplicated of #2 at For loop optimizaion
Duplicated of #2 at For loop optimizaion
Duplicated of #2 at For loop optimizaion
https://github.com/code-423n4/2022-06-nested-findings/issues/29#issuecomment-1165702145
msgSender() should be used for intermediate, library-like contracts. That is why it is used in the NestedFactory.
Already surfaced in previous audits.
Appears to be a double submit by the warden with #52. Invalidating this one, keeping 52
Impact
Consider using optimized for-loop and apply the following optimizations:
Affected code:
Proof of Concept
Tools Used
Recommended Mitigation Steps
Impact
Replacing "_msgSender()" to "msg.sender" will save gas.
Affected code:
Proof of Concept
Tools Used
Recommended Mitigation Steps
Impact
Splitting && conditions into several require statements saves gas.
Affected code:
Proof of Concept
Tools Used
Recommended Mitigation Steps
Impact
As per 0.8.4 solidity version it supports new custom errors. Custom errors are reducing 38 gas if condition is met and 22 gas otherwise. Also reduces contract size and deployment costs.
Affected code:
Proof of Concept
Tools Used
Recommended Mitigation Steps