mlsanityData to 14 Oct 2026

Two Timin': Repairing Smart Contracts With A Two-Layered Approach

arXiv 2309.07841 ↗First posted 14 Sep 2023cs.CR cs.AIcited by 0

Not on the map. Why?

Abstract (arXiv)

Due to the modern relevance of blockchain technology, smart contracts present both substantial risks and benefits. Vulnerabilities within them can trigger a cascade of consequences, resulting in significant losses. Many current papers primarily focus on classifying smart contracts for malicious intent, often relying on limited contract characteristics, such as bytecode or opcode. This paper proposes a novel, two-layered framework: 1) classifying and 2) directly repairing malicious contracts. Slither's vulnerability report is combined with source code and passed through a pre-trained RandomForestClassifier (RFC) and Large Language Models (LLMs), classifying and repairing each suggested vulnerability. Experiments demonstrate the effectiveness of fine-tuned and prompt-engineered LLMs. The smart contract repair models, built from pre-trained GPT-3.5-Turbo and fine-tuned Llama-2-7B models, reduced the overall vulnerability count by 97.5% and 96.7% respectively. A manual inspection of repaired contracts shows that all retain functionality, indicating that the proposed method is appropriate for automatic batch classification and repair of vulnerabilities in smart contracts.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 14 of its 22 references that are in the map. First posted on arXiv 14 Sep 2023.

Builds on

14 of 22 references.

References · 14

  1. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
  2. 2019Slither: A Static Analysis Framework For Smart Contractscited by 89
  3. 2023Do you still need a manual smart contract audit?cited by 35
  4. 2023Sci-CoT: Leveraging Large Language Models for Enhanced Knowledge Distillation in Small Models for Scientific QAcited by 13
  5. 2023Optimizing Machine Translation through Prompt Engineering: An Investigation into ChatGPT's Customizabilitycited by 11
  6. 2022Smart Contract Vulnerability Detection Technique: A Surveycited by 9
  7. 2023Defending Against Poisoning Attacks in Federated Learning with Blockchaincited by 8
  8. 2023SmartBugs 2.0: An Execution Framework for Weakness Detection in Ethereum Smart Contractscited by 4
  9. 2021Elysium: Context-Aware Bytecode-Level Patching to Automatically Heal Vulnerable Smart Contractscited by 3
  10. 2023Vulnerable Smart Contract Function Locating Based on Multi-Relational Nested Graph Convolutional Networkcited by 3
  11. 2022Vulnerability Analysis of Smart Contractscited by 2
  12. 2023Usenix'23 Extended Version: Smart Learning to Find Dumb Contractscited by 2
2 more
  1. 2022Deep Smart Contract Intent Detectioncited by 1
  2. 2023CONTRACTFIX: A Framework for Automatically Fixing Vulnerabilities in Smart Contractscited by 1

Built on by

Not cited yet.