Dussehra
and ChoosingRam
ContractsDescription:
The protocol exhibits inconsistencies in timestamp usage across different contracts, specifically in the Dussehra
and ChoosingRam
contracts. These inconsistencies manifest as slight differences in the timestamps
used to control access to certain functions, potentially leading to confusion or unintended behavior due to the varying times at which actions become permissible or forbidden.
Dussehra::killRavana
:
ChoosingRam::selectRamIfNotSelected
:
ChoosingRam::increaseValuesOfParticipants
:
Impact:
These inconsistencies in timestamp usage could lead to unexpected behavior, such as functions becoming accessible or inaccessible at slightly different times than intended. This could affect the protocol's operation, especially if precise timing is crucial for certain actions or events.
Proof of Concept:
The provided code snippets illustrate the differing timestamps used across the Dussehra and ChoosingRam contracts. Specifically, the killRavana function in the Dussehra contract uses timestamps that differ by a few minutes from those used in the ChoosingRam contract's selectRamIfNotSelected and increaseValuesOfParticipants functions.
Tools Used:
Manual review
Recommended Mitigation:
To ensure consistency and avoid potential issues arising from the slight differences in timestamp usage, consider standardizing the timestamps used across all contracts. This involves agreeing on a single set of timestamps for starting and ending events and using these consistently throughout the protocol. Additionally, documenting the chosen timestamps clearly and communicating them effectively to all stakeholders can help prevent misunderstandings or errors related to timing.
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.