Insecure way of random number generation using keccak256 in a Solidity smart contract leads to predictable guessing, potentially compromising fairness and security.
The use of keccak256(abi.encodePacked(msg.sender, block.timestamp, block.difficulty)) for random number generation in a Solidity smart contract can result in a significant security vulnerability. Miners can manipulate block.timestamp, enabling them to influence generated numbers and allowing for predictable guessing. This flaw threatens the contract's fairness and exposes it to potential exploitation.
This vulnerability can lead to unfair outcomes in the smart contract's operations,as malicious users may predict and exploit the generated random numbers. It undermines the contract's integrity and may result in financial losses for participants. Migrating to a more secure random number generation method is crucial to mitigate this impact.
Vs code
Use chainlinks vrf to generate random number.
Root cause: bad RNG Impact: manipulate winner
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.