DeFiHardhatOracleProxyUpdates
100,000 USDC
View results
Submission Details
Severity: low
Invalid

`removeLegacyUnripeBeanDeposit` Doesn't return BDV as required

Summary

As mentioned in the comment LibUnripeSilo:removeLegacyUnripeBeanDeposit should return BDV after removing all Unripe Beans deposited stored in account legacy. As it removes unripe beans but doesn't return BDV.

Vulnerability Details

See the following code:

/**
* @dev Removes all Unripe Beans deposited stored in `account` legacy
* Silo V1 storage and returns the BDV.
*
* Since Deposited Beans have a BDV of 1, 1 Bean in Silo V1 storage equals
* 1 Unripe Bean.
*/
function removeLegacyUnripeBeanDeposit(
address account,
uint32 season
) internal {
AppStorage storage s = LibAppStorage.diamondStorage();
delete s.a[account].bean.deposits[season];
}

Impact

Calling functions might expect to receive information about the BDV when removing Unripe Bean deposits. If it doesn't return this value, those functions might be confused or have doubts about the accuracy of their deposit removal operations.

Tools Used

Manual Review

Recommendations

Return BDV at the end of the function.

Updates

Lead Judging Commences

giovannidisiena Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Informational/Invalid

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.