DeFiHardhatFoundry
250,000 USDC
View results
Submission Details
Severity: low
Invalid

In `_claimPlenty` function of `ClaimFacet.sol`, the `claimPlenty` Event wont be emitted when plenty == 0 which contradicts the comments

Summary

As per the developer comments on claimPlenty function [here](https://github.com/Cyfrin/2024-05-beanstalk-the-finale/blob/main/protocol/contracts/beanstalk/silo/SiloFacet/ClaimFacet.sol#L91-L94) when plenty == 0 the claimPlenty event should be emitted with amount i.e, plenty = 0. However, the event emission code is placed within an [if] (https://github.com/Cyfrin/2024-05-beanstalk-the-finale/blob/main/protocol/contracts/beanstalk/silo/SiloFacet/ClaimFacet.sol#L97-L106) block which only executes when plenty > 0 this means that the event won't be emiited when plenty is 0

Vulnerability Details

see summary

Impact

The expected event when plenty == 0 won't be emitted which is an unexpected behaviour

Tools Used

Manual Review

Recommendations

Emit the event outside the "if" block

Updates

Lead Judging Commences

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

In `_claimPlenty` function of `ClaimFacet.sol`, the `claimPlenty` Event wont be emitted when plenty == 0 which contradicts the comments

Support

FAQs

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