In order to initiateUnlock, atleast half the duration must have elapsed. if half the time was elapsed, the unlock can be initiated.
Look at the below condition where start time of the lock + half the duration
should be greater than current block time to qualify an elapse.
But, instead the logic reverts.
The behaviour is valid if the condition was a "require" instead of an if condition. Looks like a replacement of require with custom error leading to this issue.
The initiateUnlock is not working as expected. Even when half the time has elapsed, the function will revert due to the wrong condition being checked.
The initiateUnlock will revert even in the cases where the half time has elapsed.
Manual Review
Revise the condition as below.
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.