First Flight #21: KittyFi

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

Lack of Validation on `_amount` parameter in `KittyCoin::mint` and `KittyCoin::burn` functions

Description: There is a lack of validation that how much amount is being minted and burned. So there is no validation in these functions.

Impact: Potential for minting or burning zero tokens, which may not be desired behavior.

Recommended Mitigation: Add validation to ensure _amount is greater than zero.

function mint(address _to, uint256 _amount) external onlyKittyPool {
require(_amount > 0, "Mint amount must be greater than zero");
_mint(_to, _amount);
emit KittyCoinMinted(_to, _amount);
}
function burn(address _from, uint256 _amount) external onlyKittyPool {
require(_amount > 0, "Burn amount must be greater than zero");
_burn(_from, _amount);
emit KittyCoinBurned(_from, _amount);
}
Updates

Lead Judging Commences

shikhar229169 Lead Judge 10 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.