The timestamp stored in share_received_time (the moment an investor receives shares) is never reset when the investor withdraws, and it is only set the first time the investor makes an investment. As a result, any subsequent investments are not subject to the lock‑up period.
Expected behavior: Every time an investor makes an investment, the newly acquired shares must remain locked for at least LOCKUP_PERIOD (30 days in the current version).
Actual behavior: After an investor’s initial investment, the timestamp for that investment is never cleared or updated. Consequently, later investments can be withdrawn without incurring the early‑withdrawal penalty, even if the shares have been held for only a single day.
Likelihood: High – this condition will affect every investor after their first investment.
Impact: Subsequent investments bypass the lock‑up period, allowing investors to withdraw before the lock‑up expires without paying the penalty.
(No code provided – placeholder left intentionally.) Normal use by an investor will trigger the bug.
Explanation:
When an investor withdraws their shares, the contract should also clear the stored share_received_time. Resetting this timestamp ensures that any future investment starts a fresh lock‑up period, preventing the bug where subsequent deposits can be withdrawn instantly without the early‑withdrawal penalty.
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.
The contest is complete and the rewards are being distributed.