Description::
This vulnerability arises as a side effect of a valid mitigation applied to prevent front-running attacks. That mitigation restricts the EggVault::depositEgg()
function so that only the EggHuntGame
contract can call it—preventing malicious actors from claiming NFTs they don't own.
However, once this restriction is in place, it introduces a critical new scenario:
If a user manually transfers their NFT to the
EggVault
usingtransferFrom()
, they can no longer register or withdraw it. The NFT becomes permanently trapped in the vault.
Since EggVault
does not implement onERC721Received()
and lacks any rescue mechanism, this results in irreversible NFT loss for the user, even without any malicious behavior.
Impact:
A legitimate user who mistakenly sends their NFT directly to the EggVault using transferFrom() will lose access to their asset permanently. Since the vault only allows the game contract to call depositEgg(), the user cannot register the token or retrieve it through any available function.
This creates a critical loss-of-access scenario:
No way to withdraw the NFT.
No feedback or revert to prevent the mistake.
No fallback mechanism such as onERC721Received or admin rescue.
While not caused by an attacker, the impact is real and irreversible, affecting the core user experience and the safety of owned assets. It undermines user trust and may require off-chain intervention or administrative rescue, which contradicts the principles of trustless smart contracts.
Proof of Concept:
Test that simulates a manual transfer of an NFT to the vault, bypassing the intended game flow, and verifies that the NFT becomes unrecoverable.
Result:
Manual review, Foundry
Recommended Mitigation:
Modify the EggstravaganzaNFT contract to block all direct transfers to the vault, unless initiated by the game contract:
Users can transfer NFTs directly to the vault using standard ERC721 transferFrom(), bypassing the registration
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.