Description: In the Streets::unstake
function subtracting block.timestamp
with stakes startTime
and then dividing by 1 day
creates a predictable find number. A predictable number is not a good random number. Malicious users can manipulate these values to update their rapperStats
themselves according to their choice.
Impact: Any user can influence the rapperStats
of the Rapbattle, manipulate RapBattle::BASE_SKILL
, RapBattle::VIRTUE_INCREMENT
, RapBattle::VICE_DECREMENT
accourding to their choice. Making the entire OneShot::rapperStats
worthless.
Proof of Concept:
Validators predicting block.timestamp
can significantly manipulate their participation.
Users can predict the value and update the rapperStats
of the Rapbattle::getRapperSkill
according to their choice, making their address the preferred one to manipulate the rapperStats
.
Recommended Mitigation: A cryptographically verifiable random number generator, such as Chainlink VRF, could substantially mitigate such issues.
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.