Omniscia Olympus DAO Audit

BondTeller Static Analysis Findings

BondTeller Static Analysis Findings

BTR-01S: Inexistent Initialization of Member

TypeSeverityLocation
Logical FaultMajorBondTeller.sol:L57

Description:

The policy member of the contract is never initialized.

Example:

contracts/BondTeller.sol
57address public policy;
58
59/* ========== CONSTRUCTOR ========== */
60
61constructor(
62 address _depository,
63 address _staking,
64 address _treasury,
65 address _OHM,
66 address _sOHM,
67 address _gOHM
68) {
69 require(_depository != address(0));
70 depository = _depository;
71 require(_staking != address(0));
72 staking = IStaking(_staking);
73 require(_treasury != address(0));
74 treasury = ITreasury(_treasury);
75 require(_OHM != address(0));
76 OHM = IERC20(_OHM);
77 require(_sOHM != address(0));
78 sOHM = IERC20(_sOHM);
79 require(_gOHM != address(0));
80 gOHM = IgOHM(_gOHM);
81 IERC20(_OHM).approve(_staking, 1e27); // saves gas
82}

Recommendation:

We advise it to be initialized to ensure the setFEReward function can be invoked.

Alleviation:

The policy member has now been removed from the contract, thereby nullifying this exhibit.

BTR-02S: Improper Inheritence

TypeSeverityLocation
Code StyleInformationalBondTeller.sol:L12

Description:

The BondTeller contract complies with the ITeller interface of the codebase yet does not inherit it.

Example:

contracts/BondTeller.sol
12contract BondTeller {

Recommendation:

We advise the contract to properly inherit it ensuring consistency and maintainability across the codebase.

Alleviation:

The contract now properly inherits the ITeller interface.