arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.04347cs.CLcs.AI
收藏

SCALM:通过LLMs检测智能合约中的不良实践

SCALM: Detecting Bad Practices in Smart Contracts Through LLMs

Zongwei Li, Xiaoqi Li, Wenkai Li, Xin Wang(作者)

Zongwei Li, Xiaoqi Li, Wenkai Li, Xin Wang

AI总结:

SCALM通过结合Step-Back提示和RAG技术,有效检测智能合约中的不良实践,优于现有工具。

摘要:

随着以太坊平台持续成熟并获得广泛应用,保持智能合约编写实践的高标准至关重要。虽然智能合约中的不良实践可能不会直接导致安全问题,但它们确实提高了遇到问题的风险。因此,为了理解和避免这些不良实践,本文首次系统研究了智能合约中的不良实践,深入探讨了超过35个具体问题。具体而言,我们提出了一种基于大型语言模型(LLMs)的框架SCALM。它结合了Step-Back提示和检索增强生成(RAG)来有效识别和解决各种不良实践。我们使用多种LLM和数据集进行的广泛实验表明,SCALM在检测智能合约中的不良实践方面优于现有工具。

英文摘要:

As the Ethereum platform continues to mature and gain widespread usage, it is crucial to maintain high standards of smart contract writing practices. While bad practices in smart contracts may not directly lead to security issues, they do elevate the risk of encountering problems. Therefore, to understand and avoid these bad practices, this paper introduces the first systematic study of bad practices in smart contracts, delving into over 35 specific issues. Specifically, we propose a large language models (LLMs)-based framework, SCALM. It combines Step-Back Prompting and Retrieval-Augmented Generation (RAG) to identify and address various bad practices effectively. Our extensive experiments using multiple LLMs and datasets have shown that SCALM outperforms existing tools in detecting bad practices in smart contracts.

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

↑