Robust Vulnerability Detection in Solidity-Based Ethereum Smart Contracts Using Fine-Tuned Transformer Encoder Models

被引:0
|
作者
Le, Thi-Thu-Huong [1 ,2 ]
Kim, Jaehyun [2 ]
Lee, Sangmyeong [3 ]
Kim, Howon [3 ]
机构
[1] Pusan Natl Univ, Blockchain Platform Res Ctr, Busan 609735, South Korea
[2] Pusan Natl Univ, IoT Res Ctr, Busan 609735, South Korea
[3] Pusan Natl Univ, Sch Comp Sci & Engn, Busan 609735, South Korea
来源
IEEE ACCESS | 2024年 / 12卷
关键词
Smart contracts; Codes; Transformers; Security; Solid modeling; Analytical models; Training; Encoding; Biological system modeling; Large language models; Ethereum smart contracts; large language models; multi-class imbalance; multi-class classification; smart contract vulnerability; solidity code;
D O I
10.1109/ACCESS.2024.3482389
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
The rapid expansion of blockchain technology, particularly Ethereum, has driven widespread adoption of smart contracts. However, the security of these contracts remains a critical concern due to the increasing frequency and complexity of vulnerabilities. This paper presents a comprehensive approach to detecting vulnerabilities in Ethereum smart contracts using pre-trained Large Language Models (LLMs). We apply transformer-based LLMs, leveraging their ability to understand and analyze Solidity code to identify potential security flaws. Our methodology involves fine-tuning eight distinct pre-trained LLM models on curated datasets varying in types and distributions of vulnerabilities, including multi-class vulnerabilities. The datasets-SB Curate, Benmark Solidity Smart Contract, and ScrawID-were selected to ensure a thorough evaluation of model performance across different vulnerability types. We employed over-sampling techniques to address class imbalances, resulting in more reliable training outcomes. We extensively evaluate these models using precision, recall, accuracy, F1 score, and Receiver Operating Characteristics (ROC) curve metrics. Our results demonstrate that the transformer encoder architecture, with its multi-head attention and feed-forward mechanisms, effectively captures the nuances of smart contract vulnerabilities. The models show promising potential in enhancing the security and reliability of Ethereum smart contracts, offering a robust solution to challenges posed by software vulnerabilities in the blockchain ecosystem.
引用
收藏
页码:154700 / 154717
页数:18
相关论文
共 39 条
  • [1] Automated Smart Contract Vulnerability Detection using Fine-tuned Large Language Models
    Yang, Zhiju
    Man, Gaoyuan
    Yue, Songqing
    6TH INTERNATIONAL CONFERENCE ON BLOCKCHAIN TECHNOLOGY AND APPLICATIONS, ICBTA 2023, 2023, : 19 - 23
  • [2] ContractWard: Automated Vulnerability Detection Models for Ethereum Smart Contracts
    Wang, Wei
    Song, Jingjing
    Xu, Guangquan
    Li, Yidong
    Wang, Hao
    Su, Chunhua
    IEEE TRANSACTIONS ON NETWORK SCIENCE AND ENGINEERING, 2021, 8 (02): : 1133 - 1144
  • [3] Online aggression detection using ensemble techniques on fine-tuned transformer-based language models
    Chinivar S.
    Roopa M.S.
    Arunalatha J.S.
    Venugopal K.R.
    International Journal of Computers and Applications, 2024, 46 (08) : 567 - 579
  • [4] Vulnerability Detection and Classification of Ethereum Smart Contracts Using Deep Learning
    Bani-Hani, Raed M.
    Shatnawi, Ahmed S.
    Al-Yahya, Lana
    FUTURE INTERNET, 2024, 16 (09)
  • [5] SmartMixModel: Machine Learning-based Vulnerability Detection of Solidity Smart Contracts
    Shakya, Supriya
    Mukherjee, Arnab
    Halder, Raju
    Maiti, Abyayananda
    Chaturvedi, Amrita
    2022 IEEE INTERNATIONAL CONFERENCE ON BLOCKCHAIN (BLOCKCHAIN 2022), 2022, : 37 - 44
  • [6] EtherGIS: A Vulnerability Detection Framework for Ethereum Smart Contracts Based on Graph Learning Features
    Zeng, Qingren
    He, Jiahao
    Zhao, Gansen
    Li, Shuangyin
    Yang, Jingji
    Tang, Hua
    Luo, Haoyu
    2022 IEEE 46TH ANNUAL COMPUTERS, SOFTWARE, AND APPLICATIONS CONFERENCE (COMPSAC 2022), 2022, : 1742 - 1749
  • [7] Toward Vulnerability Detection for Ethereum Smart Contracts Using Graph-Matching Network
    Zhang, Yujian
    Liu, Daifu
    FUTURE INTERNET, 2022, 14 (11):
  • [8] An Efficient Code-Embedding-Based Vulnerability Detection Model for Ethereum Smart Contracts
    Xu, Zhigang
    Chen, Xingxing
    Dong, Xinhua
    Han, Hongmu
    Yan, Zhongzhen
    Ye, Kangze
    Li, Chaojun
    Zheng, Zhiqiang
    Wang, Haitao
    Zhang, Jiaxi
    INTERNATIONAL JOURNAL OF DATA WAREHOUSING AND MINING, 2023, 19 (02)
  • [9] LogFiT: Log Anomaly Detection Using Fine-Tuned Language Models
    Almodovar, Crispin
    Sabrina, Fariza
    Karimi, Sarvnaz
    Azad, Salahuddin
    IEEE TRANSACTIONS ON NETWORK AND SERVICE MANAGEMENT, 2024, 21 (02): : 1715 - 1723
  • [10] Genealogical Relationship Extraction from Unstructured Text Using Fine-Tuned Transformer Models
    Parrolivelli, Carloangello
    Stanchev, Lubomir
    2023 IEEE 17TH INTERNATIONAL CONFERENCE ON SEMANTIC COMPUTING, ICSC, 2023, : 167 - 174