The GmxProxy contract only supports a single orderHandler address and overwrites it during updates, violating GMX Synthetics’ integration guideline that callback contracts should whitelist and accept callbacks from multiple OrderHandler instances simultaneously. This limitation could lead to callback failures during GMX handler upgrades or coexistence periods, disrupting vault operations.
The contract defines a single orderHandler state variable:
The updateGmxAddresses function updates orderHandler to a new address, overwriting the previous value:
The validCallback modifier restricts callbacks to this single orderHandler:
GMX Synthetics documentation states that callback contracts must support multiple OrderHandler addresses to handle upgrades or temporary coexistence (e.g., OrderHandler(1) and OrderHandler(2)). The current implementation cannot whitelist more than one OrderHandler at a time, meaning callbacks from additional handlers will fail with an "invalid caller" error.
Callback Failures: Callbacks from unwhitelisted OrderHandler instances (e.g., during upgrades) will revert, preventing proper execution of afterOrderExecution or afterOrderCancellation.
Operational Disruption: The vault may fail to process GMX actions during handler transitions, leading to delays or incomplete position updates.
Centralized Dependency: Frequent manual updates via updateGmxAddresses are required to switch handlers, increasing reliance on the owner and risking downtime.
Financial Risk: Disrupted operations could delay critical actions (e.g., liquidations), potentially causing financial losses for users.
Manual code review
Replace the single orderHandler address with a structure supporting multiple handlers, such as an EnumerableSet
Likelihood: Low, when multiple orderHandler exist at the same time. Impact: High, some orders won’t trigger `afterOrderExecution` when they should, until the migration is complete. Leading to DoS and no share minted. Deploying a new proxy won’t change anything during all the “migration” since you cannot know which handler will respond.
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.