Omniscia rain protocol Audit
RedeemableERC20 Static Analysis Findings
RedeemableERC20 Static Analysis Findings
RER-01S: Data Location Optimization
Type | Severity | Location |
---|---|---|
Gas Optimization | RedeemableERC20.sol:L263, L280 |
Description:
The linked function arguments are set as memory
in external
functions and function chains.
Example:
contracts/redeemableERC20/RedeemableERC20.sol
280function redeem(IERC20[] memory treasuryAssets_, uint256 redeemAmount_)281 external
Recommendation:
We advise them to be set as calldata
optimizing their gas cost and enforcing immutability on the input arguments.
Alleviation:
The finding was partially alleviated as only the latter of the two linked instances were set as calldata
.