Security review · December 2025
V2.3 Plan Review for GMX
Guardian's review of V2.3 Plan Review for GMX, published December 2025. The report records 10 findings, including 10 informational.
See how Guardian runs a perp DEX smart contract audit.
- Published
- Review window
- December 25 to 31, 2025
- Language
- Solidity
- Chains
- Arbitrum, Avalanche
- Sector
- Perpetuals
- 0 Critical
- 0 High
- 0 Medium
- 0 Low
- 10 Informational
Findings 10
-
I-01 Informational Synchronous Deposits Risk Pending
Description
With the bridgeIn function users can in a single transaction add to their multichain balance. If this multichain balance is then automatically counted towards account health, users can manipulate their health upwards in a single transaction. This could be used to perturb the execution of liquidations or as a piece of a risk free trade action.
Recommendation
At this time there’s no full exploit identified with this increase of the account’s health in a single transaction, however it is worth noting that an asynchronous collateral deposit method would be more secure as it limits this pathway.
-
I-02 Informational GMX Account Balance Has Other Uses Pending
Description
The plan stipulates that the multichain vault GMX account will be re-used to custody the collateral of accounts for cross-margin positions. However the GMX account balance already has other uses such as to pay the execution fee on multichain relay actions through the multichain router. If these existing use-cases are allowed to touch the margin of a cross-margin account through the GMX account, this would allow for potentially Critical margin manipulation issues.
Recommendation
Ensure that the margin storage in the GMX account for a position cannot be touched by existing features such as the relay fee payment from a GMX account for multichain relay actions.
-
I-03 Informational Deposit Griefing Pending
Description
As noted in the plan, there must be caps on the total amount of collaterals used in a cross-margin position as it will require increasing amounts of gas to iterate through and provide oracle values for all collateral tokens. Because of this limitation, it must be ensured that only the owner of the account on the destination chain is allowed to initiate deposits into the GMX account that holds their margin. If deposits are permissionless a malicious actor could spam dust deposits into victim accounts to force them to reach this limit and not be able to add any other collateral tokens.
Recommendation
Only allow the owner of the position on the destination chain to carry out deposits in a new collateral token.
-
I-04 Informational Cached Prices Security Improvement Pending
Description
The usage of cached prices introduces a vector for in any action that is allowed to use such prices. To limit the potential game-ability of this feature, cached prices should ideally only be used strictly by keeper initiated actions, and not by user initiated actions.
Recommendation
Consider dis-allowing cached price usage for any atomic oracle action.
-
I-05 Informational Collateral Whitelist Risks Pending
Description
Given the global collateral whitelist, there is a risk that when collateral is de-whitelisted all positions involving this collateral become invalid/insolvent.
Recommendation
Consider dis-allowing the disablement of a collateral while it is being used by positions.
-
I-06 Informational Collateral Health Needs Slippage Pending
Description
When an account’s collateral must be swapped to the corresponding backing tokens for a market the swap will incur up to a configured max slippage. For larger positions the actual slippage experienced will be larger as the collateral amount scales. This scaling of slippage upon execution of a liquidation / loss realization ought to be taken into account when valuing the account’s collateral. For accounts with a large amount of collateral they should be valued at a maximum slippage discount. For accounts with a smaller amount of collateral they should be valued at a smaller slippage discount.
Recommendation
Consider implementing a slippage sliding discount factor to account for the real worth of collateral assets once they are swapped to the required backing asset. It is important to account for this to avoid creating bad debt as a result of liquidation swaps.
-
I-07 Informational Profit Health Needs Slippage Pending
Description
When an account is owed a large amount of pending profit, since this profit can now be swapped to a collateral token to pay out the trader or must be swapped to a different token to settle losses from another market position in a cross-margin account, slippage must be accounted for when valuing an account’s profit in it’s health. Currently there exists a profit multiplier which accounts for more volatile index tokens, however there should also be a slippage multiplier which accounts for the slippage that would be experienced if this profit would be re-purposed to cover the losses from another position in the cross-margin account.
Recommendation
Consider adding an additional slippage multiplier on profits that account for slippage that would be experienced upon realization of this profit and swapping the profit token to another token such that it can be used to pay down other losses.
-
I-08 Informational Collateral Token Configuration Input Pending
Description
In the migration file, collateralTokens are provided as an input to create a market group. It is indicated that these collateralTokens will be the supported collaterals of the market group. However the global collateral whitelist should negate this and allow all globally supported collaterals to be used in the market group.
Recommendation
Consider removing the collateralTokens from the configuration function.
-
I-09 Informational Permissionless Async Oracle Prices Pending
Description
In the implementation plan for the Swap request system the
aggregateSwapRequestsfunction uses thewithOraclePricesmodifier, however this should use thewithOraclePricesForAtomicActionmodifier since the aggregateSwapRequests function is permissionless, the untrusted atomic action oracle prices should be used. This way the sequencer uptime check is also used.Recommendation
Consider using the
withOraclePricesForAtomicActionfor theaggregateSwapRequestsfunction. -
I-10 Informational Market Groups Add Significant Complexity Pending
Description
The high level goal of market groups is to aggregate liquidity from multiple markets that have the same index token for improved trading experience and execution. However the current implementation proposal of attempting to combine these markets and introduce accounting for splitting their relevant payouts/fees and also combining their impact pools poses a serious complexity increase in the GMX V2 codebase. The implementation of market groups is by far the most complex undertaking in V2.3, and it may not even be strictly necessary for the support of cross-margin. The best path forward would be to find a way to produce the same trading experience gains, effectively aggregating liquidity through a simpler approach.
Recommendation
Rather than combining multiple markets with aggregate accounting, since we are implementing cross-margin we can leverage this new feature to achieve roughly the same outcome by instead splitting up larger trades into multiple trades across similar markets using the same collateral. This allows larger trades to use the liquidity of multiple backing markets while being maintained within one Cross-margin group. Consider achieving the same end effect for users of “deepened” liquidity by using a simpler method such as under the hood transforming these positions into split trades that utilize multiple GM markets under the hoood.
No findings match.
More from GMX
All 60 reports-
Morpho Liquidation Module
3 findings 3 findings: 3 informational -
RewardRouterV3 & RewardRouterUtils
20 findings1 high 20 findings: 1 high, 8 low, 11 informational -
V2.2.1 Review
102 findings8 high 102 findings: 8 high, 37 medium, 49 low, 8 informational -
Incentives Contracts
17 findings 17 findings: 3 medium, 3 low, 11 informational
Put your code through the same review.
This review started with a conversation about scope. Tell us what you are building and we will plan yours with you.
