Omniscia Gamma Strategies Audit

BaseController Code Style Findings

BaseController Code Style Findings

BCR-01C: Redundant Interface Usage

TypeSeverityLocation
Code StyleBaseController.sol:L4, L9, L16

Description:

The linked interface usages are redundant as none of the members in IAddressRegistry are utilized.

Example:

contracts/adapters/tokemak/BaseController.sol
1//SPDX-License-Identifier: MIT
2pragma solidity >=0.6.11 <=0.6.12;
3
4interface IAddressRegistry { }
5
6contract BaseController {
7
8 address public immutable manager;
9 IAddressRegistry public immutable addressRegistry;
10
11 constructor(address _manager, address _addressRegistry) public {
12 require(_manager != address(0), "INVALID_ADDRESS");
13 require(_addressRegistry != address(0), "INVALID_ADDRESS");
14
15 manager = _manager;
16 addressRegistry = IAddressRegistry(_addressRegistry);
17 }
18
19 modifier onlyManager() {
20 require(msg.sender == manager, "NOT_MANAGER_ADDRESS");
21 _;
22 }
23}

Recommendation:

We advise a simple address to be utilized instead. If storage compatibility with a contract implementation that uses an actual interface is expected, this is already satisfied by an address as the interface only affects the value when it is used for external calls.

Alleviation:

The Gamma Strategies team considered this exhibit but opted not to apply a remediation for it in the current iteration of the codebase.