sherlock-audit / 2023-04-blueberry-judging

8 stars 5 forks source link

deadrxsezzz - SoftVault doesn't implement the ISoftVault interface #89

Closed sherlock-admin closed 1 year ago

sherlock-admin commented 1 year ago

deadrxsezzz

high

SoftVault doesn't implement the ISoftVault interface

Summary

SoftVault doesn't implement the ISoftVault interface

Vulnerability Detail

SoftVault doesn't have the .bToken() method from the Interface.

Impact

SoftVaults cannot be deployed as they do not implement the needed interface. Contract cannot function properly without SoftVaults Without this method major functionalities like addBank will always revert because of such lines

address bToken = address(ISoftVault(softVault).bToken());

https://github.com/sherlock-audit/2023-04-blueberry/blob/main/blueberry-core/contracts/BlueBerryBank.sol#L254

Code Snippet

https://github.com/sherlock-audit/2023-04-blueberry/blob/main/blueberry-core/contracts/BlueBerryBank.sol#L254 https://github.com/sherlock-audit/2023-04-blueberry/blob/main/blueberry-core/contracts/interfaces/ISoftVault.sol https://github.com/sherlock-audit/2023-04-blueberry/blob/main/blueberry-core/contracts/vault/SoftVault.sol

Tool used

Manual Review

Recommendation

Implement the bToken() method in the SoftVault.sol contract