According to protocol documentation, the Gamma protocol aims to "simplify the process of managing leveraged positions while providing additional features such as automated position management and risk mitigation" on GMX. While GMX natively supports partial liquidations (read here under LIQUIDATIONS: https://gmx-docs.io/docs/trading/v2) as a key risk management feature, our protocol's implementation lacks this critical functionality. We're essentially forcing users to wait for full liquidation rather than allowing them or the kepper to manage the position after a partial liquidation. The automation keeprs that the portocol uses might even detect the partial liquidations as full, while the contract has a check that prevents its full liquidation:
The gmxProxy gets called by the faulty keeper because it detected partial liquidation, to a full one then it calls
Which then calls:
We still will call critical functionality, which can disrupt the whole protocol proccess:
The absence of partial liquidation support represents a significant deviation from GMX's native functionality. When positions face liquidation, users lose the ability to preserve part of their position, forcing them into full liquidations that could have been avoided. This limitation increases user risk and may drive traders to interact with GMX directly or through other platforms that maintain this essential risk management feature. The lack of partial liquidation support fundamentally undermines the protocol's stated goal of enhanced position management and risk mitigation.
Manual review
The protocol should enhance its partial liquidation handling to better align with GMX's risk management capabilities. I recommend implementing a comprehensive liquidation management system that:
Separates liquidation and flow state management by creating a dedicated handler for partial liquidations that doesn't impact global protocol states. This would preserve ongoing position management capabilities while processing the liquidated portion.
Introduces position-specific state tracking to manage partial liquidations independently of the global protocol flow. This enables concurrent handling of partial liquidations without disrupting other protocol operations.
Create a recovery mechanism that allows positions to resume normal operations after a partial liquidation, maintaining the protocol's automated management features while adjusting to the new position parameters.
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.