First Flight #21: KittyFi

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

Missing access restriction and authorization in `KittyFi::burnKittyCoin` function

Vulnerability Details: The burnKittyCoin function allows any external account or contract to burn tokens on behalf of any address without proper authorization checks. This lack of access control exposes users balances to potential manipulation and unauthorized depletion.

Impact:

  1. This could result in underflow errors or transaction failures if _onBehalfOf has an insufficient balance. It may also lead to inconsistencies in the balance records.

  2. An attacker could maliciously burn tokens from someone else's balance, leading to unauthorized depletion of assets.

  3. This could allow meaningless or zero-value transactions, which might be exploited to trigger certain state changes or events without any real transfer of value.

Recommendations: Implement access control.

+ function burnKittyCoin(address _onBehalfOf, uint256 _ameownt) external onlyAuthorized(_onBehalfOf) {
+ require(_ameownt > 0, "Amount must be greater than zero");
+ require(kittyCoinMeownted[_onBehalfOf] >= _ameownt, "Insufficient balance");
kittyCoinMeownted[_onBehalfOf] -= _ameownt;
i_kittyCoin.burn(msg.sender, _ameownt);
}
Updates

Lead Judging Commences

shikhar229169 Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

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