Omniscia Teahouse Finance Audit

AssetOracle Static Analysis Findings

AssetOracle Static Analysis Findings

AOE-01S: Data Location Optimization

Description:

The linked input argument is set as memory in an external function.

Example:

contracts/oracle/AssetOracle.sol
58function enableOracle(address _asset, IUniswapV3Pool[] calldata _pools, uint32[] memory _twapIntervals) external onlyOwner {

Recommendation:

We advise it to be set as calldata optimizing its read-access gas cost.

Alleviation (302b96f324a88038a0872015466cd43783c14543):

The _twapIntervals input argument of the AssetOracle::enableOracle function has been properly set to calldata, optimizing its read-access gas cost.