一句话:提出首个无需标注数据的LLM零样本思维链方法PonziSleuth,检测智能合约庞氏骗局,平衡准确率达96.06%。
智能合约中的庞氏骗局给 DeFi 与 Web3 带来严重金融风险,但现有检测方法(如 PonziGuard)依赖大量标注数据,难以识别未见过的骗局,可靠性与泛化性受限。本文提出 PonziSleuth,首个由大语言模型驱动、无需标注训练数据的庞氏合约检测方法。它利用 LLM 的语言理解能力分析智能合约源代码,核心是一种新颖的两步零样本思维链(chain-of-thought)提示技术。作者在基准数据集与真实合约上进行了广泛评估:使用 GPT-3.5-turbo 达到 96.06% 的平衡检测准确率,LLAMA3 为 93.91%,Mistral 为 94.27%。在真实场景中,PonziSleuth 从 Etherscan 于 2024 年 3 月验证的 4597 份合约中成功识别出 15 个新的庞氏骗局,假阴性率为 0%,假阳性率为 0.29%,表明其能发现多样且新颖的骗局,推动 LLM 在区块链安全与金融诈骗治理中的应用。
Smart contracts, self-executing agreements directly encoded in code, are fundamental to blockchain technology, especially in decentralized finance (DeFi) and Web3. However, the rise of Ponzi schemes in smart contracts poses significant risks, leading to substantial financial losses and eroding trust in blockchain systems. Existing detection methods, such as PonziGuard, depend on large amounts of labeled data and struggle to identify unseen Ponzi schemes, limiting their reliability and generalizability. In contrast, we introduce PonziSleuth, the first LLM-driven approach for detecting Ponzi smart contracts, which requires no labeled training data. PonziSleuth utilizes advanced language understanding capabilities of LLMs to analyze smart contract source code through a novel two-step zero-shot chain-of-thought prompting technique. Our extensive evaluation on benchmark datasets and real-world contracts demonstrates that PonziSleuth delivers comparable, and often superior, performance without the extensive data requirements, achieving a balanced detection accuracy of 96.06% with GPT-3.5-turbo, 93.91% with LLAMA3, and 94.27% with Mistral. In real-world detection, PonziSleuth successfully identified 15 new Ponzi schemes from 4,597 contracts verified by Etherscan in March 2024, with a false negative rate of 0% and a false positive rate of 0.29%. These results highlight PonziSleuth's capability to detect diverse and novel Ponzi schemes, marking a significant advancement in leveraging LLMs for enhancing blockchain security and mitigating financial scams.
DOI 原文 ·
@inproceedings{paperbot8404,
title = {Semantic Sleuth: Identifying Ponzi Contracts via Large Language Models},
author = {Cong Wu and Jing Chen and Ziwei Wang and Ruichao Liang and Ruiying Du},
booktitle = {ASE},
year = {2024},
doi = {10.1145/3691620.3695055}
}