Omniscia Euler Finance Audit

Borrowing Static Analysis Findings

Borrowing Static Analysis Findings

BGN-01S: Multiple Top-Level Declarations

TypeSeverityLocation
Code StyleBorrowing.sol:L16, L23

Description:

The referenced file contains multiple top-level declarations that decrease the legibility of the codebase.

Example:

src/EVault/modules/Borrowing.sol
15/// @notice Definition of callback method that flashLoan will invoke on your contract
16interface IFlashLoan {
17 function onFlashLoan(bytes memory data) external;
18}
19
20/// @title BorrowingModule
21/// @author Euler Labs (https://www.eulerlabs.com/)
22/// @notice An EVault module handling borrowing and repaying of vault assets
23abstract contract BorrowingModule is IBorrowing, Base, AssetTransfers, BalanceUtils, LiquidityUtils {

Recommendation:

We advise all highlighted top-level declarations to be split into their respective code files, avoiding unnecessary imports as well as increasing the legibility of the codebase.

Alleviation (fb2dd77a6ff9b7f710edb48e7eb5437e0db4fc1a):

The IFlashLoan interface has been relocated to its dedicated IFlashLoan.sol file and is correspondingly imported, addressing this exhibit.