Omniscia vfat Audit
LendingStructs Static Analysis Findings
LendingStructs Static Analysis Findings
LSS-01S: Multiple Top-Level Declarations
Type | Severity | Location |
---|---|---|
Code Style | ![]() | LendingStructs.sol:L6, L14 |
Description:
The referenced file contains multiple top-level declarations that decrease the legibility of the codebase.
Example:
contracts/strategies/lending/LendingStructs.sol
6library LendingStrategyFees {7 bytes4 constant Deposit = bytes4(keccak256("LendingStrategyDepositFee"));8 bytes4 constant Withdraw = bytes4(keccak256("LendingStrategyWithdrawFee"));9 bytes4 constant Harvest = bytes4(keccak256("LendingStrategyHarvestFee"));10 bytes4 constant Compound = bytes4(keccak256("LendingStrategyCompoundFee"));11 bytes4 constant Flashloan = bytes4(keccak256("LendingStrategyFlashloanFee"));12}13
14contract LendingStructs {
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 (6ab7af3bb495b817ffec469255ea679b1813eecb):
The vfat team evaluated this exhibit but opted to acknowledge it in the current iteration of the codebase.