Prompt Engineering vs. Fine-Tuning for LLM-Based Vulnerability Detection in Solana and Algorand Smart Contracts
Biagio Boi, Christian Esposito

TL;DR
This paper compares prompt engineering and fine-tuning of large language models for detecting vulnerabilities in Solana and Algorand smart contracts, highlighting their effectiveness and platform-specific challenges.
Contribution
It introduces a synthetic dataset for non-EVM smart contracts and evaluates LLM configurations, revealing insights into their performance across different blockchain platforms.
Findings
Prompt engineering offers robust general detection.
Fine-tuning enhances precision and recall in less semantic languages.
Platform architecture influences vulnerability detection effectiveness.
Abstract
Smart contracts have emerged as key components within decentralized environments, enabling the automation of transactions through self-executing programs. While these innovations offer significant advantages, they also present potential drawbacks if the smart contract code is not carefully designed and implemented. This paper investigates the capability of large language models (LLMs) to detect OWASP-inspired vulnerabilities in smart contracts beyond the Ethereum Virtual Machine (EVM) ecosystem, focusing specifically on Solana and Algorand. Given the lack of labeled datasets for non-EVM platforms, we design a synthetic dataset of annotated smart contract snippets in Rust (for Solana) and PyTeal (for Algorand), structured around a vulnerability taxonomy derived from OWASP. We evaluate LLMs under three configurations: prompt engineering, fine-tuning, and a hybrid of both, comparing their…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsBlockchain Technology Applications and Security · Advanced Malware Detection Techniques · Security and Verification in Computing
