Closed sherlock-admin closed 1 year ago
J4de
medium
BlueBerryBank.sol#addBank
BlueBerryBank.sol#addBank function can only be added but not deleted and the upper limit is fixed at 256.
With the continuous increase of banks to 256, the BlueBerryBank.sol contract can no longer add bank.
BlueBerryBank.sol
It may cause the BlueBerry.sol contract to fail to add a bank.
BlueBerry.sol
https://github.com/sherlock-audit/2023-04-blueberry/blob/main/blueberry-core/contracts/BlueBerryBank.sol#L258
Manual Review
It is recommended that useless banks can be deleted or the admin can set the upper limit of the bank.
J4de
medium
BlueBerryBank.sol#addBank
function can only be added but not deleted and the upper limit is fixed at 256Summary
BlueBerryBank.sol#addBank
function can only be added but not deleted and the upper limit is fixed at 256.Vulnerability Detail
With the continuous increase of banks to 256, the
BlueBerryBank.sol
contract can no longer add bank.Impact
It may cause the
BlueBerry.sol
contract to fail to add a bank.Code Snippet
https://github.com/sherlock-audit/2023-04-blueberry/blob/main/blueberry-core/contracts/BlueBerryBank.sol#L258
Tool used
Manual Review
Recommendation
It is recommended that useless banks can be deleted or the admin can set the upper limit of the bank.