stake.link

stake.link
DeFiHardhatBridge
27,500 USDC
View results
Submission Details
Severity: high
Invalid

wrong implementation of initiateUnlock

Summary

There is wrong implemented if (locks[_lockId].startTime + halfDuration > block.timestamp) revert HalfDurationNotElapsed(); as in the comment it is written that at least half of the locking duration must have elapsed to initiate the unlock period but here we are doing the opposite of that.

Vulnerability Details

if (locks[_lockId].startTime + halfDuration > block.timestamp) revert HalfDurationNotElapsed();

Impact

we cannot initiateUnlock the lock.

Tools Used

Recommendations

(locks[_lockId].startTime + halfDuration <block.timestamp)

Updates

Lead Judging Commences

0kage Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.