Auto-generation of Blockchain-Based Distributed Applications Using Ontologies
摘要
Blockchain has already promoted itself to solving business issues within every major domain, from supply chain to financial institutions to the healthcare industry. This is marked as the transition to Blockchain 2.0. However, this mass migration of industries cannot yet be a reality due to the limitations in standards and expertise of smart contracts within the various domains and the concern of the legal validity of smart contracts. Therefore, it is necessary to standardize concepts of smart contracts within blockchain frameworks in relation to legal agreements and to provide a direct mapping of agreements to code. This would allow for standardization and reuse of smart contracts across domains and make them legally enforceable. We target the R3 Corda blockchain framework and propose a novel Ontology, CordaO, that can be used to model Corda Smart Contracts (CorDapps). We also develop a tool, CordaOntoG, that auto-generates the relevant state, contract, and flow code in Java that can be deployed and run on a Corda network. The ontology and code generator are then evaluated with elementary domain-specific agreements such as clinical trial patient registration, car rental, and invoices.