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.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

ETHDec: An Opcode-Level Analysis Approach Through Parameter-Efficient Fine-Tuning

  • Nengze Chen,
  • Chenyang Mo,
  • Hongbing Cheng

摘要

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.