Closed code423n4 closed 2 years ago
Consider using optimized for-loop and apply the following optimizations:
Affected code:
Replacing "_msgSender()" to "msg.sender" will save gas.
Splitting && conditions into several require statements saves gas.
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.
Clone of #51
Invalidated as it's unchecked automated results
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