ETHDec: An Opcode-Level Analysis Approach Through Parameter-Efficient Fine-Tuning
摘要
Smart contracts are widely used in decentralized applications, especially in security-sensitive areas, but their inherent vulnerabilities expose them to attacks. Runtime analysis is a common approach, yet rule-based methods depend on complex expert rules, lacking generality, while machine learning struggles with limited data for new vulnerabilities. We propose ETHDec, a general and efficient runtime analysis architecture using a fine-tuned large language model (LLM) for real-time transaction detection. It features a generalized opcode-level transaction processing method and an integrated framework using Low-Rank Adaptation (LoRA) for parameter-efficient training. Experiments on the first 8 million Ethereum blocks demonstrate that our model, achieving an F1-score of 0.92, surpasses state-of-the-art tools by detecting 10 out of 16 vulnerability types.