sherlock-audit / 2023-04-blueberry-judging

8 stars 5 forks source link

J4de - `BlueBerryBank.sol#addBank` function can only be added but not deleted and the upper limit is fixed at 256 #72

Closed sherlock-admin closed 1 year ago

sherlock-admin commented 1 year ago

J4de

medium

BlueBerryBank.sol#addBank function can only be added but not deleted and the upper limit is fixed at 256

Summary

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.