defirisk.co
rubric v1.7.0

LP token balanceOf used for pricing

GMX v2 (GMX Synthetics)'s assessment for RD-F-061 — scored green on the v1.7.0 rubric. The evidence below is the curator's reasoning for this score.

Evidence summary #

GMX v2 does not use balanceOf-based LP token pricing. Trading prices for underlying assets use Chainlink Data Streams via GmOracleProvider — not ERC-20 balanceOf calls. GM (market) tokens represent pool shares but their redemption value is derived from on-chain pool accounting in DataStore, not from a balanceOf price call. No balanceOf-in-price-path pattern found.

Detail #

Oracle.sol price delivery path: GmOracleProvider (DON-signed minPrice/maxPrice) and ChainlinkPriceFeedProvider (latestRoundData answer). Neither path uses ERC-20 balanceOf. GM token accounting uses MarketPoolValueInfo which aggregates token balances from DataStore records (not external balanceOf calls susceptible to donation attacks).

Sources #

  • Docs
    GMX v2 ContractsGMX v2 GM pool architecture — DataStore-based pool accountingretrieved 2026-05-05
  • GitHub
    Oracle.solOracle.sol — no balanceOf in price pathretrieved 2026-05-05

Methodology #

Determine whether protocol pricing is derived from the `balanceOf` of LP tokens in a contract (manipulable by direct token transfer / donation).

See the full factor methodology and distribution across all protocols →

rubric_version v1.7.0 protocol gmx-v2 factor RD-F-061 score green collected_at 2026-05-05 11:15:06