Trade or Trick?: Detecting and Characterizing Scam Tokens on Uniswap Decentralized Exchange

Pengcheng Xia, Haoyu Wang, Bingyu Gao, Weihang Su, Zhou Yu, Xiapu Luo, Chao Zhang, Xusheng Xiao, Guoai Xu

Abstract

Decentralized exchanges (DEXs) like Uniswap have revolutionized finance by providing permissionless access to liquidity. However, this lack of gatekeeping has also enabled a massive epidemic of "rug pull" scams. This paper presents a systematic measurement of these fraudulent activities using a hybrid detection framework. By analyzing over 20 million transaction events from Uniswap V2 between May and December 2020, we identified 10,920 scam tokens, representing approximately 50% of all tokens listed during that period. Our machine learning approach, utilizing a Random Forest classifier, achieves a precision of 96.45%, revealing that scammers have collectively siphoned at least $16 million from nearly 40,000 victims.

1. Introduction

Unlike Centralized Exchanges (CEXs) such as Coinbase or Binance, which require rigorous listing audits and "Know Your Customer" (KYC) checks, Uniswap operates as a decentralized protocol with no manual gatekeepers. While this promotes financial inclusion, it creates a "Wild West" environment where scammers can easily deploy fraudulent assets.

The most prevalent attack vector is the "Rug Pull." In this scenario, a scammer creates a new token and pairs it with a valuable asset (typically Ether) in a liquidity pool to enable trading. After artificially inflating the price through social media manipulation or wash trading, the scammer abruptly withdraws all liquidity from the pool, leaving investors with worthless tokens.

The Uniswap ecosystem and the mechanics of liquidity pools, where rug pulls occur through the sudden removal of liquidity.

2. Methodology

To address this problem, we developed a multi-stage detection framework designed to identify scams at scale:

  1. Data Collection: We synchronized over 20 million transaction events (mints, burns, and swaps) using the Geth API and The Graph protocol.
  2. Ground Truth Labeling: We manually curated a dataset of "official" tokens from CoinMarketCap and identified "obvious" scams that impersonated well-known brands or symbols.
  3. Guilt-by-Association Heuristic: We expanded our detection by flagging any token created by an address already linked to a known scam. This heuristic proved highly effective at identifying serial scammers.
  4. Machine Learning Classification: We trained a Random Forest model on 40 distinct features, including time-series data (token lifecycle), transaction ratios (mint-to-burn frequency), and investor profiles (experience levels of interacting addresses).

Our study analyzed the explosive growth of Uniswap V2 during the latter half of 2020. The dataset included 21,778 unique tokens and 25,131 liquidity pools. As shown in the figure below, the volume of token listings and transaction events increased exponentially, providing a fertile ground for malicious actors.

Trends in token listing, transaction events (mints, burns, swaps), and total liquidity/volume on Uniswap V2 during the study period.

4. Key Insights and Results

Our analysis revealed several startling characteristics of the Uniswap scam landscape:

  • The 50% Prevalence: Roughly half of all tokens listed during the study period were confirmed as scams. This suggests that for the average retail investor, the probability of encountering a fraudulent token is nearly equal to finding a legitimate one.
  • Technical Backdoors: Scammers frequently use smart contract "tricks." These include Honeypots, which use Solidity modifiers to allow users to buy a token but prevent them from selling it, and Hidden Minting, where creators secretly generate billions of new tokens to dump on the market.
  • Speed of Execution: Rug pulls are remarkably fast. Approximately 86% of scam liquidity pools were drained within 24 hours of creation, with 37% lasting less than an hour.
  • Detection Performance: The Random Forest classifier achieved a Precision of 96.45% and a Recall of 96.79%, demonstrating that scam behaviors are sufficiently distinct from legitimate project lifecycles to be identified automatically.

5. Conclusion

The scale of fraud on Uniswap underscores the urgent need for automated security tools in the DeFi ecosystem. While the permissionless nature of DEXs is a core strength, it also places a heavy burden of due diligence on investors. Our findings provide a benchmark for future research into decentralized security and highlight the importance of monitoring liquidity movements and contract code for malicious patterns.

Summary updated

BibTeX
@inproceedings{xia2022trade,
  author = {Pengcheng Xia and Haoyu Wang and Bingyu Gao and Weihang Su and Zhou Yu and Xiapu Luo and Chao Zhang and Xusheng Xiao and Guoai Xu},
  title = {{Trade or Trick?: Detecting and Characterizing Scam Tokens on Uniswap Decentralized Exchange}},
  booktitle = {SIGMETRICS (Abstracts)},
  year = {2022},
  doi = {10.1145/3489048.3522636},
}

Loading related content...

Figure