Random Number Generator logic can be manipulated
msg.sender
, block.timestamp
and block.prevrandao
can be manipulated by any user to generate a number that is always bigger than the defenderRapperSkill
. Thus, winning the battle every time.
Attack Scenario :
User mint rapper NFT and stake it to mint credTokens.
User keeps creating new addresses until the random number is greater than defenderRapperSkill
.
User then transfers both NFT and credTokens to that address.
That address enters the goOnStageOrBattle
function to win the battle and claim credTokens.
Attacker can always win the rap battles which defeats the purpose of the RapBattle
contract.
Manual Review
Use oracle such as Chainlink to generate Random Number
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.