Options
An AI-powered auto-completion tool for Solidity smart contracts
Publikationstyp
Conference Paper
Date Issued
2025-10
Sprache
English
Author(s)
Hensel, Fabian
Banerjee, Avik
Ebrahimi, Elmira
Start Page
171
End Page
180
Citation
IEEE International Conference on Blockchain, Blockchain 2025
Contribution to Conference
Publisher DOI
Publisher
IEEE
ISBN of container
979-8-3315-9016-1
979-8-3315-9015-4
Solidity smart contracts are widely used to implement decentralized applications. However, their development remains challenging due to the language’s domain-specific complexity, the immutability of deployed contracts, which prevents post-deployment fixes, and the high risk of introducing security-critical vulnerabilities. While Large Language Models (LLMs) have advanced code generation across general domains, they often struggle to meet the structural and security-specific demands of smart contract development. Therefore, this paper presents a domain-adapted code completion model trained on 22,000 labeled code constructs extracted from Solidity contracts. The model is built on a transformer-based architecture and fine-tuned using Quantized Low-Rank Adaptation (QLoRA), a parameter-efficient method. The dataset is processed to highlight secure coding patterns and structural semantics, enabling the model to learn from both preceding and succeeding contexts. Evaluation using perplexity, the Bilingual Evaluation Understudy (BLEU) score, and the Metric for Evaluation of Translation with Explicit Ordering (METEOR) shows significant improvements with consistent gains across all three metrics compared to the base model. These results demonstrate that targeted adaptation of language models can significantly enhance coding support in Solidity smart contracts.
Subjects
blockchain
solidity
smart contracts
code completion
large language models
DDC Class
005.7: Data