The most severe flaw in the contract lies in how it manually adjusts a depositor’s effective deposit amount by applying GMX’s price impact in the callback. Specifically, the logic inside afterOrderExecution for a MarketIncrease order contains a miscalculation that can be exploited to mint an inflated number of shares.
The logic incorrectly treats negative price impact as a positive addition when computing increased, which determines the number of vault shares minted.
In GMX:
Negative price impact means the user is receiving less value because their trade is large relative to liquidity or due to slippage.
The vault should reduce the effective deposit when a negative price impact occurs.
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.