In PerpetualVault.sol, the withdraw() function lacks a slippage factor. Due to this, users may be affected if there is excessive market volatility.
The above withdraw() function lacks a slippage factor, which can lead to unexpected losses for users.
Suppose a user expects to receive x amount when creating a withdrawal request.
However, due to extreme market volatility, the user may receive less than their expected x amount of collateral.
As a result, users will be negatively impacted.
Users may suffer losses when withdrawing their collateral due to the lack of a slippage control mechanism in withdraw().
Manual Review
Implement a mechanism that allows users to prevent withdrawal if the slippage exceeds an acceptable threshold.
There is no real proof, concrete root cause, specific impact, or enough details in those submissions. Examples include: "It could happen" without specifying when, "If this impossible case happens," "Unexpected behavior," etc. Make a Proof of Concept (PoC) using external functions and realistic parameters. Do not test only the internal function where you think you found something.
acceptablePrice does that job for increase/decrease positions. https://github.com/gmx-io/gmx-synthetics/blob/caf3dd8b51ad9ad27b0a399f668e3016fd2c14df/contracts/order/BaseOrderUtils.sol#L276C49-L276C66
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.