Description: The EggVault::setEggNFT
function allows the owner of the vault to set the contract address of the Eggstravanganza
NFT at any time after the EggVault
contract has been deployed. If the NFT address is changed to a different or invalid contract, users who deposited their NFTs may be unable to withdraw them, effectively locking their assets in the vault.
Impact: Users who deposited their NFTs in the vault may be unable to withdraw it, if the NFT address is changed after their deposits.
Proof of Code:
User deposits NFT into the vault
Vault's owner updates the contract address of the NFT
User attempts to withdraw NFT but withdrawal fails because the vault points to a new NFT contract address
Code:
Tools Used: Manual Review
Recommended Mitigation: To prevent this, the EggVault::setEggNFT
function should be removed and the EggstravaganzaNFT
address should be set directly in the constructor of EggVault
. This approach eliminates the need to inherit the Ownable
contract in EggVault
, as no other functions would require access control through the onlyOwner
modifier.
Owner is trusted and is not expected to interact in ways that would compromise security
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.