With the rapid development of blockchain technology, smart contract security has become a critical challenge. Existing smart contract vulnerability detection methods face three main issues: (1) Insufficient quality of datasets, lacking detailed explanations and precise vulnerability locations. (2) Limited adaptability of large language models (LLMs) to the smart contract domain, as most LLMs are pre-trained on general text data but minimal smart contract-specific data. (3) Lack of high-quality explanations for detected vulnerabilities, as existing methods focus solely on detection without clear explanations. These limitations hinder detection performance and make it harder for developers to understand and fix vulnerabilities quickly, potentially leading to severe financial losses. To address these problems, we propose Smart-LLaMA, an advanced detection method based on the LLaMA language model. First, we construct a comprehensive dataset covering four vulnerability types with labels, detailed explanations, and precise vulnerability locations. Second, we introduce Smart Contract-Specific Continual Pre-Training, using raw smart contract data to enable the LLM to learn smart contract syntax and semantics, enhancing their domain adaptability. Furthermore, we propose Explanation-Guided Fine-Tuning, which fine-tunes the LLM using paired vulnerable code and explanations, enabling both vulnerability detection and reasoned explanations. We evaluate explanation quality through LLM and human evaluation, focusing on Correctness, Completeness, and Conciseness. Experimental results show that Smart-LLaMA outperforms state-of-the-art baselines, with average improvements of 6.49% in F1 score and 3.78% in accuracy, while providing reliable explanations.
Automated Vulnerability Injection in Smart Contracts Using Large Language Models
Università degli Studi di Napoli Federico II(那不勒斯费德里科二世大学);Gran Sasso Science Institute (GSSI)(格兰萨索科学研究所);University of Coimbra(科英布拉大学);College of Computing and Informatics, University of North Carolina at Charlotte(北卡罗来纳大学夏洛特分校计算与信息学院)
Evaluating LLaMA 3.2 for Software Vulnerability Detection
Research Group on Intelligent Engineering and Computing for Advanced Innovation and Development (GECAD), School of Engineering of the Polytechnic of Porto(波尔图理工学院工程学院);INESC TEC/Polytechnic of Porto - School of Engineering(INESC TEC/波尔图理工学院工程学院)
ParaVul: A Parallel Large Language Model and Retrieval-Augmented Framework for Smart Contract Vulnerability Detection
School of Automation, Guangdong University of Technology(广东科技大學自動化學院);College of Computer Science and Technology, Nanjing University of Aeronautics and Astronautics(南京航空航天大學計算機科學與技術學院);School of Cyberspace Science and Technology, Beijing Jiaotong University(北京交通大學網絡空間科學與技術學院);School of Computer Science and Technology, Guangdong University of Technology(廣東科技大學計算機科學與技術學院);College of Computing and Data Science, Nanyang Technological University(南洋理工大學計算與數據科學學院)
CodeBC: A More Secure Large Language Model for Smart Contract Code Generation in Blockchain
State Key Laboratory of Complex & Critical Software Environment, Beihang University(复杂与关键软件环境国家重点实验室,北京航空航天大学);School of Artificial Intelligence, Beihang University(人工智能学院,北京航空航天大学);Beijing Advanced Innovation Center for Future Blockchain and Privacy Computing(未来区块链与隐私计算北京先进创新中心);Beijing Academy of Blockchain and Edge Computing, BABEC(区块链与边缘计算北京研究院,BABEC)
Two Timin': Repairing Smart Contracts With A Two-Layered Approach
Westborough High School(韦斯特伯勒高中);Sunset High School(森塞特高中);Granite Bay High School(格拉尼特贝高中);Lakeside School(湖滨学校);Bellarmine College Preparatory(贝拉明大学预科学校);Robbinsville High School(罗宾斯维尔高中);University of Illinois(伊利诺伊大学)
LLM4Vuln: A Unified Evaluation Framework for Decoupling and Enhancing LLMs' Vulnerability Reasoning
Nanyang Technological University, Singapore(南洋理工大学);The Hong Kong University of Science(香港科学与技术大学);MetaTrust Labs(MetaTrust实验室);Singapore Management University, Singapore(新加坡管理学院);University of Oregon, Eugene, OR, USA(俄勒冈大学)
Frequency-Aware Continual Learning for Smart Contract Vulnerability Detection with Large Language Models
School of Automation, Guangdong University of Technology(广东工业大学自动化学院);School of Computer Science and Technology, Guangdong University of Technology(广东工业大学计算机科学与技术学院);College of Computer Science and Technology, Nanjing University of Aeronautics and Astronautics(南京航空航天大学计算机科学与技术学院);Department of Computer Science, City University of Hong Kong (Dongguan)(香港城市大学(东莞)计算机科学系);College of Cyber Security, Jinan University(暨南大学网络安全学院);Guangdong Institute of Science and Technology Information(广东省科技情报研究所);Department of Electrical and Computer Engineering, Sungkyunkwan University(成均馆大学电气与计算机工程系)
Let the Trial Begin: A Mock-Court Approach to Vulnerability Detection using LLM-Based Agents
School of Computing and Information Systems, Singapore Management University, Singapore(计算与信息系统学院,新加坡管理大学,新加坡);School of Computer Science, University of Sydney, Australia(计算机科学学院,悉尼大学,澳大利亚)
Revealing the Intrinsic Ethical Vulnerability of Aligned Large Language Models
Department of Electrical and Electronic Engineering(电子与电气工程系);The Hong Kong Polytechnic University(香港理工大学);School of Electronics and Information(电子与信息学院);Northwestern Polytechnical University(西北工业大学)
SAEL: Leveraging Large Language Models with Adaptive Mixture-of-Experts for Smart Contract Vulnerability Detection
Institute of Software, Chinese Academy of Sciences(中国科学院软件研究所);University of Chinese Academy of Sciences(中国科学院大学);State Key Laboratory of Computer Science, Institute of Software, Chinese Academy of Sciences(中国科学院软件研究所计算机科学技术国家重点实验室)
Knowdit: Agentic Smart Contract Vulnerability Detection with Auditing Knowledge Summarization
Nanyang Technological University(南洋理工大学);National Superior College for Engineers, Beihang University(北京航空航天大学高等工程学院);Bitslab;The Chinese University of Hong Kong(香港中文大学)
ESCORT: Ethereum Smart COntRacTs Vulnerability Detection using Deep Neural Network and Transfer Learning
University of Würzburg(维尔茨堡大学);University of California, San-Diego(加利福尼亚大学圣地亚哥分校);Technical University of Darmstadt(达姆施塔特工业大学);University of California, San Diego(加利福尼亚大学圣地亚哥分校)