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

要約

ブロックチェーン技術の現代的な関連性により、スマートコントラクトには大きなリスクと利点の両方が存在します。
内部の脆弱性は連鎖的な影響を引き起こし、重大な損失をもたらす可能性があります。
現在の論文の多くは、悪意のある目的でスマート コントラクトを分類することに主に焦点を当てており、多くの場合、バイトコードやオペコードなどの限定されたコントラクトの特性に依存しています。
この論文は、1) 分類と 2) 悪意のあるコントラクトの直接修復という、新しい 2 層フレームワークを提案します。
Slither の脆弱性レポートはソース コードと結合され、事前トレーニングされた RandomForestClassifier (RFC) および Large Language Model (LLM) を通過し、提案された各脆弱性を分類して修復します。
実験では、微調整され即時設計された LLM の有効性が実証されています。
事前トレーニングされた GPT-3.5-Turbo モデルと微調整された Llama-2-7B モデルから構築されたスマート コントラクト修復モデルは、全体的な脆弱性数をそれぞれ 97.5% と 96.7% 削減しました。
修復されたコントラクトを手動で検査すると、すべての機能が保持されていることがわかり、提案された方法がスマート コントラクトの脆弱性の自動バッチ分類と修復に適切であることがわかります。

要約(オリジナル)

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.

arxiv情報

著者 Abhinav Jain,Ehan Masud,Michelle Han,Rohan Dhillon,Sumukh Rao,Arya Joshi,Salar Cheema,Saurav Kumar
発行日 2023-09-14 16:37:23+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.CR パーマリンク