The function ChoosingRam::increaseValuesOfParticipants in the ChoosingRam contract utilizes block parameters (block.timestamp, block.prevrandao, and msg.sender) to generate a random number for determining the winner of a challenge. These values are deterministic and can be predicted by an attacker, allowing them to exploit the system to always win challenges by timing their transactions appropriately.
Function Affected: ChoosingRam::increaseValuesOfParticipants
Parameters Used for Randomness: block.timestamp, block.prevrandao, msg.sender
Issue: The values used to generate the random number are publicly accessible and predictable, enabling attackers to forecast the random number outcome.
Exploitation: By monitoring the block parameters and timing their transactions, attackers can predict the random number and ensure they win the challenge consistently.
The vulnerability significantly undermines the fairness of the challenge system, as attackers can manipulate the random number generation to guarantee their victories.
Manual Review
To mitigate this vulnerability, it is crucial to use a more secure method for generating random numbers. One common approach is to utilize a secure oracle service like Chainlink VRF (Verifiable Random Function), which provides tamper-proof 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.