Omniscia 0xPhase Audit

FixedOracle Manual Review Findings

FixedOracle Manual Review Findings

FOE-01M: Improper Implementation of Oracle

TypeSeverityLocation
Centralization ConcernFixedOracle.sol:L16, L21-L25

Description:

The FixedOracle implementation itself should solely be utilized in a development context as it will yield a manually-set price for the assets it is queried for.

Example:

oracle/oracles/fixed/FixedOracle.sol
10contract FixedOracle is Ownable, Multicall, IFixedOracle {
11 mapping(address => uint256) internal _price;
12
13 /// @inheritdoc IFixedOracle
14 /// @custom:protected onlyOwner
15 function setPrice(address asset, uint256 price) external override onlyOwner {
16 _price[asset] = price;
17 emit PriceSet(asset, price);
18 }
19
20 /// @inheritdoc IOracle
21 function getPrice(
22 address asset
23 ) external view override returns (uint256 price) {
24 return _price[asset];
25 }
26}

Recommendation:

We advise it to be relocated to the test files of the project as it is an implementation that should not be deployed in production.

Alleviation (3dd3d7bf0c2693b2f9c23bacedfa420393f7ea84):

The contract was relocated to a misc folder of the codebase, indicating that its purpose is usage within a development context rather than a production context and thus alleviating this exhibit.