Omniscia Steadefi Audit

JoeOracle Code Style Findings

JoeOracle Code Style Findings

JOE-01C: Variable Mutability Specifiers (Immutable)

TypeSeverityLocation
Gas OptimizationJoeOracle.sol:L20-L22

Description:

The linked variables are assigned to only once during the contract's constructor.

Example:

contracts/oracles/JoeOracle.sol
19constructor(address _factory, address _router, address _chainlinkOracle) {
20 factory = _factory;
21 router = _router;
22 chainlinkOracle = _chainlinkOracle;
23}

Recommendation:

We advise them to be set as immutable greatly optimizing their read-access gas cost.

Alleviation (4325253d6de0ea91c1e9fb9e01d2e7e98f3d83a9):

All variables have been set as immutable per our recommendation, greatly reducing their read-access gas cost.