Omniscia 0xPhase Audit
CashOracle Code Style Findings
CashOracle Code Style Findings
COE-01C: Variable Mutability Specifiers (Immutable)
Type | Severity | Location |
---|---|---|
Gas Optimization | CashOracle.sol:L14-L15 |
Description:
The linked variables are assigned to only once during the contract's constructor
.
Example:
oracle/oracles/cash/CashOracle.sol
10IPegToken public cash;11IBond public bond;12
13constructor(IPegToken cash_, IBond bond_) {14 cash = cash_;15 bond = bond_;16}
Recommendation:
We advise them to be set as immutable
greatly optimizing their read-access gas cost.
Alleviation (3dd3d7bf0c2693b2f9c23bacedfa420393f7ea84):
Both referenced variables have been set as immutable
per our recommendation, greatly optimizing their read-access gas cost.