The _hasEnoughMeowllateral
function relies on a mapping (kittyCoinMeownted
) to check if a user has sufficient collateral. However, this mapping does not reflect transfers of KittyCoin tokens to other addresses, potentially leading to incorrect collateral assessments.
The _hasEnoughMeowllateral
function calculates whether a user has enough collateral by comparing the total collateral in euros with the required collateral, which is derived from the kittyCoinMeownted
mapping. This mapping tracks the amount of KittyCoin tokens minted but does not account the actual balanceOf
value. As a result, the function might assess collateral based on outdated or incorrect information, leading to inaccurate checks.
Incorrect collateral checks could lead to over-collateralization or under-collateralization, exposing the contract to potential financial risks and attacks.
Manual Code Review
Update the kittyCoinMeownted
mapping to reflect changes in user token balances. Implement additional logic to ensure it accurately reflects the user's true token holdings and calculate collateral requirements accordingly.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.