Legal Compliance Evaluation of Smart Contracts Generated By Large Language Models
Chanuka Wijayakoon, Hai Dong, H.M.N. Dilum Bandara, Zahir Tari, Anurag Soin

TL;DR
This paper explores the potential of large language models to generate legally compliant smart contracts directly from natural language legal texts, proposing new metrics to evaluate legal compliance and analyzing their effectiveness.
Contribution
It introduces a novel set of metrics for assessing legal compliance in smart contracts generated by LLMs and evaluates their effectiveness across different models and legal contracts.
Findings
Larger LLMs tend to produce more legally compliant smart contracts.
The proposed metrics effectively distinguish levels of legal compliance.
LLMs can generate initial code for compliant smart contracts, aiding automated development.
Abstract
Smart contracts can implement and automate parts of legal contracts, but ensuring their legal compliance remains challenging. Existing approaches such as formal specification, verification, and model-based development require expertise in both legal and software development domains, as well as extensive manual effort. Given the recent advances of Large Language Models (LLMs) in code generation, we investigate their ability to generate legally compliant smart contracts directly from natural language legal contracts, addressing these challenges. We propose a novel suite of metrics to quantify legal compliance based on modeling both legal and smart contracts as processes and comparing their behaviors. We select four LLMs, generate 20 smart contracts based on five legal contracts, and analyze their legal compliance. We find that while all LLMs generate syntactically correct code, there is…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsFinTech, Crowdfunding, Digital Finance · Digital Transformation in Law · Law, AI, and Intellectual Property
