The KittyPool:burnKittyCoin
function allows third party to reduce the user's kitty coin amount in the pool without the user's awareness causing the affected user to have a mismatch of kitty coin that they hold in the kittyPool versus the actual kitty coin token amount that they actually own.
The KittyPool:burnKittyCoin
function allows anyone who holds kittyCoin to reduce the kittyCoin amount captured in the kittyPool of another user.
As the kittyCoin is only reduced in the kittyPool but the actual kittyCoin token that the user holds is not reduced when a third party call the KittyPool:burnKittyCoin
function, this causes a mismatch of kittyCoin amount in the kittyPool versus actual kittyCoin token the user actually holds.
Proof of Concept:
In test/KittyFiTest.t.sol
, add the following test and run the test:
The test passes indicating that the amount of kittyCoin in kittyPool is different from the actual kittyCoin token amount that the user holds.
Mismatch of kittyCoin amount in kittyPool versus actual amount of kittyCoin token that user holds when some else calls to execute the KittyPool:burnKittyCoin
function without their awareness.
Manual review with forge test
To emit an event passing through front-end or notification system to the affected user when someone runs and successfully executes the KittyPool:burnKittyCoin
function that could potentially ruin their position in kittyPool on purpose with some malicious activities
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.