要約
スマートコントラクトは、幅広いアプリケーションシナリオを備えたブロックチェーンテクノロジーに基づく一種の自己実行コードですが、従来の生成方法は、手動コーディングとエキスパート監査に依存しており、これは高いしきい値と効率が低いです。
大規模な言語モデル(LLM)はプログラミングタスクに大きな可能性を示していますが、スマートコントラクトの生成W.R.T.
有効性とセキュリティ。
これらの問題を解決するために、有限状態マシン(FSM)とLLMSに基づいたスマートコントラクト生成フレームワークであるFSM-SCGを提案します。これにより、ユーザー要件を抽象化してFSMを抽象化し、LLMSを生成してスマートコントラクトを生成し、コンピレーションのフィードバックとセキュリティチェックのフィードバックでコードを最適化することにより、生成コードの品質を大幅に向上させます。
実験結果は、FSM-SCGがスマートコントラクトの生成の品質を大幅に向上させることを示しています。
最良のベースラインと比較して、FSM-SCGは、生成されたスマートコントラクトコードのコンパイル成功率を最大48%改善し、平均脆弱性リスクスコアを約68%削減します。
要約(オリジナル)
Smart contract is a kind of self-executing code based on blockchain technology with a wide range of application scenarios, but the traditional generation method relies on manual coding and expert auditing, which has a high threshold and low efficiency. Although Large Language Models (LLMs) show great potential in programming tasks, they still face challenges in smart contract generation w.r.t. effectiveness and security. To solve these problems, we propose FSM-SCG, a smart contract generation framework based on finite state machine (FSM) and LLMs, which significantly improves the quality of the generated code by abstracting user requirements to generate FSM, guiding LLMs to generate smart contracts, and iteratively optimizing the code with the feedback of compilation and security checks. The experimental results show that FSM-SCG significantly improves the quality of smart contract generation. Compared to the best baseline, FSM-SCG improves the compilation success rate of generated smart contract code by at most 48%, and reduces the average vulnerability risk score by approximately 68%.
arxiv情報
著者 | Hao Luo,Yuhao Lin,Xiao Yan,Xintong Hu,Yuxiang Wang,Qiming Zeng,Hao Wang,Jiawei Jiang |
発行日 | 2025-05-13 13:13:26+00:00 |
arxivサイト | arxiv_id(pdf) |
提供元, 利用サービス
arxiv.jp, Google