Omniscia Tren Finance Audit

BorrowerOperations Code Style Findings

BorrowerOperations Code Style Findings

BOS-01C: Improper Usage of Low-Level Status

Description:

The BorrowerOperations contract, in contrast to other contracts in the system, will utilize the Tren box status represented as a uint256 to evaluate whether it is active instead of invoking the TrenBoxManager::isTrenBoxActive function.

Example:

contracts/BorrowerOperations.sol
74uint256 status = ITrenBoxManager(trenBoxManager).getTrenBoxStatus(vars.asset, msg.sender);
75if (status == 1) {
76 revert BorrowerOperations__TrenBoxIsActive();
77}

Recommendation:

We advise the TrenBoxManager::isTrenBoxActive function to be invoked, optimizing the legibility of the codebase.

Alleviation (f6f1ad0b8f24a96ade345db1dd05a1878eb0f761):

The code properly invokes the TrenBoxManager::isTrenBoxActive function in the latest iteration addressing this exhibit.