Beginner FriendlyFoundryNFT
100 EXP
View results
Submission Details
Severity: high
Valid

Randomness can be gamed in _battle() :: RapBattle.sol

Summary

The randomness to select a winner in _battle:: RapBattle.sol can be gamed and a person can decide whether the challenger or defender is win when there
battle skills match.

Vulnerability Details

Because all the variables to get a random winner on the contract are blockchain variables and are known, a malicious actor can use a smart contract to game the system and receive the funds and improving its winning status.

Impact

Critical

Tools Used

Foundry

Recommendations

Use Chainlink's VRF to generate a random number to select the winner.

Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

Weak Randomness

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.