DeFiHardhat
21,000 USDC
View results
Submission Details
Severity: low
Invalid

emit event before external call

Vulnerability Details

It is best practice to emit events before external call for event using services like graph

File : contracts/beanstalk/barn/UnripeFacet.sol
IERC20(underlyingToken).sendToken(underlyingAmount, msg.sender, toMode);
// emit the event
emit Chop(msg.sender, unripeToken, amount, underlyingAmount);

Recommendations

File : contracts/beanstalk/barn/UnripeFacet.sol
+ emit Chop(msg.sender, unripeToken, amount, underlyingAmount);
IERC20(underlyingToken).sendToken(underlyingAmount, msg.sender, toMode);
// emit the event
- emit Chop(msg.sender, unripeToken, amount, underlyingAmount);
Updates

Lead Judging Commences

giovannidisiena Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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