There is no checks on both user (whose kittyCoin gets burnt on behalf) and executor (player to call the burnKittyCoin function) collateral eligibility in KittyPool:burnKittyCoin
. If either user or executor doesn't have the required kittyCoin amount, the function will revert.
In other core transactional functions in KittyPool
contract, there are either modifier or prerequisite checks with customed error implemented to prevent subsequent operation to go through if the conditions are not met. However for function KittyPool:burnKittyCoin
, there is no prerequisite check if either the user or executor does own KittyCoin and if the kittyCoin amount they hold is sufficient.
When either user or executor doesn't have the required kittyCoin amount, the function will revert as demonstrated in the test below:
This could have impacted other processes that depend on this output's state to show the correct error messsage or notification
Unclear error message with function to revert due to no kittyCoin eligibility and sufficiency check
Manual review and forge test
To include prerequisite check on both user and executor if they hold any kittyCoin and if the amount is sufficient for the function call
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.