Model-driven smart contract generation leveraging pretrained large language models - Jiang, Qinbo (Nanyang Technological University, 2024)
This project titled ‘Model-Driven Smart Contract Generation Leveraging Pretrained Large Language Models’ explores automating blockchain smart contract creation using Large Language Models (LLMs), such as ChatGPT and LLaMA-2, and automates refinement through the integration of a static analysis framework, specifically Slither. Smart contracts, encoded agreements on a blockchain, traditionally require extensive coding knowledge. LLMs, trained on vast text datasets, can potentially simplify this by generating smart contract code, making development more accessible to non-experts. This study evaluates the feasibility of a framework for LLM-assisted smart contract generation, focusing on reducing development time and skill requirements. It compares the effectiveness of GPT-4 and LLaMA-2 in creating smart contracts, aiming to identify strengths and limitations in language understanding and code generation. By integrating LLMs with smart contract languages, the project seeks to democratise smart contract development, offering a novel tool for users with limited programming experience. This research contributes to the field by highlighting LLMs’ potential in automating complex coding tasks, pushing the boundaries of blockchain technology accessibility.