Omniscia Mitosis Audit

VaultHub Code Style Findings

VaultHub Code Style Findings

VHB-01C: Generic Typographic Mistake

TypeSeverityLocation
Code StyleVaultHub.sol:L14

Description:

The referenced line contains a typographical mistake (i.e. private variable without an underscore prefix) or generic documentational error (i.e. copy-paste) that should be corrected.

Example:

src/vault/VaultHub.sol
14mapping(VaultType => address) _factories;

Recommendation:

We advise this to be done so to enhance the legibility of the codebase.

Alleviation (58e8cc66dfa900c03c47df78f5170d9960005629):

All referenced variables have been renamed accordingly, omitting their underscore prefix for the sake of legibility as they do not constitute actual private / internal variables.

VHB-02C: Redundant Logic Import

Description:

The VaultHub contract wishes to integrate with the BasicVaultFactory but will import its full implementation instead of an interface of it.

Example:

src/vault/VaultHub.sol
42function createBasicVault(address asset, string memory name, string memory symbol)
43 external
44 onlyOwner
45 returns (address)
46{
47 return BasicVaultFactory(factory(VaultType.Basic)).createVault(asset, name, symbol);
48}

Recommendation:

We advise an interface to be introduced for the BasicVaultFactory and it to be utilized in the referenced code statement, reducing the bytecode size of the contract.

Alleviation (58e8cc66dfa900c03c47df78f5170d9960005629):

An IBasicVaultFactory interface is now imported in the codebase in place of the BasicVaultFactory implementation thereby addressing this exhibit.