The random
variable in trickOrTreat()
is not truly random as the various parameters such as block.timestamp and block.prevrandao not good source of randomness and can be manipulated by miner/validators. Where miner/validators can allow specific address address to buy NFT at half price.
The random
variable in trickOrTreat()
is not truly random as the various parameters are predictable or fixed:
block.timestamp: The timestamp is predictable
msg.sender: This value is fixed
nextTokenId: The value of this variable is fixed for a period of time until the next NFT mint happens
block.prevrandao: The value of prevrandao will remain the same until a new block is created in the blockchain
Miner/validators can manipulate the block.prevrandao and block.timestamp to allow specific address to buy NFT at half price.
Change to other randomness methods, such as using Chainlink VRF.
It's written in the README: "We're aware of the pseudorandom nature of the current implementation. This will be replaced with Chainlink VRF in later builds." This is a known issue.
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.