The setLockTime
function allows the owner to arbitrarily modify the withdrawal locktime period without any restrictions,
potentially trapping users' funds by extending the lock duration for existing deposits.
Currently we know the owner has full permission to make any update but still that doesn't mean if the owner account get leaked users could loose thier money or when the owner feel like he can prevent users from taking out their cash.
This current modifications could allow and existing users order to have more delay.
For example taking naruto as user and madara as owner
naruto(user) deposit funds when locktime is 7 days
madara(owner) increase lock time to 2 years
it shouldn't affect existing deposit like the user naruto (user) because if madara(owner) increases this time then naruto cant withdraw his funds
POC:
The test illustrates a serious vulnerability in the setLockTime function where the owner can maliciously modify the lock
duration after users have deposited funds - even if users have waited through their original lock period.
For example, when a user deposits with a 7-day lock and waits the full period, the owner can extend the lock to 730 days (2 years) just before the user attempts to withdraw, effectively trapping their funds for an additional 2 years with no recourse.
This violates users' expectations about withdrawal timeframes and could be used maliciously to prevent withdrawals indefinitely.
HIGH - Because:
Affects all existing deposits
Can trap user funds for arbitrary periods
No maximum limit on lock duration
Manual code review
Foundry testing framework
Add restriction that lock changes only apply to new deposits:
Or add maximum lock time limit:
This ensures:
Lock changes don't affect existing deposits, or
Lock time cannot exceed reasonable limits
Users have certainty about their withdrawal timeframes
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. Keepers are added by the admin, there is no "malicious keeper" and if there is a problem in those keepers, that's out of scope. ReadMe and known issues states: " * System relies heavily on keeper for executing trades * Single keeper point of failure if not properly distributed * Malicious keeper could potentially front-run or delay transactions * Assume that Keeper will always have enough gas to execute transactions. There is a pay execution fee function, but the assumption should be that there's more than enough gas to cover transaction failures, retries, etc * There are two spot swap functionalies: (1) using GMX swap and (2) using Paraswap. We can assume that any swap failure will be retried until success. " " * Heavy dependency on GMX protocol functioning correctly * Owner can update GMX-related addresses * Changes in GMX protocol could impact system operations * We can assume that the GMX keeper won't misbehave, delay, or go offline. " "Issues related to GMX Keepers being DOS'd or losing functionality would be considered invalid."
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. Keepers are added by the admin, there is no "malicious keeper" and if there is a problem in those keepers, that's out of scope. ReadMe and known issues states: " * System relies heavily on keeper for executing trades * Single keeper point of failure if not properly distributed * Malicious keeper could potentially front-run or delay transactions * Assume that Keeper will always have enough gas to execute transactions. There is a pay execution fee function, but the assumption should be that there's more than enough gas to cover transaction failures, retries, etc * There are two spot swap functionalies: (1) using GMX swap and (2) using Paraswap. We can assume that any swap failure will be retried until success. " " * Heavy dependency on GMX protocol functioning correctly * Owner can update GMX-related addresses * Changes in GMX protocol could impact system operations * We can assume that the GMX keeper won't misbehave, delay, or go offline. " "Issues related to GMX Keepers being DOS'd or losing functionality would be considered invalid."
Likelihood: Low, when admin changes lockTime setting. Impact: Informational/Low, it will change the lockTime for previous depositors, forcing them to wait longer than expected or allowing them to withdraw earlier. This is indeed a strange implementation and is not specified in the documentation. It deserves a low.
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.