Closed code423n4 closed 2 years ago
EVM is a stack machine with 256 bits (32 bytes) for each stack. Using unnecessary information that has size more than 32 bytes requires more than one stacks for storing, therefore using more gas unnecessarily.
Use a string that not bigger than 32 bytes or consider using custom errors instead if the contract uses solidity version 0.8.4 or above.
Requires have been changed to custom errors in lifinance/lifi-contracts@f35ed79a266a69b363d72332b7861d15d18b98cb
Duplicate of #100
Warden submitted multiple QA report #149
Using String Bigger Than bytes32
Description
EVM is a stack machine with 256 bits (32 bytes) for each stack. Using unnecessary information that has size more than 32 bytes requires more than one stacks for storing, therefore using more gas unnecessarily.
Permalinks
Mitigation
Use a string that not bigger than 32 bytes or consider using custom errors instead if the contract uses solidity version 0.8.4 or above.