Omniscia Olympus DAO Audit

OlympusERC20 Code Style Findings

OlympusERC20 Code Style Findings

OER-01C: Incorrect Function Visibility

TypeSeverityLocation
Code StyleInformationalOlympusERC20.sol:L34

Description:

The _burnFrom function is incorrectly available externally by its public modifier.

Example:

contracts/OlympusERC20.sol
30function burnFrom(address account_, uint256 amount_) public virtual {
31 _burnFrom(account_, amount_);
32}
33
34function _burnFrom(address account_, uint256 amount_) public virtual {
35 uint256 decreasedAllowance_ =
36 allowance(account_, msg.sender).sub(
37 amount_,
38 "ERC20: burn amount exceeds allowance"
39 );
40
41 _approve(account_, msg.sender, decreasedAllowance_);
42 _burn(account_, amount_);
43}

Recommendation:

We advise it to be set to internal to properly illustrate its purpose and avoid potential circumventions of the burnFrom function in the future.

Alleviation:

The visibility specifier of the _burnFrom function was adjusted according to our recommendation.