Better Rules initiative in New Zealand[11].
The extended team has experience in User Experience design, used formal methods, and developed high-performance systems in financial settings. Over the last thirty years, we've worked on highly concurrent distributed systems using C/C++ and functional languages OCaml, Erlang, Scala, and Haskell.
Metadata Specification for Ricardian Contracts and Contract Terms
A critical component of contract law and user security is preventing people from agreeing to something that will not happen. Therefore, verifiable human-readable contracts are essential to bridging the real world with DeFi, Digital Identity (DID), and NFT solutions.
Ian Grigg coined the term Ricardian Contract[1] in 1996 while working on one of the first cryptocurrency payment systems. A Ricardian Contract in plain language is a document for a commercial purpose readable by both humans and machines. Readable by humans for mutual understanding. Readable by machines for parameters and execution. The combined bundle is cryptographically verifiable.
By conforming to a common specification, human-readable contracts can be validated and presented in a consistent and verifiable way. By linking contract terms to specific steps in Smart Contract executions, we can monitor and audit them. This enables using meta-data to record the execution of supply-chain contracts that incorporate warehouse receipts, linking regulatory reporting to steps in compliance, or establishing a Joint-Venture DAO [3].
Our Solution
A standards-based Cardano Improvement Proposal (CIP) Metadata specification and reference implementation for Ricardian Contracts and Contract Terms.
This proposal is for working on the initial analysis and design of the specification to incorporate some prototyping toward a reference implementation. We will also work with other proposers of related metadata specifications to ensure the work aligns and is not duplicating efforts.
Using transaction metadata to instrument smart contract execution is an important consideration. Performance labelling links to the smart contract to human-readable contract terms. Compliance, governance processes, and performance-based financing all require this type of linkage.
All project documentation, specification, and reference implementations will be
published to our Github repository using open-source and open-culture licenses. The draft specification will be entered into and shepherded through the Cardano Improvement proposal process.
The draft specification will draw upon and work with other CIP, and many industry standards and tools; Formalised or defacto standards. That include:
- Cardano Message Signing Standard CIP-0008[2]: Using Cardano address private keys to sign arbitrary data.
- W3C Verifiable Claims[4]: Data model for expressing cryptographically secure, privacy-respecting, and machine-verifiable credentials. Including W3C Decentralized Identifier (DID) specification.
- W3C Linked Data[5]: A set of standards that formalises how to describe and integrate pieces of data across the Web. Of particular interest are JSON-LD and Schema.org.
- Project Accord[6] and Catala[7]: An open ecosystem of structured agreements (Cicero) and Executable logic (Ergo) for building smart agreements and regulation (Catala).
- Kantara Consent Receipt Specification[12]: A human-readable record of consent and receipt. Includes requirements for linking to privacy notices and descriptions of what information has been or will be collected.
- EOSIO.CDT Ricardian Contract Specification[8]: A specification for Ricardian contracts on EOS blockchains.
- Identity Foundation Sidetree[9]: A Protocol for anchoring decentralised identifiers in Blockchains.
- Content Addressable Storage (CAS): Git, IPFS, Dat are tools for storing and replicating blocks of data identified with their content hash.
That is not an exhaustive list of the prior art. Our specific intent is to map the prior work into the Cardano Ecosystem; To take advantage of Cardano's EUTXO model, native asset and transaction metadata support, and leverage Atala Prism if possible.
The Cardano Message Signing Standard (CIP-0008), for example, uses address private keys to sign arbitrary data. With the CIP standard, you can verify and check documents, images, user consent receipts, contract terms, and user agents as part of a contract. Since these contract resources may represent a person, company, or DAO, it is essential to know they are signed by the entity and have not been altered.
To refine and improve the specification for draft publication future funding will be needed. A reference implementation needs development to ensure the specification is practical. Software Development Kits (libraries and tools) will be needed to help developers use the standard.
What Success Looks Like
Our proposal will perform analysis of prior work, assess the choices for design, estimate future specification effort, and develop a plan to proceed with complete specification work. Draft specification writing, UI mockups, and code prototyping will be completed to help the effort.
After one month:
- A review of specifications, literature, and existing tools/SDKs related to Ricardian Contracts.
- Engagement with the Cardano community to provide input and feedback has begun.
- Consultation with smart contract developers to help identify needs and points of integration has begun.
After three months:
- User journey and UI wireframe mockups are developed to illustrate user scenarios.
- Prototype reference implementation has been deployed on testnet to demonstrate very basic utility.
- The initial draft of the specification is made available for community review and feedback.
After six months:
- Refinement of the initial draft specification is completed and submitted into the Cardano Improvement process.
- A development plan for taking the specification through the Cardano Improvement process has been actioned.
- A detailed plan for fully developing a reference implementation and Software Development Kits is submitted to Catalyst.
- A model for the sustainability of the project is actioned. Covering additional funding and ongoing support will be circulated for community feedback and adoption.
After twelve months:
- The Specification is a CIP.
- An SDK for the specification has been developed.
- At least one Smart-Wallet has integrated the specification.
- At least one DApp/Financial Solution is using the standard as an integral part of the products feature set.
Budget Breakdown
The requested Fund 6 budget is for wages and expenses for three months of the project. We will deliver the initial draft specification and related documentation. Further funds will be requested to continue the work beyond this period and develop the proposal to a level needed for submission to the Cardano Improvement Process.
- Specification R&D: $7,000USD (45%)
- UX/UI Prototyping: $2,400USD (15%)
- Engineering: $3,000USD (22%)
- Community Engagement: $1,200USD (8%)
- Project Management: $1,500USD (10%)
FTE hourly rate of USD$100 includes all overheads; Adjusted for experience and short term intermittent nature of project funding. The hourly rate is the mid-range salary for the software engineering field.
Licensing
All our source code will be licensed under a free and open-source (OSI) license. Published content will be licensed under the Creative Attribution-Non-Commercial-ShareAlike International (CC BY-NC-SA) License v4.0. The specification will be published under a Creative Commons Attribution-NoDerivatives 4.0 International (CC BY-ND 4.0) license.
References
[1] Ricardian Contract: <http://webfunds.org/guide/ricardian.html>
[2] Cardano Message Signing Standard (CIP-0008): <https://github.com/cardano-foundation/CIPs/blob/master/CIP-0008/CIP-0008.md>
[3] Ricardian LLC - Limited Liability NFT: <https://medium.com/lexdaoism/ricardian-llc-limited-liability-nft-f64a162f751b>
[4] W3C Verifiable Claims: <https://www.w3.org/TR/vc-data-model/>
[5] W3C Linked Data - <https://www.w3.org/standards/semanticweb/data>
[6] Project Accord - <https://accordproject.org/>
[7] Catala - <https://catala-lang.org/>
[8] EOSIO.CDT Ricardian Contract Specification - <https://github.com/EOSIO/ricardian-spec>
[9] Identity Foundation Sidetree - <https://identity.foundation/sidetree/spec/>
[10] Rules as Code <https://oecd-opsi.org/projects/rulesascode/>
[11] Better Rules <https://www.youtube.com/watch?v=oDgV9MSYAIs>
[12] Kantara Consent Receipt Specification - <https://kantarainitiative.org/download/7902/>