Omniscia Bonq Audit
community-liquidation-pool Code Style Findings
community-liquidation-pool Code Style Findings
COM-01C: Variable Mutability Specifiers (Immutable)
Type | Severity | Location |
---|---|---|
Gas Optimization | community-liquidation-pool.sol:L12, L16 |
Description:
The linked variables are assigned to only once during the contract's constructor
.
Example:
contracts/community-liquidation-pool.sol
18// solhint-disable-next-line func-visibility19constructor(address _factory, address _token) {20 factory = ITroveFactory(_factory);21 collateralToken = IERC20(_token);22}
Recommendation:
We advise them to be set as immutable
greatly optimizing their read-access gas cost.
Alleviation:
The Bonq Protocol team has marked the factory
and collateralToken
variables as immutable
.