Omniscia KlimaDAO Audit

KlimaStakingDistributor_v4 Static Analysis Findings

KlimaStakingDistributor_v4 Static Analysis Findings

KSD-01S: Undocumented Value Literal

TypeSeverityLocation
Code StyleInformationalKlimaStakingDistributor_v4.sol:L438

Description:

The value literal 1000000 is meant to be used as the rate divisor for a particular reward distribution, however, it is undocumented and unclearly depicted.

Example:

contracts/staking/regular/KlimaStakingDistributor_v4.sol
438return IERC20( KLIMA ).totalSupply().mul( _rate ).div( 1000000 );

Recommendation:

We advise the special underscore (_) separator to be applied to it (i.e. 1000000 would become 1_000_000) and we advise the value to be set to a contract-level constant as it will be useful for other exhibits and general logic checks of the codebase.

Alleviation:

The KlimaDAO team considered this exhibit but opted to retain the codebase in its current state.