SCALM: Detecting Bad Practices in Smart Contracts Through LLMs

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Li, Zongwei, Li, Xiaoqi, Li, Wenkai, Wang, Xin
Formato: Preprint
Publicado: 2025
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866912864709640192
author Li, Zongwei
Li, Xiaoqi
Li, Wenkai
Wang, Xin
author_facet Li, Zongwei
Li, Xiaoqi
Li, Wenkai
Wang, Xin
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2502_04347
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle SCALM: Detecting Bad Practices in Smart Contracts Through LLMs
Li, Zongwei
Li, Xiaoqi
Li, Wenkai
Wang, Xin
Computation and Language
Artificial Intelligence
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.
title SCALM: Detecting Bad Practices in Smart Contracts Through LLMs
topic Computation and Language
Artificial Intelligence
url https://arxiv.org/abs/2502.04347