The GmxProxy contract lacks additional price deviation controls beyond GMX's native protections. While GMX implements its own price impact limits and oracle validations, the absence of protocol-level checks in GmxProxy creates potential opportunities for price manipulation within GMX's allowed thresholds.
GmxProxy forwards orders to GMX without implementing its own price deviation checks:
Key considerations:
GMX provides base layer protections:
Price impact limits
Delay blocks
Oracle validations
Position collateral checks
However, GmxProxy could benefit from additional protocol-specific controls:
Protocol-level price deviation limits
Additional checks based on protocol's risk parameters
Custom validation logic for specific order types
The potential impact is moderate because:
Limited by GMX's native protections:
Price impact caps restrict extreme manipulations
Oracle validations prevent major deviations
Position collateral requirements limit risk exposure
Still poses risks:
Price manipulation within GMX's allowed thresholds
MEV opportunities in specific market conditions
Higher slippage for users in volatile markets
The following PoC demonstrates potential price manipulation within GMX's limits:
This PoC demonstrates:
Order creation with suboptimal but GMX-acceptable price deviations
Price manipulation within GMX's allowed thresholds
Impact on trade execution quality
Manual code review
Foundry testing framework
GMX documentation analysis
Add protocol-specific price deviation controls:
These changes:
Add protocol-level price deviation controls
Complement GMX's existing protections
Improve trade execution quality
Reduce MEV opportunities
This issue is classified as Medium severity because:
Impact is limited by GMX's protections:
Price impact caps
Oracle validations
Position collateral requirements
Likelihood is moderate:
Requires specific market conditions
Limited by GMX's own security measures
Economically viable only in certain scenarios
Not High severity because:
Base GMX protections mitigate catastrophic scenarios
No direct fund loss risk
Manipulation requires significant capital
Not Low severity because:
Real economic impact on users
Consistent MEV opportunities
Affects protocol's core trading functionality
The recommended solution complements GMX's existing protections rather than replacing them. The goal is to:
Add protocol-specific safeguards
Improve user trade execution
Maintain compatibility with GMX's architecture
Reduce potential for price manipulation within allowed thresholds
The severity assessment considers both the existing GMX protections and the potential for improvement through protocol-level controls.
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.