Description: The KittyPool::whiskdrawMeowllateral
function calls an external contract and then performs a state-changing operation. This could lead to a reentrancy attack where the external contract calls back into the KittyPool contract before the state change is completed.
Impact: An attacker could drain funds or cause other unexpected behavior by reentering the contract.
Proof of Concept: An attacker could create a malicious KittyVault contract that reenters the KittyPool contract:
Use the below contract as Malicious Vault Contract:-
Use the below contract as Attacker Contract:-
Recommended Mitigation: Use the Checks-Effects-Interactions pattern to update the state before calling external contracts.
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.