Skip to content
Crypto.world

Research

More to Extract: Discovering MEV by Token Contract Analysis

Existing MEV-discovery research analyzes application-layer contracts (DEX pools, lending protocols) or attacker-deployed contracts, but largely ignores the token contracts themselves.

More to Extract: Discovering MEV by Token Contract Analysis
arXiv
2603.07996
Published
2026-03-09
Authors
Jiaqi Chen, Yuzhe Tang, Yue Duan

AI summary

Overview

Research area: Blockchain security and DeFi economics — specifically maximal extractable value (MEV) discovery through static analysis of token smart contracts.

Technical level: Advanced. The paper relies on formal definitions of token state transitions, inter-procedural data-flow analysis, symbolic constraint generation, and mempool-level transaction bundling. Readers should be comfortable with ERC-20 mechanics, AMM pricing invariants, and static program analysis.

Scope (one sentence): The paper defines and detects "tMEV" — extractable value that arises from non-standard token supply-control functions composed with price-insensitive exchange venues — and builds a static analyzer (tSCAN) plus an online searcher (tSEARCH) to find and exploit it.

What This Paper Is About

Existing MEV-discovery research analyzes application-layer contracts (DEX pools, lending protocols) or attacker-deployed contracts, but largely ignores the token contracts themselves. That blind spot matters because non-standard token functions such as AMPL's rebase can change the balances of many accounts at once — including a pool's — without changing the pool's quoted price. The paper's goal is to detect such token supply-control functions automatically and turn them into concrete, profitable transaction sequences against live blockchain state.

Key Contributions

  1. A new problem formulation — tMEV. The paper identifies an unstudied class of MEV arising from the composition of non-standard tokens (supply-control functions) and price-insensitive exchanges, and shows prior work's scopes (Table 1: Nyx, Foray/DeFiTainter target pools; SmartCAT targets attacker contracts) exclude it.

  2. tSCAN, a static token-contract analyzer. Built on Slither, it constructs a token System Dependency Graph (tSDG) capturing intra-procedural control/data dependencies and inter-procedural data dependencies, then explores reachable execution paths (tPaths) that update balances across multiple accounts. It operationalizes two formal definitions: TSC-1 (total supply changes) and TSC-2 (synchronized multi-account balance updates under a shared function).

  3. tSEARCH, a constraint-centric MEV searcher. It generates static constraints from discovered TSC functions and template patterns (D1+/D1-, D2+/D2-, B2+/B2-), refines them with runtime information from observed unconfirmed victim transactions, and solves them into transaction bundles. It is designed to track multiple victim transactions.

  4. Real-world evaluation and artifacts. A prototype implementation and a replay-based evaluation of profitability, token-landscape characterization, and detection accuracy, including a manually labeled ground-truth dataset.

Main Findings

  • Large unrealized profit gap: Replaying real-world transactions, the proposed tSEARCH extracts 10× more profit than observed MEV activity on Ethereum.
  • Quantified what-if extraction: A what-if analysis shows tSEARCH extracting $2.28 × 10⁶ from 7,030 deployed pools.
  • Searchers miss whole strategy classes: Observed mainnet transactions entirely lack several highly profitable tMEV strategies — sandwich-based tMEV, strategies instantiated through non-standard price-insensitive pools, and tMEV locking and unlocking.
  • Token landscape is diverse: 5,434 TSC tokens were identified out of 22,279 collected token contracts, exhibiting explicit triggers via one or multiple function calls, implicit triggers through blockchain state changes, and updates affecting one or multiple accounts.
  • Detection accuracy: tSCAN achieves a false-positive rate of 1/53 = 1.8% and a false-negative rate of 1/247 = 0.40% on the manually labeled ground-truth dataset.
  • Why the naive sandwich fails (Case B1): Sandwiching a rebase on a price-sensitive CPMM pool is unprofitable, because rebase moves both the trader's holdings and the pool's quoted price, and the two effects cancel out.
  • Why price insensitivity flips the result (Case D1+): Against a price-insensitive pool q, the same sequence is profitable — the trader's rebased T_Y balance grows while the exchange price stays fixed, so the extra T_Y converts to T_X at the original price.
  • Root cause separation: In a Uniswap V3-style pool, reserveY ≠ Ty.balanceOf(p), so a direct rebase that changes the pool's token balance leaves the stored reserve — and therefore the price — untouched.
  • Empirical tool comparison: Fed refactored variants rebaseY-p (price-dependent, one extra line) and rebaseY-q (price-independent), Nyx produced a false positive on the unprofitable B1 case and a false negative on the profitable D1+ case. Foray cannot detect rebase-like functions (they invoke no standard token operations) and targets cycle-based patterns that D1+ does not form; DeFiTainter depends on manual labeling of manipulable elements and sensitive operations, limiting scalability; SmartCAT analyzes only attacker contracts and cannot see MEV sequences that interleave attacker and victim transactions.
  • Engineering caveat: Only Nyx could be tested empirically; the other tools were either not open source or presented setup challenges, per the paper.

