Description:
The EggstravaganzaNFT
owner can set a new gameContract
through EggstravaganzaNFT::setGameContract
. It can be any random address, including the owner himself, which then can mint any egg NFTs with tokenId
s that haven't been minted before.
The EggHuntGame
owner can set a high eggFindThreshold
through EggHuntGame::setEggFindThreshold
function allowing for a bigger chance of winning an NFT for a particular amount of time.
Impact:
Undermines fairness in finding egg NFts and dilutes scarcity.
Proof of Concept:
EggstravaganzaNFT
owner changes the gameContract
to himself.
Owner mints an egg to himself.
Owner changes back the gameContract
to previous contract.
EggHuntGame
owner changes the eggFindThreshold
to 100.
Owner searches for an egg and always finds one.
Owner changes back the eggFindThreshold
to previous value.
Proof of Code:
Place the following tests inside EggGameTest
:
Recommended Mitigation:
Allow gameContract
initialization in EggstravaganzaNFT
and eggFindThreshold
initialization in EggHuntGame
once. However, no other gameContract
s can be used that way and eggFindThreshold
couldn't be changed.
Use a DAO.
Use a MultiSig wallet.
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.