The Owner is able to change the game contract with EggstravaganzaNFT::setGameContract at any time, leading to possible breach of trust or breaking the NFT minting.
The Owner of the EggstravaganzaNFT contract is able to call EggstravaganzaNFT::setGameContract at any time, regardless of the state of the EggHuntGame contract. This allows the Owner to break the game protocol, specifically the EggHuntGame::searchForEgg function.
The EggHuntGame::searchForEgg function makes a call to EggstravaganzaNFT::mintEgg whenever a Player finds an egg. However, if the Owner of the EggstravaganzaNFT contract changes the game contract via EggstravaganzaNFT::setGameContract, the call will revert on require(msg.sender == gameContract, "Unauthorized minter");, preventing any Players from being able to be minted the NFT.
Breaks the protocol, Players unable to mint found eggs.
Manual review.
A possible solution may be to add an additional function that disables the ``EggstravaganzaNFT::setGameContract` function once set:
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.