In the EggHuntGame
contract, the searchForEgg()
function has a vulnerability that allows an attacker to manipulate the block timestamp. This means the attacker can trick the contract into thinking the game is still ongoing, even after the game should have ended
It creates an unfair playing environment, where the attacker can keep playing even after the game should be over
While it does not directly affect funds or ownership, it does compromise the game’s integrity and fairness
The game starts at 80
seconds.
The game should end at 150
seconds (80 + 70
).
The attacker moves time forward to 180
(Game is over at this point).
The attacker manipulates time backward to 130
, making it seem like the game is still active.
The searchForEgg()
function still executes, proving the bug exists.
You can see that the test case passed, instead of throwing a revert with Game Ended
1) VS code
Relying on block.timestamp
can be risky due to miner manipulation. We recommend using trusted oracles like Chainlink to fetch accurate, off-chain time data (e.g., UTC).
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.