First Flight #21: KittyFi

First Flight #21
Beginner FriendlyDeFiFoundry
100 EXP
View results
Submission Details
Severity: low
Invalid

Lack of Events for Minting and Burning in KittyCoin.sol

Summary

The KittyCoin contract lacks event emissions for critical functions such as mint and burn. Emitting events is considered a standard best practice in Solidity to ensure transparency and traceability of state changes.

Vulnerability Details

  • Location: Within the mint and burn functions.

  • Description: The contract performs minting and burning of tokens without emitting any events. This can make it difficult to track these state changes, complicating audits and reducing transparency for users and developers.

Impact

  • Severity: Low

  • Effect: This issue primarily affects the monitoring and auditability of the contract rather than its core functionality. It can hinder effective tracking and logging of critical state changes.

Tools Used

  • Manual code review

Recommendations

Add event declarations and emit the appropriate events in the mint and burn functions.

event Mint(address indexed to, uint256 amount);
event Burn(address indexed from, uint256 amount);
function mint(address _to, uint256 _amount) external onlyKittyPool {
_mint(_to, _amount);
emit Mint(_to, _amount);
}
function burn(address _from, uint256 _amount) external onlyKittyPool {
_burn(_from, _amount);
emit Burn(_from, _amount);
}
Updates

Lead Judging Commences

shikhar229169 Lead Judge 11 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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