The vulnerability lies in the generation of a random number in the Solidity smart contract.
The current implementation uses the keccak256 hash of the sender's address, the current timestamp, and the block difficulty to generate a pseudo-random number.
This approach is vulnerable as it can be manipulated by miners or attackers.
The keccak256 hash function is used to generate a pseudo-random number by hashing the concatenation of the sender's address, the current timestamp (block.timestamp
), and the block difficulty (block.difficulty
).
However, this approach is not truly random and can be manipulated.
Miners have some influence over the block timestamp and block difficulty, which means they could potentially manipulate these values to influence the outcome of the random number generation. This is known as the Miner's Influence vulnerability.
The impact of this vulnerability is potentially high.
If an attacker or miner can predict or manipulate the outcome of the random number generation, they could unfairly influence the winner of the game. This could lead to a loss of funds for other players and could undermine the integrity and fairness of the game.
foundry
Implement a solution like Chainlink VRF
to get secure random data to use for the calculation of the raffle winner and the rarity of the token to mint.
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.