Omniscia Sovryn Audit
Masset Code Style Findings
Masset Code Style Findings
MAS-01C: Redundant Dynamic Value
Type | Severity | Location |
---|---|---|
Gas Optimization | Informational | Masset.sol:L61 |
Description:
The keccak256
operation performed in Masset
will always yield the same result.
Example:
contracts/masset/Masset.sol
59function registerAsERC777Recipient() internal {60 IERC1820Registry ERC1820 = IERC1820Registry(0x1820a4B7618BdE71Dce8cdc73aAB6C95905faD24);61 ERC1820.setInterfaceImplementer(address(this), keccak256("ERC777TokensRecipient"), address(this));62}
Recommendation:
We advise its result to be stored to a contract-level constant
variable thus reducing the gas cost of the function significantly.
Alleviation:
The development team has acknowledged this exhibit but decided to not apply its remediation in the current version of the codebase.