arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.06348cs.CRcs.AI

AiRacleX:通过LLM驱动的知识挖掘和提示生成自动检测价格预言机操纵

AiRacleX: Automated Detection of Price Oracle Manipulations via LLM-Driven Knowledge Mining and Prompt Generation

Institute of High Performance Computing (IHPC), Agency for Science, Technology and Research (A*STAR)(高性能计算研究所(科技研究局));Singapore Management University(新加坡管理大学)

Bo Gao, Yuan Wang, Qingsong Wei, Yong Liu, Rick Siow Mong Goh, David Lo

AI总结:

针对DeFi价格预言机操纵检测依赖专家手动工作的问题,提出AiRacleX框架,通过LLM驱动知识挖掘与提示生成自动检测,实验显示最佳组合召回率较GPTScan提升2.58倍,还能以开源模型替代商业模型提升隐私安全。

摘要:

去中心化金融(DeFi)应用依赖准确的价格预言机确保安全交易,但这些预言机极易受到操纵,使攻击者能利用智能合约漏洞进行不公平的资产估值并获取经济利益。传统上,检测此类操纵依赖经验丰富专家的手动工作,存在重大挑战。本文提出一种新颖的LLM驱动框架,通过利用不同LLM模型(LLMs)的互补优势自动检测价格预言机操纵。我们的方法始于特定领域知识提取,其中一个LLM模型从顶级学术论文中合成关于价格预言机漏洞的精准见解,消除了开发者或审计员对深厚专业知识的需求。这些知识构成第二个LLM模型生成结构化、上下文感知的思维链提示的基础,该提示引导第三个LLM模型准确识别智能合约中的操纵模式。我们通过对2021至2023年的46个真实世界DeFi攻击或项目中的60个已知漏洞进行实验,验证了框架的有效性。AiRacleX确定的最佳LLM组合(Haiku-Haiku-4o-mini)与最先进工具GPTScan相比,召回率提升2.58倍(0.667 vs 0.259),同时保持相当的精度。此外,我们的框架证明了用开源替代方案取代商业模型的可行性,提升了开发者的隐私和安全性。

英文摘要:

Decentralized finance (DeFi) applications depend on accurate price oracles to ensure secure transactions, yet these oracles are highly vulnerable to manipulation, enabling attackers to exploit smart contract vulnerabilities for unfair asset valuation and financial gain. Detecting such manipulations traditionally relies on the manual effort of experienced experts, presenting significant challenges. In this paper, we propose a novel LLM-driven framework that automates the detection of price oracle manipulations by leveraging the complementary strengths of different LLM models (LLMs). Our approach begins with domain-specific knowledge extraction, where an LLM model synthesizes precise insights about price oracle vulnerabilities from top-tier academic papers, eliminating the need for profound expertise from developers or auditors. This knowledge forms the foundation for a second LLM model to generate structured, context-aware chain of thought prompts, which guide a third LLM model in accurately identifying manipulation patterns in smart contracts. We validate the effectiveness of framework through experiments on 60 known vulnerabilities from 46 real-world DeFi attacks or projects spanning 2021 to 2023. The best performing combination of LLMs (Haiku-Haiku-4o-mini) identified by AiRacleX demonstrate a 2.58-times improvement in recall (0.667 vs 0.259) compared to the state-of-the-art tool GPTScan, while maintaining comparable precision. Furthermore, our framework demonstrates the feasibility of replacing commercial models with open-source alternatives, enhancing privacy and security for developers.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