从编程漏洞到数百万美元骗局:Uniswap 上陷门代币的分析
From Programming Bugs to Multimillion-Dollar Scams: An Analysis of Trapdoor Tokens on Uniswap
AI总结:
本文研究了Uniswap上导致数十亿美元损失的Trapdoor诈骗代币,提出了系统分类与检测工具TrapdoorAnalyser,并构建了首个3万规模代币数据集以训练高精度机器学习检测模型。
摘要:
我们在本文中调查了一种近期出现的名为 Trapdoor 的诈骗 ERC-20 代币,从 2020 年到 2023 年,该代币在以太坊最大的去中心化交易所 Uniswap 上已导致投资者损失数十亿美元。本质上,Trapdoor 代币允许用户购买,但通过在其智能合约中嵌入逻辑漏洞和/或仅限所有者的功能来阻止用户出售。通过手动检查多个 Trapdoor 样本,我们建立了首个 Trapdoor 代币的系统分类,以及诈骗者用于嵌入和隐藏恶意代码的综合技术列表,并附带对代表性诈骗合约的详细分析。特别地,我们开发了 TrapdoorAnalyser,这是一种细粒度检测工具,它生成并交叉检查买卖测试的错误日志以及来自合约语义检查的嵌入式 Trapdoor 指标列表,以可靠地识别 Trapdoor 代币。TrapdoorAnalyser 不仅在准确率上超越了最先进的商业工具 GoPlus,还提供了带有完整解释的恶意代码追踪,这是大多数现有工具所缺乏的。使用 TrapdoorAnalyser,我们在 UniswapV2 上构建了首个包含约 30,000 个 Trapdoor 和非 Trapdoor 代币的数据集,这使我们能够训练几种机器学习算法,即使对于没有可用 Solidity 源代码的 Trapdoor 代币,也能以极高的准确率进行检测。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。