Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.mobula.io/llms.txt

Use this file to discover all available pages before exploring further.

Returns

getEventLabels
EventLabelConnection!
Paginated list of MEV labels for the pair. See EventLabelConnection.

Arguments

id
String!
required
Pair identifier in pairAddress:networkId form (e.g. 0xabc…:56).
limit
Int
Max labels per page. Clamped to [1, 100]. Default 50.
cursor
String
Pagination cursor from previous response.
direction
RankingDirection
DESC (default) or ASC. See RankingDirection.

Behavior

  • EventLabel.label is FrontRun (mapped from swap_type=MEV) or Sandwiched (mapped from swap_type=MEV_SANDWICHED). See EventLabelType.
  • For FrontRun, data.index is the leg index: 0 = front-run (buy leg), 1 = back-run (sell leg). Derived from the sign of the swap’s raw_amount0.
  • Drained amounts are unsigned magnitudes (sign stripped at the API edge). Mobula stores raw signed pool deltas; the front-run / sandwich swap amounts are the closest proxy for the “amount drained in the attack”.
  • Pagination is keyset on (date, COALESCE(swaps.index, 0), transaction_hash) so legacy NULL-index rows still page correctly.

Example

query GetEventLabels {
  getEventLabels(id: "0x16b9a82891338f9ba80e2d6970fdda79d1eb0dae:56", limit: 50, direction: ASC) {
    cursor
    items {
      id
      label
      logIndex
      networkId
      timestamp
      transactionIndex
      transactionHash
      data {
        __typename
        ... on FrontRunLabelData { index token0DrainedAmount token1DrainedAmount }
        ... on SandwichedLabelData { token0DrainedAmount token1DrainedAmount }
      }
    }
  }
}

Playground