Papers
Topics
Authors
Recent
Search
2000 character limit reached

From Programming Bugs to Multimillion-Dollar Scams: An Analysis of Trapdoor Tokens on Uniswap

Published 9 Sep 2023 in cs.CR | (2309.04700v4)

Abstract: We investigate in this work a recently emerged type of scam ERC-20 token called Trapdoor, which has cost investors billions of US dollars on Uniswap, the largest decentralised exchange on Ethereum, from 2020 to 2023. In essence, Trapdoor tokens allow users to buy but preventing them from selling by embedding logical bugs and/or owner-only features in their smart contracts. By manually inspecting a number of Trapdoor samples, we established the first systematic classification of Trapdoor tokens and a comprehensive list of techniques that scammers used to embed and conceal malicious codes, accompanied by a detailed analysis of representative scam contracts. In particular, we developed TrapdoorAnalyser, a fine-grained detection tool that generates and crosschecks the error-log of a buy-and-sell test and the list of embedded Trapdoor indicators from a contract-semantic check to reliably identify a Trapdoor token. TrapdoorAnalyser not only outperforms the state-of-the-art commercial tool GoPlus in accuracy, but also provides traces of malicious code with a full explanation, which most of the existing tools lack. Using TrapdoorAnalyser, we constructed the very first dataset of about 30,000 Trapdoor and non-Trapdoor tokens on UniswapV2, which allows us to train several machine learning algorithms that can detect with very high accuracy even Trapdoor tokens with no available Solidity source codes.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (20)
  1. Labeled Trapdoor dataset (2023), https://github.com/bsdp2023/trapdoor_data
  2. Binance: Binance Exchange (Jul 2017), https://www.binance.com/en
  3. Blocktelegraph: The Rise of decentralized exchanges: Pros and cons unveiled (2023), https://blocktelegraph.io/decentralized-exchanges-pros-and-cons/
  4. Brownie: Python-based development and testing framework for Ethereum smart contracts (2019), https://github.com/eth-brownie/brownie
  5. Chainanalysis: The 2022 Crypto Crime Report. http://demo.chainalysis.com/2022- crypto-crime-report/ (2022), accessed: 2022-04-24
  6. Coinbase: Coinbase Exchange (May 2012), https://www.coinbase.com/au
  7. Coindesk: Centralized exchange (CEX) vs. decentralized exchange (DEX): What’s the difference? (2022)
  8. Coingecko: Decentralized exchanges (2023), https://www.coingecko.com/en/exchanges/decentralized
  9. Coingecko: Uniswapv2 Ethereum (2023), https://www.coingecko.com/en/exchanges/uniswap-v2-ethereum
  10. Coinmarketcap: Total Cryptocurrency Market Cap (2021), https://coinmarketcap.com/charts/
  11. Cointelegraph: Centralized vs. decentralized crypto exchanges, https://cointelegraph.com/learn/centralized-vs-decentralized-crypto-exchanges
  12. Defillama: UniswapV2 Folks (2023), https://defillama.com/forks
  13. Ethereum: ERC-20 Token Standard (2015), https://ethereum.org/en/developers/docs/standards/tokens/erc-20/
  14. Ethereum: Solidity (2015), https://docs.soliditylang.org/en/v0.8.16/
  15. KuCoin: Kucoin Exchange (Sep 2017), https://www.kucoin.com
  16. Pancakeswap: Pancakeswap (2023), https://pancakeswap.finance/
  17. Sushiswap: Sushiswap (2023), https://www.sushi.com/
  18. Uniswap: Uniswap (2023), https://uniswap.org/
  19. Uniswap: UniswapV2 source code (2023), https://github.com/Uniswap/v2-core/
  20. Web3Python: Python library for interacting with Ethereum (2016), https://github.com/ethereum/web3.py
Citations (5)

Summary

No one has generated a summary of this paper yet.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Continue Learning

We haven't generated follow-up questions for this paper yet.

Collections

Sign up for free to add this paper to one or more collections.

Tweets

Sign up for free to view the 3 tweets with 0 likes about this paper.