Omniscia Olympus DAO Audit
StakingDistributor Static Analysis Findings
StakingDistributor Static Analysis Findings
SDR-01S: Improper Inheritence
Type | Severity | Location |
---|---|---|
Code Style | Informational | StakingDistributor.sol:L12 |
Description:
The Distributor
contract complies with the IDistributor
interface of the codebase yet does not inherit it.
Example:
13contract Distributor is Governable, Guardable {
Recommendation:
We advise the contract to properly inherit it ensuring consistency and maintainability across the codebase.
Alleviation:
The contract now properly inherits the IDistributor
interface.
SDR-02S: Undocumented Value Literal
Type | Severity | Location |
---|---|---|
Code Style | Informational | StakingDistributor.sol:L107 |
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:
107return OHM.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 numeric literal was relocated to a contract-level immutable
declaration thereby alleviating this exhibit.