<p>In today’s cross-border data transactions, businesses often struggle to apply acquired information in ways that fully honor contractual provisions and regulatory obligations. Furthermore, the divide between paper agreements and digital systems heightens compliance risks across jurisdictions. This paper introduces LegiCode, a blockchain-based framework that transforms conventional legal contracts into executable smart-contract code. LegiCode employs a custom contract language organized into asset, rights, transaction and contract-attribute modules, simplifying the translation of real-world legal terms into secure, decentralized agreements while ensuring asset integrity and transparency. To enable real-time compliance verification, we integrate an oracle interface linking on-chain contracts to the off-chain LegiLM legal language model, allowing smart contracts to query and enforce rules–such as General Data Protection Regulation(GDPR)–during execution. A data-sharing agreement case study shows how LegiCode automatically converts legal models into Hyperledger Fabric chaincode using natural-language constructs, lowering technical barriers, reducing manual coding and errors, and empowering legal professionals without programming expertise. Experimental results demonstrate an average code-conversion rate of 89.43% and confirm that LegiCode outperforms existing methods in automation, compliance accuracy, expressiveness and support for asset transactions.</p>

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

LegiCode: A blockchain-legal LLM framework for real-time compliance in smart contract generation

  • Linkai Zhu,
  • Xueyan Zhang,
  • Zeyu Zhang,
  • Di Wu,
  • Longxiang Gao

摘要

In today’s cross-border data transactions, businesses often struggle to apply acquired information in ways that fully honor contractual provisions and regulatory obligations. Furthermore, the divide between paper agreements and digital systems heightens compliance risks across jurisdictions. This paper introduces LegiCode, a blockchain-based framework that transforms conventional legal contracts into executable smart-contract code. LegiCode employs a custom contract language organized into asset, rights, transaction and contract-attribute modules, simplifying the translation of real-world legal terms into secure, decentralized agreements while ensuring asset integrity and transparency. To enable real-time compliance verification, we integrate an oracle interface linking on-chain contracts to the off-chain LegiLM legal language model, allowing smart contracts to query and enforce rules–such as General Data Protection Regulation(GDPR)–during execution. A data-sharing agreement case study shows how LegiCode automatically converts legal models into Hyperledger Fabric chaincode using natural-language constructs, lowering technical barriers, reducing manual coding and errors, and empowering legal professionals without programming expertise. Experimental results demonstrate an average code-conversion rate of 89.43% and confirm that LegiCode outperforms existing methods in automation, compliance accuracy, expressiveness and support for asset transactions.