Closed sherlock-admin closed 11 months ago
Invalid, all the above mentioned functions are permissioned admin functions, so this would constitute admin input error not accepted based on sherlock rules since admin are trusted to input appropriate inputs.
SAAJ
medium
No check for empty array can result in unexpected outcome
Summary
Functions that have array parameters does not have check to avoid passing empty array arguments which can lead to failure of operations or others unexpected outcome.
Vulnerability Detail
No check for empty array can result in unexpected outcome
Impact
Transactions can be processed without any data inside when empty array will be passed inside functions
_updateAssetPriceFeeds
,updateAssetMovingAverage
and_updateAssetMovingAverage
that will result in certain unexpected behaviour like operation failure.Code Snippet
https://github.com/sherlock-audit/2023-11-olympus/blob/main/bophades/src/modules/PRICE/OlympusPrice.v2.sol#L455 https://github.com/sherlock-audit/2023-11-olympus/blob/main/bophades/src/modules/PRICE/OlympusPrice.v2.sol#L611 https://github.com/sherlock-audit/2023-11-olympus/blob/main/bophades/src/modules/PRICE/OlympusPrice.v2.sol#L651
Tool used
Manual Review
Recommendation
The recommendation is made for having require condition that checks empty array is not passed as input to the functions of
_updateAssetPriceFeeds
,updateAssetMovingAverage
and_updateAssetMovingAverage
.