Omniscia Vendor Finance Audit
VendorOracle Code Style Findings
VendorOracle Code Style Findings
VOE-01C: Variable Mutability Specifiers (Immutable)
Type | Severity | Location |
---|---|---|
Gas Optimization | VendorOracle.sol:L19, L21 |
Description:
The linked variables are assigned to only once during the contract's constructor
.
Example:
contracts/VendorOracle.sol
31constructor(32 address _registry,33 address _NativeAddress,34 address _wNativeAddress35) {36 registry = FeedRegistryInterface(_registry);37 NATIVE = _NativeAddress;38 pegs[_wNativeAddress] = _NativeAddress;39}
Recommendation:
We advise them to be set as immutable
greatly optimizing their read-access gas cost.
Alleviation:
Both referenced variables have been properly set as immutable
greatly optimizing the code's gas cost.