The drawCard function that draws cards uses the block.timestamp and block.prevrandao values to generate a randomIndex, which is not random as they have the same value in the same block
Within the same block, the block.timestamp and block.prevrandao values are the same, so the same address will always output the same result if the function is called from that address.
If a user determines that his strategy is profitable in a particular block, he can exploit the vulnerability to steal all the balance of the contract, infinitely.
foundry
You should use Chainlink's VRF or something to ensure complete randomness.
Randomness Manipulation: The randomness mechanism relies on block.timestamp, msg.sender, and block.prevrandao, which may be predictable in certain scenarios. Consider using Chainlink VRF or another oracle for more secure randomness.
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.