Stop-loss orders in GMX fail to execute if the market price has moved past the trigger price by the time the order is processed, because the contract requires the primary and secondary oracle prices to straddle the trigger. An attacker could exploit this by submitting a stop-loss order and then causing the price to move quickly, leaving the order unexecutable and removing the user's stop-loss protection.
The payExecutionFee function in GasUtils.sol calculates gas used without accounting for EIP-150's 63/64 rule, so a malicious keeper can inflate the reported gas usage by setting a high transaction gas limit. This allows the keeper to claim the entire execution fee paid by the user, leaving the user with no refund.
Limit swap orders could be cancelled after the trader learned the price at which they would execute, allowing a risk-free look at future prices. An attacker could submit a large limit order, observe oracle prices, and cancel if unprofitable, or submit a market order if profitable.
The virtual impact pool is updated unconditionally even when the virtual impact is not used in price impact calculations, leading to a growing negative virtual impact. This can cause users to suddenly face a large virtual swap impact imbalance when a market becomes flat.
The getLatestPrice() function returns a custom price (trigger or maximised price) set during a position order, and this same price is then used for subsequent token swaps within the same order. This means swaps after a position order use a different price than standalone swap orders, creating arbitrage opportunities.
The function for removing an oracle signer used the wrong action key, so the validation always failed. This meant a malicious oracle signer could never be removed, breaking an important safety measure.
Virtual swap balances in GMX Synthetics are tracked as raw token amounts without converting between the collateral token and the virtual token using an exchange rate. An attacker could exploit price differences between tokens to manipulate impact discounts and drain them from legitimate traders.
A temporary pool amount adjustment used for swap pricing was not cleared when a swap succeeded, because the function returned early. This left the adjustment in storage, causing subsequent swaps to be priced incorrectly, giving some users undeserved discounts and others undeserved penalties.
When a user executes a decrease order with a swap path, the minimum output amount is set assuming the swap will succeed and incur fees. If the swap fails, the same minimum output amount is validated against the unswapped amount, which is higher, so the user can receive less than they would have without the swap.
The report identifies an inconsistency in the GMX Synthetics smart contract where a funding amount per size calculation uses a bounded addition function to prevent overflow, but a later subtraction uses a regular minus operator. This could cause an arithmetic overflow when negating the minimum integer value, leading to failed MarketDecrease orders.
The getReservedUsd function for the short side does not account for price changes when the collateral token is the same as the index token, potentially leading to under-reserved funds and market insolvency. An attacker could exploit this by opening short positions in such a market, increasing the risk of insolvency if the collateral token's price drops.
The function MarketUtils.getFundingAmountPerSizeDelta() always rounds up the divisor regardless of the requested rounding mode, causing the final result to be rounded down when it should be rounded up. This leads to incorrect funding calculations for every user and every second, with errors growing as funding amounts increase.
Limit orders on GMX can be updated without delay, allowing a user to repeatedly adjust an order by a tiny amount to delay execution until a future block where the oracle price is known, giving them a free look at future prices. This lets them exit at a more favourable price at the expense of the counterparty.
The createDeposit function did not validate the initialLongToken and initialShortToken parameters, allowing an attacker to set them to a low-value token while the market's long or short token was WNT. This caused the execution fee to be subtracted from the wrong token amount, enabling the attacker to later cancel the deposit and drain WNT from the deposit vault.
A position that was fully collateralised before a change to the minimum collateral requirement can become liquidatable if the minimum is increased, even if the position is in profit. Liquidation then gives all remaining funds to the pool and nothing to the user.
The ADL handler only checks global PnL levels, not whether a specific position is still a valid ADL candidate. An attacker could exploit a delay between candidate selection and execution to reduce their position, causing an incorrect further reduction.
The protocol allows disabling operations like deposits, withdrawals, and orders, but when a keeper attempts to execute a disabled operation, the execution fails and the operation is cancelled, charging the user an execution fee. This leads to users losing funds and having to redo the operation.
Users must set an execution fee when creating an order, but if a keeper or oracle outage delays execution, gas prices can spike and the fee becomes insufficient. The user cannot increase the fee without changing the order timestamp, which invalidates the oracle price and may prevent execution, potentially causing losses or liquidation.
The oracle contract treats a zero secondary price as 'empty' and falls back to the older primary price. An attacker could exit a position at the older price when the newer price is zero, causing a loss to the pool.
In the deposit logic, when a single-sided deposit triggers an auto-adjustment that increases the adjusted short amount, the adjusted long amount is never assigned and stays at zero. An attacker or user submitting such an order without a minimum output could receive roughly half the expected market tokens, while sane slippage settings would simply make the transaction revert.
When a decrease order tries to swap collateral to the PnL token but the swap fails, the collateral is returned without any slippage check because the only slippage parameter is in PnL token units. A user with a resting order could therefore receive less value than intended due to price impact.
A malicious keeper can deliberately supply just enough gas for the execution of a deposit, order, or withdrawal to fail due to out-of-gas, but enough for the cancellation to succeed. This allows the keeper to collect the execution fee and rewards while cancelling the user's request.
The oracle price validation uses a single precision value for both minimum and maximum prices, which can cause the maximum price to exceed the representable range when the minimum price is near the precision limit. This could lead to oracle price fetching failures or users receiving less than they deserve, potentially causing unfair liquidations.
The smart contract code performs division before multiplication in several places, causing precision loss in financial calculations. An attacker could potentially exploit this to manipulate funding rates or profit/loss accounting, though the report does not specify a concrete attack.
The protocol's price oracle does not check whether the Arbitrum sequencer is active, so if the sequencer goes down, prices from Chainlink feeds may be stale. An attacker could then submit orders and, if also a keeper, obtain execution prices that do not reflect reality.
GU
GMX Update
Medium
Instant results are busy. Press Enter to search every report.
No direct matches. Search every report above, or try a bug class like IDOR or SSRF.