the random
number in selectRamIfNotSelected
is calculated using block.timestamp
, block.prevrandao
which are not so random as expected, the organiser can manipulate this function for his/her own win.
The organiser can wait for the appropriate block.timestamp
and block.prevrandao
to call selectRamIfNotSelected
. The selectedRam
will be himself/herself. The organiser will take all the money.
Manual review
Slither
Foundry
Place this code into Dussehra.t.sol
Test pass, the organiser take all the money.
Do not use block.timestamp
and block.prevrandao
as sources of randomness. Use ChainLinkVRF instead.
The organizer is trusted, but the function `ChoosingRam::selectRamIfNotSelected` uses a way to generate a random number that is not completely random.
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.