Methodology in Plain English

The pipeline has an offline half and an online half.

Offline (analysis). Given a deployed token contract, tSCAN builds a dependency graph of the contract. It seeds the analysis from the return statements of balanceOf, works backward to find where the returned values originate, and follows state variables across function boundaries to their definitions elsewhere in the contract. From this graph it looks for execution paths that can move many accounts' balances at once — the signature of a supply-control mechanism. The output is a set of candidate TSC functions plus "static" constraints in which runtime values are left symbolic. Separately, the authors manually instantiate a set of price-insensitive venues from real DeFi applications, notably lending protocols such as Aave (typically fixed-price) and AMMs such as Uniswap V3 and V4.

Online (search). tSEARCH watches the mempool for unconfirmed victim transactions. When one touches a TSC function on a token with a matching price-insensitive venue, tSEARCH fills the symbolic holes with live values, solves the constraints, and emits a transaction bundle — front-run, victim transaction, back-run — that harvests the value. Templates cover both positive and negative supply changes (D1+/D2+ and D1-/D2-, plus an extended D1-/D2- variant that starts from a third token T_Z), and arbitrage-style backrunning variants (B2+/B2-).

Evaluation. The team replayed mainnet transactions to compare observed MEV activity against what tSEARCH would have extracted, characterized how many real tokens implement TSC, and measured detector accuracy against a manually labeled ground truth. The prototype is built on Slither with a Python runtime that talks to Ethereum over RPC.

Why This Matters

Impact on research. The paper argues that the layer at which analysis is performed changes what MEV is discoverable. Nyx-style static analysis within a single contract layer cannot see dependencies that only materialize at runtime across layers — for example, the argument dY2 linking a back-run swap to a victim rebase in a different contract. It also shows that profitable MEV need not form a cycle in a token-flow graph, undercutting a common structural assumption in prior work. In effect, the token contract becomes a first-class analysis target for MEV rather than an assumed-standard substrate.

Real-world applications:

  • MEV searchers and builders gain a detector for a strategy class that, per the paper's measurements, is currently absent from mainnet activity.
  • Token issuers and auditors get a way to flag supply-control mechanisms that create extractable value for arbitrageurs, and to reason about pairing them with price-insensitive venues.
  • DeFi protocol and AMM designers get evidence that the distinction between stored reserves and actual token balances (reserveY ≠ balanceOf(p)) has direct financial consequences when interacting with rebasing or otherwise non-standard tokens.
  • Users and integrators of tokens such as AMPL can see concretely how a supply event can transfer value away from passive holders toward whoever orders transactions around it.

Industry relevance. MEV directly affects validator revenue and, as the paper frames it, the incentive compatibility and consensus security of the blockchain itself. Through proposer-builder separation, searchers compete for ordering; a systematically unexploited strategy class means both a profit opportunity for searchers and an unaccounted risk for token holders. The Slither-based prototype suggests the detection could be integrated into existing analysis tooling rather than requiring a bespoke stack.

Future Directions

  • Broadening the venue model. The paper manually instantiates price-insensitive venues (Aave-style lending, Uniswap V3/V4 cases). Automating discovery of new price-insensitive venues — and of the "uncommon" operations the authors mention in §6.2 — is a natural extension.
  • Scaling constraint solving across many victim transactions and pools. tSEARCH is designed to track multiple victim transactions; how well constraint solving holds up under mempool load and larger bundles is an open engineering question.
  • Generalizing TSC detection. The definitions cover TSC-1 and TSC-2, and the corpus spans 22,279 token contracts. Extending to other token standards and to cross-contract supply-control logic beyond a single token contract is unexplored in the provided content.
  • From discovery to defense. The paper is framed around extraction. Turning tSCAN's tPaths into warnings or mitigations for token issuers, or into builder-side protections for users, is a logical next step — as is measuring how much of the 10× gap is actually capturable under real competition and gas costs. (The provided content reports "low performance overhead" qualitatively but does not state a gas or latency figure.)

Target Audience

This paper is most valuable to MEV researchers and searcher engineers, smart-contract security auditors and tooling developers, DeFi protocol designers working with rebasing or non-standard tokens, and academic groups working on program analysis applied to blockchains. It assumes familiarity with AMM invariants, dependency graphs, and Ethereum transaction ordering; readers without that background will find the formal definitions (TSC-1, TSC-2, TEX, PITEX) and the case analysis of B1 versus D1+ the most accessible entry points.

Authors’ abstract

This paper tackles the discovery of tMEV, that is, the Maximal Extractable Value on blockchains that arises from Token smart contracts. This scope differs from the existing MEV-discovery research, which analyzes application-layer contracts or attacker contracts, but ignores the wide and diverse range of token contracts. This paper presents a pipeline of techniques for tMEV discovery, including tSCAN, a static analysis tool for identifying non-standard supply-control…

The full abstract on arXiv
Read the original paper