Omniscia Powercity Audit

MultiTroveGetter Code Style Findings

MultiTroveGetter Code Style Findings

MTG-01C: Variable Mutability Specifiers (Immutable)

TypeSeverityLocation
Gas OptimizationMultiTroveGetter.sol:L22-L23

Description:

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

Example:

MultiTroveGetter.sol
22TroveManager public troveManager; // XXX Troves missing from ITroveManager?
23ISortedTroves public sortedTroves;
24
25constructor(TroveManager _troveManager, ISortedTroves _sortedTroves) public {
26 troveManager = _troveManager;
27 sortedTroves = _sortedTroves;
28}

Recommendation:

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

Alleviation (8bedd3b0df6387957e6b8f5d52507e776c1458b0):

The referenced variables remain suboptimal, rendering this exhibit as acknowledged.