The withdraw
function contains an incorrect lock time check that prevents withdrawals at the exact unlock time.
withdraw
function
The condition:
incorrectly uses >=
, which prevents users from withdrawing even when the lock time has precisely elapsed. This means users must wait an extra block before they can withdraw, which is not the intended behavior.
Users experience unnecessary delays in withdrawing their collateral.
Creates a poor user experience due to an unintended restriction.
Manual code review
Static analysis
Change the condition to:
This ensures that users can withdraw as soon as the lock time has fully passed, without any additional delay.
Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelihood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.
Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelihood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.
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.