Timed
initialization is a 2-step process:
1. Timed.duration
is set in the constructor
2. Timed.startTime
is set when the method _initTimed
is called.
Before this second method is called, isTimeEnded()
calculates remaining time using a startTime
of 0, resulting in the method returning true for most values, even though the timer has not technically been started.
If Timed has not been initialized, isTimeEnded()
should return false, or revert
- ConsenSys Audit Fei Finding 3.5
- Error Handling
- Medium Severity
- Timer Returns True instead-of False
- Return False before Initialization
- Youtube Reference
- Medium severity finding from Consensys Diligence Audit of Fei Protocol