SCPatcher: Automated Smart Contract Code Repair via Retrieval-Augmented Generation and Knowledge Graph
Not on the map. Why?
Abstract (arXiv)
Smart contract vulnerabilities can cause substantial financial losses due to the immutability of code after deployment. While existing tools detect vulnerabilities, they cannot effectively repair them. In this paper, we propose SCPatcher, a framework that combines retrieval-augmented generation with a knowledge graph for automated smart contract repair. We construct a knowledge graph from 5,000 verified Ethereum contracts, extracting function-level relationships to build a semantic network. This graph serves as an external knowledge base that enhances Large Language Model reasoning and enables precise vulnerability patching. We introduce a two-stage repair strategy, initial knowledge-guided repair followed by Chain-of-Thought reasoning for complex vulnerabilities. Evaluated on a diverse set of vulnerable contracts, SCPatcher achieves 81.5% overall repair rate and 91.0% compilation pass rate, substantially outperforming existing methods.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). First posted on arXiv 1 Apr 2026.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2026: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2026Mitigating Error Propagation in Chain-of-Thought: A Tree-of-Thought Framework for Smart Contract Repair ↗
- 2024ContractTinker: LLM-Empowered Vulnerability Repair for Real-World Smart Contracts
- 2026EvoPoC: Automated Exploit Synthesis for DeFi Smart Contracts via Hierarchical Knowledge Graphs ↗
- 2026Knowdit: Agentic Smart Contract Vulnerability Detection with Auditing Knowledge Summarization
- 2025Towards Automated Smart Contract Generation: Evaluation, Benchmarking, and Retrieval-Augmented Repair
- 2026Beyond Detection: Agentic Attack Synthesis and Simulation for Smart Contracts
- 2025Enhancing repository-level software repair via repository-aware knowledge graphs
- 2025Large Language Model based Smart Contract Auditing with LLMBugScanner