Long Revert Strings #140
Labels
bug
Something isn't working
duplicate
This issue or pull request already exists
G (Gas Optimization)
Handle
gzeon
Vulnerability details
Impact
Shortening revert strings to fit in 32 bytes will decrease deployment time gas and will decrease runtime gas when the revert condition has been met.
Revert strings that are longer than 32 bytes require at least one additional mstore, along with additional overhead for computing memory offset, etc.
Proof of Concept
Showing one of the many revert string that is > 32 bytes in the codebase
https://github.com/code-423n4/2021-11-nested/blob/f646002b692ca5fa3631acfff87dda897541cf41/contracts/operators/ZeroEx/ZeroExOperator.sol#L38
Recommended Mitigation Steps
Use custom error as you are using solidity 0.8.4; or
Shorten the revert string
Reference
code-423n4/2021-10-tempus-findings#28
The text was updated successfully, but these errors were encountered: