Omniscia Olympus DAO Audit
StakingDistributor Code Style Findings
StakingDistributor Code Style Findings
SDR-01C: Inexistent Error Messages
Type | Severity | Location |
---|---|---|
Code Style | Informational | StakingDistributor.sol:L48, L50, L52, L133, L144 |
Description:
The linked require
checks contain no descriptive error messages.
Example:
contracts/StakingDistributor.sol
43constructor(44 address _treasury,45 address _ohm,46 address _staking47) {48 require(_treasury != address(0));49 treasury = ITreasury(_treasury);50 require(_ohm != address(0));51 OHM = IERC20(_ohm);52 require(_staking != address(0));53 staking = _staking;54}
Recommendation:
We advise them to be set so to aid in the debugging of the application and to also enable more accurate validation of the require
condition purposes.
Alleviation:
Error messages were introduced in all linked require
checks.
SDR-02C: Inexistent Variable Visibility Specifiers
Type | Severity | Location |
---|---|---|
Code Style | Informational | StakingDistributor.sol:L21, L22, L23 |
Description:
The linked variables have no visibility specifier explicitly set.
Example:
contracts/StakingDistributor.sol
21IERC20 immutable OHM;22ITreasury immutable treasury;23address immutable staking;
Recommendation:
We advise one to be set so to avoid potential compilation discrepancies in the future as the current compiler behaviour is to assign a specifier automatically.
Alleviation:
Proper visibility specifiers were set for all linked variables.