Incorrect timestamps in Dussehra.sol::killRavana
checks means ravana can be killed after the allowed time.
The check for if its too early is also wrong as it can be called after Fri Oct 11 2024 23:57:49 GMT+0000 instead of Oct 12 00:00:00. However, because of timestamp checks in ChoosingRam.sol::selectRamIfNotSelected
, the ChoosingRam__TimeToBeLikeRamIsNotFinish
revert will never hit as ram cannot be selected organically and must be randomly picked by the organiser with ChoosingRam.sol::selectRamIfNotSelected
. However, the time check for too late means that you can kill ravana 69 seconds after the allowed time until Sun Oct 13 2024 00:01:09 GMT+0000.
Ravana can be killed after Sun Oct 13 2024 00:00:00 GMT+0000 at any time up to Sun Oct 13 2024 00:01:09 GMT+0000.
Manual review and https://www.unixtimestamp.com/ for timestamp calculations
Simple solution is to change the timestamps to the corect times in the ChoosingRam.sol::selectRamIfNotSelected
.
Best practice solution: For both Dussehra.sol and ChoosingRam.sol, store start and end times and state variables. Or ideally, one of the contracts, for example, Dussehra.sol will have a startTime and endTime variables that can be accessed by ChoosingRam.sol so that it is certain that the timestamps are consistent amongst the different contracts.
It would be nicer if the docs were a bit more explicit because it is a little ambiguous. E.g instead of "This function will only work after 12 October 2024 and before 13 October 2024.", you could write "This function will only work from 12 October 00:00:00 2024 (GMT) until 13 October 00:00:00 2024 (GMT)." or whatever time period and timezone you intend.
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.