Hunt prep
Before you test GMX Update
What 75 disclosed reports say about GMX Update: what was found and paid, what was fixed, and where it may be worth looking next.
- with a public bounty
- 0
- median public bounty
- –
- highest public bounty
- –
Gaps worth testing 14
Ideas drawn from this program's disclosed reports and our class lessons. None of them is a known bug: each is a place to look, and the reports linked under it are why. Check the current scope before testing anything.
-
1
Bounded arithmetic helpers used inconsistently across funding and PnL maths
Business logic Read the lesson
Reports 85193 and 85809 show boundedAdd and boundedSub being mixed with plain arithmetic and an incorrect underflow guard. Sweep every other place in the Synthetics contracts where bounded helpers sit next to raw plus or minus on signed values, especially funding, borrowing and PnL accumulation, and check the boundary conditions at the minimum and maximum int256. The same root cause may recur wherever a helper was introduced to fix one call site only.
-
2
Virtual inventory and impact pool updates when only one token has inventory
Business logic Read the lesson
Reports 85187, 85184, 85190 and 85788 show virtual swap balances and impact pools being updated or skipped inconsistently. Test markets where only one collateral token has virtual inventory, and cases where the virtual impact is not used in the price calculation but the inventory is still adjusted. Look for ways to accumulate a skew that later penalises other traders or gives a discount.
-
3
Slippage and minimum output checks on every swap failure path
Business logic Read the lesson
Reports 85687, 85768, 85790, 85163 and 85718 show user slippage being ignored or bypassed when swaps fail or when no swap path is given. Walk each decrease, withdrawal and ADL path that can fall back to returning collateral directly, and check whether the user's minimum output is enforced in that branch. Also check the ADL path, which report 85676 says sets no slippage at all.
-
4
Oracle price validation: duplicates, zero, stale and cross-chain replay
Business logic Read the lesson
Reports 85801, 85776, 85774, 85747, 85782 and 85784 show several weaknesses in how signed prices are validated. Test the signer index uniqueness check, the handling of a zero secondary price, the Chainlink timestamp check and the sequencer status check, and whether signatures remain valid across a chain fork. These are separate checks in the same validation path, so a fix to one may not cover the others.
-
5
Order cancellation and retry error handling for keeper-supplied data
Business logic Read the lesson
Reports 85764, 85709, 85684, 85679, 85744 and 85738 show orders being cancelled or keepers losing gas when error handling meets malformed or unexpected data. Test the revert-reason decoder with malformed payloads, the retry conditions for invalid block numbers and empty prices, and whether a malicious callback can force cancellation of another user's order. Check that cancellation does not charge the user when the failure is not their fault.
-
6
Execution fee accounting under EIP-150 and gas estimation gaps
Business logic Read the lesson
Reports 85175, 85730, 85671, 85799 and 85795 show execution fees being miscomputed or misused by keepers. Test the gas-used calculation around external calls, the gas estimation for withdrawals that include swaps, and the fee left for a cancellation after a failed execution. Also check whether a keeper can deliberately under-supply gas so the main call fails but the cancellation succeeds and still pays.
-
7
Limit and stop order timing: free look and straddle requirements
Business logic Read the lesson
Reports 85157, 85706, 85181, 85681 and 85766 show limit and stop orders being exploitable or broken by block and price straddle rules. Test whether an order can be updated by a tiny amount to delay execution until a known future price, and whether stop orders fail when the price has already crossed the trigger. Check the primary and secondary price block requirements for both order types.
-
8
Market enabled and feature disabled checks across all activity paths
Business logic Read the lesson
Reports 85807, 85793, 85772, 85757 and 85754 show disabled markets and paused features being handled inconsistently. Test swap, ADL, deposit, withdrawal and order paths against a disabled market and against a paused collateral token, and check whether cancellation still works and whether fees keep accruing. Look for paths that skip the enabled check entirely.
-
9
Pool value and fee receiver share calculations
Business logic Read the lesson
Reports 85702, 85696, 85786, 85669 and 85721 show the pool value and fee receiver share being computed from the wrong portion of fees or a stale factor. Test the pool value calculation used for share minting and withdrawal, the fee receiver share on liquidation and position change, and the borrowing factor used in total fee calculations. Compare the sum of user charges against the sum of claimable amounts.
-
10
Collateral claim accounting across factor changes and repeated claims
Business logic Read the lesson
Reports 85791, 85693 and 85690 show the collateral claim path storing the wrong amount and the claimable factor being unset or compared incorrectly. Test claiming more than once for the same time slot while the claimable factor changes, and check whether the factor can be set by the config keeper at all. Look for other stored values that mix raw and factor-adjusted amounts.
-
11
Swap path handling: repeated markets, long paths and wrong prices
Business logic Read the lesson
Reports 85699, 85724 and 85153 show swap paths causing accounting breaks, gas exhaustion and wrong prices. Test a swap path where the end market appears more than once, a very long swap path that consumes most of the block gas, and swaps that follow a position order using a custom price. Check that pool accounting matches the tokens actually transferred at each hop.
-
12
Single-sided deposit auto-adjustment branches
Business logic Read the lesson
Reports 85762, 85760 and 85803 show the auto-adjustment logic for single-sided deposits using the wrong variable, the wrong inequality and a discarded assignment. Test single-sided deposits that trigger adjustment in both directions, including the first deposit into a market, and check the resulting long and short token amounts against the expected split. Look for other branches that compare a difference against a pool amount rather than the user amount.
-
13
Liquidation eligibility and ADL candidate checks at execution time
Business logic Read the lesson
Reports 85770, 85778, 85780, 85735 and 85674 show liquidation and ADL checks using stale state, counting PnL as collateral, or skipping per-position eligibility. Test whether a position that should be liquidatable in the current block passes because global fee state is updated later, and whether an ADL candidate can reduce its position between selection and execution. Check the block number source used for ADL timing on Arbitrum.
-
14
Config range validation and keeper-settable keys
Business logic Read the lesson
Reports 85805 and 85690 show a range check that does not check and a key that the config keeper cannot set. Test every config setter for values outside the documented bounds, and check that each key used by the protocol is actually in the keeper's allowed list. Look for other validation functions whose check was omitted or whose revert message is the only use of the value.
What was found and what it paid
Public bounties only; many reports disclose without the amount.
What was fixed
All reportsThe newest fixes, in our words. A fixed bug is not worth re-reporting, but a sibling feature, an older API version or a regression may be.
-
Virtual swap balances don't take into account token prices
The issue was not fixed; the project acknowledged it via code comments and may patch it later if it manifests.
Disclosed
-
Stop-loss orders do not become marketable orders
The code was updated to allow stop-loss orders to be executed if the trigger price was crossed.
Disclosed
-
Users can get impact pool discounts while also increasing the virtual impact pool skew
The virtual inventory should only be adjusted when it is actually consulted in the price impact calculation, and the tracking key should be based on the virtual market and token side rather than the individual token.
Disclosed
-
short side of getReservedUsd does not work for market that has the same collateral token
The recommendation is to apply both long and short calculations of reservedUsd with relation to the indexTokenPrice, but the sponsor argued it is a configuration issue and the fix was not implemented.
Disclosed
-
Limit swap orders can be used to get a free look into the future
The issue was fixed by changing the block number check from greater-than to greater-than-or-equal-to, so limit orders follow the same block range rules as market orders.
Disclosed
-
User can loose funds in case if swapping in DecreaseOrderUtils.processOrder will fail
The protocol should use a separate slippage parameter for the case when no swap occurs.
Disclosed
-
Swaps associated with position orders will use the wrong price
The issue was fixed by updating the code to use a single (min, max) price value per token instead of allowing multiple token types.
Disclosed
-
Keepers can steal additional execution fee from users
The code was fixed by adjusting the starting gas amount for each external call to account for EIP-150's 63/64 rule.
Disclosed
-
An Oracle Signer can never be removed even if he becomes malicious
The fix was to replace the call to _addOracleSignerActionKey with _removeOracleSignerActionKey.
Disclosed
-
MarketUtils.getFundingAmountPerSizeDelta() has a rounding logical error
The rounding mode of the divisor should be the opposite of the input roundUp mode, or the calculation should be restructured to multiply before dividing; the text states a fix was made.
Disclosed
-
Calc.boundedAdd used intitally but later regular subtraction used
The contracts should be updated to use bounded addition and subtraction for all calculations involving funding amount per size variables, or the funding fee factors should be updated to prevent the problematic state.
Disclosed
-
Pool amount adjustments for collateral decreases aren't undone if swaps are successful
The adjustment should be undone before returning; the project fixed it by updating the pool amount directly before the swap instead of using a temporary global variable.
Disclosed
-
Positions can still be liquidated even if orders to prevent it can't execute
Keep user collateral at a separate address from the pool address so liquidations must perform an actual transfer that may revert.
Disclosed
-
If block range it big and adl dosnt use currentblock in the order it will cause issues
The recommendation is to use the current block number instead of the oracle block number.
Disclosed
-
Malicious order keepers can trigger the cancellation of any order, with old blocks
The error handlers should check for these block-related errors and cause a revert rather than a cancellation; the text indicates a fix was made in a commit.
Disclosed