pipette
ESEspañol

Solidity Meets LLMs: A Transformer-Based Approach to Smart Contract Vulnerability Detection

Djamel Eddine Hakim Ghorab, Farid Mokhati, and Mostafa Anouar Ghorab

Preprint with a published versionReal-world use

In the authors' words

The growing adoption of blockchain technologies, particularly the Ethereum platform, has amplified the critical role of smart contracts in decentralized applications. However, the increasing complexity and financial value of these contracts make them prime targets for cyber attacks. In this work, we present a transformer-based approach for the detection of vulnerabilities in smart contract fragments written in Solidity. Leveraging the representational power of pre-trained Large Language Models (LLMs), we construct a robust pipeline that includes the definition of a ground truth dataset, labeling code fragments as vulnerable or safe. We then fine-tune a BERT-based architecture on this dataset, enabling the model to capture the syntactic and semantic patterns specific to Solidity code. Our fine-tuned model demonstrates strong performance, achieving an F1 score of 92%, and highlighting the effectiveness of LLM adaptation in enhancing smart contract security through deep contextual understanding.

Main resultThe abstract does not state a limitation.

Appeared: Thursday, September 24. arXiv. Preprint with a published version.

DOI: 10.1007/978-3-032-15632-7_17?utm_source=chatgpt.com

Published version: Springer book chapter (edited volume), not a journal article 2026