Omniscia KlimaDAO Audit
KlimaTreasury Code Style Findings
KlimaTreasury Code Style Findings
KTY-01C: Variable Mutability Specifiers
Type | Severity | Location |
---|---|---|
Gas Optimization | Informational | KlimaTreasury.sol:L427, L428 |
Description:
The linked variables are assigned to only once during the contract's constructor
.
Example:
contracts/utils/KlimaTreasury.sol
475constructor (476 address _KLIMA,477 address _BCT,478 uint _blocksNeededForQueue479) {480 require( _KLIMA != address(0) );481 KLIMA = _KLIMA;482
483 isReserveToken[ _BCT ] = true;484 reserveTokens.push( _BCT );485
486 blocksNeededForQueue = _blocksNeededForQueue;487}
Recommendation:
We advise them to be set as immutable
greatly optimizing the codebase.
Alleviation:
The KlimaDAO team considered this exhibit but opted to retain the codebase in its current state.