First Flight #21: KittyFi

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

Purgins `msg.sender` position rather than user

Summary

The purrgeBadPawsitionfunction should purge someone else's position rather than the msg.sender. But in the contract its the opposite.

Vulnerability Details

https://github.com/Cyfrin/2024-08-kitty-fi/blob/950ac553b935a3bf9277b71ffa5662a84f2633fe/src/KittyPool.sol#L126C8-L126C49

Impact

The protocol will burn the wrong person position. Resulting in distrust in the protocol and unintended behavior.

Tools Used

Manual review

Recommendations

Change the following line to follow the correct of the protocol.

- i_kittyCoin.burn(msg.sender, totalDebt);
+ i_kittyCoin.burn(_user, totalDebt);
Updates

Lead Judging Commences

shikhar229169 Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Other

Support

FAQs

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