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

Missing event emission for some state-changing functions

Summary

Some smart contracts from the protocol doesn't emit the implemented events on some functions.

Vulnerability Details

Generally events play a crutial role in enabling off-chain applications to track and respond to on-chain activities. They are important part of the smart contracts as they also provide information about the state changes that happen within the protocol. It's a best practice to emit an event when state-changing functions are called. However the protocol doesn't do that in:

  • MetadataFacet.sol - event URI(string _uri, uint256 indexed _id);

  • https://github.com/Cyfrin/2024-05-beanstalk-the-finale/blob/8c8710df547f7d7c5dd82c5381eb6b34532e4484/protocol/contracts/beanstalk/metadata/MetadataFacet.sol#L24

  • PodTransfer.sol - event PodApproval(address indexed owner,address indexed spender,uint256 fieldId,uint256 amount);

  • https://github.com/Cyfrin/2024-05-beanstalk-the-finale/blob/8c8710df547f7d7c5dd82c5381eb6b34532e4484/protocol/contracts/beanstalk/market/MarketplaceFacet/PodTransfer.sol#L24

Impact

Low severity: Missing event emission will not keep the protocol up-to-date with the information about state changes that happen in the contracts.

Tools Used

Manual Review

Recommendations

Emit the all necessary events in the smart contracts.

Updates

Lead Judging Commences

inallhonesty Lead Judge 12 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Informational/Gas

Invalid as per docs https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity

Appeal created

dimah7 Submitter
12 months ago
inallhonesty Lead Judge
12 months ago
inallhonesty Lead Judge 11 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Informational/Gas

Invalid as per docs https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity

Support

FAQs

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