Description:
The depositEgg() function in the EggVault contract performs state changes after an external call to the ownerOf function of the eggNFT contract. This introduces a reentrancy risk, as malicious contracts could exploit this sequence to manipulate the state of the vault.
Impact:
High - Reentrancy attacks could lead to unauthorized state changes, such as incorrect egg deposits or withdrawals, compromising the integrity of the vault.
Proof of Concept:
Recommended Mitigation:
Reorder the operations in the depositEgg() function to perform state changes before making external calls. For example:
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.