SolGen: Secure Smart Contract Code Generation Using Large Language Models Via Masked Prompting
The rapid pace of development and unfamiliar execution environments often lead to critical vulnerabilities when writing Solidity smart contracts from scratch. Automated code generation, on the other hand, enhances productivity, reduces development time, and allows developers to focus on high-level tasks and core logic. This paper explores the effective use of large language models (LLMs) to automatically generate secure Solidity smart contracts from given specifications, employing an innovative masking strategy to ensure vulnerability-free code. To this end, we propose SolGen, a framework leveraging LLMs for secure Solidity code generation. We evaluate the performance of existing LLMs, including ChatGPT and Meta AI, finding that ChatGPT outperforms Meta AI by generating a higher proportion of syntactically correct and secure code. Additionally, we investigate the impact of temperature settings on the security and quality of generated contracts using the open-source LLM Llama3. Results show that a temperature setting of 0.7 is optimal for Solidity code generation, offering superior compilability compared to lower (0.1) or higher (1.2) settings.
Fri 21 FebDisplayed time zone: Chennai, Kolkata, Mumbai, New Delhi change
11:30 - 13:00 | |||
11:30 22mResearch paper | Constructing Enterprise Digital Twins by Augmenting LLMs with MDE Research Papers Souvik Barat Tata Consultancy Services Research, Dushyanthi Mulpuru , abhishek Yadav , Himabindu Thogaru , Vinay Kulkarni Tata Consultancy Services Research | ||
11:52 22mResearch paper | REST API Functional Tester Research Papers Diptikalyan Saha IBM Research India, Devika Sondhi IBM Research, Swagatam Haldar , Saurabh Sinha IBM Research | ||
12:15 22mResearch paper | SolGen: Secure Smart Contract Code Generation Using Large Language Models Via Masked Prompting Research Papers Md Tauseef Alam Indian Institute of Technology Patna, Sorbajit Goswami Indian Institute of Technology Patna, Khushi Singh Indian Institute of Technology Patna, Soumyadip Bandyopadhyay industry, Raju Halder Indian Institute of Technology Patna, Abyayananda Maiti | ||
12:37 22mResearch paper | Test Case Generation for Requirements in Natural Language - An LLM Comparison Study Research Papers |