The Ricardian contract is a method of recording a document as a contract at law, and linking it securely to other systems, such as accounting, for the contract as an issuance of value. It is robust through use of identification by cryptographic hash function, transparent through use of readable text for legal prose and efficient through markup language to extract essential information - wikipedia
# Introduction
A Ricardian contract places the defining elements of a legal agreement in a format that can be expressed and executed in software. The key is to make the format both machine readable, such that they can easily be extracted for computational purposes, and readable as an ordinary text document such that lawyers and contracting parties may read the essentials of the contract conveniently.
From a legal perspective, the use of markup language embedded within a mostly legal prose document leads to reduced transaction costs, faster dispute resolution, better enforceability and enhanced transparency. From a computing perspective, the Ricardian contract is a software design pattern to digitize documents and have them participate within financial transactions, such as payments, without losing any of the richness of the contracting tradition. Publication of the content and reference to that content by the unique cryptographic message digest eliminates frauds based on multiple presentations.
The method arises out of the work of Ian Grigg completed in the mid-1990s in contributions to Ricardo, a system of assets transfers that was built in 1995-1996 by Systemics and included the pattern. The system and the design pattern was named after David Ricardo in honour of his seminal contribution to international trade theory.
# Definition
A Ricardian contract can be defined as a single document that is:a) a contract offered by an issuer to holders,
b) for a valuable right held by holders, and managed by the issuer,
c) easily readable (like a contract on paper),
d) readable by programs (parsable like a database),
e) digitally signed,
f) carrying the keys and server information, and
g) allied with a unique and secure identifier.The Ricardian Contract - iang.org
The Ricardian contract separates the agreement of parties across time and domain. On the left of the "Bowtie" representation, the negotiation and formation of a legally binding contract leads to a single parent document that defines all of the intent of that agreement.

BowTie diagram of Ricardian contract elements & generatives
- wikimedia.org
On the right, the performance of that agreement might involve many transactions to be accounted for, logically separated from the meaning of the issue. The join between the legal world and the accounting world is formed by the hash - each transaction locks in the terms and conditions of the precise deal of the parties by including the hash of the contract in every relevant transaction record, yet the operation of the transactions and the issuance of the contract are cleanly separated and thus perverse incentives are eliminated.
# Legal relationship
The role of the Ricardian Contract is to capture the contractual relationship between contracting parties to assist later performance of that contract by programs. In its contractual form, it is the recording of an offer from an issuer to a holder. The offer is signed digitally within the format by the offerer, typically using a plaintext digital signature such as provided by OpenPGP.
The acceptance of the contract is typically formed by signing / agreeing to a transaction that refers to the hash of that contract. Within the context of a high performance payment system, a secure payment will cite the hash of the contract of the instrument being paid, as well as paying and payee parties and a quantity of units. In a smart contracts system, the acceptance would be performed by operating the contract's code to move the state of the agreement forward.
# Signing and Intent
Typically, the signing of the contract by any party is overtly performed by use of a private key. The original offerer's signature is typically over the original document, and is then appended to form a fully binding, readable offer for the assets described in the document.
Later participation by parties in the contract such as payments or smart contract performance will typically sign over a hash identifier (as generated by a cryptographic hash function) over the signed original document.
In contrast to the initial signature, the use of the hash of the contract within following transactions also signals intent, and forms a covert signature over the contract.
Although private key signatures are well studied and are subject of legal frameworks such as the European digital signature directive, Grigg suggests that the trail of hashes - entanglement - forms a more effective evidence of intent than a private key signature.
# Formats
A key decision is the formatting of the text such that minimal markup language can be inserted to assist the software agent while maintaining readability. To be a Ricardian Contract, it has to be parsable both by the program and by a human reader.
Further, the format has to support a canonical form hash (cryptographic hash function), that is, have a way of delivering a hash over contents that does not change due to common serialisation and transmission artifacts.
LaTeX or Ini file format are suitable because they allow consistent readability by humans.
Popular and standardised formats such as JSON, XML and Semantic Web might appeal to programmers but provide less readability to jurists. Some formats also suffer from too much markup flexibility such as whitespace which makes hashing and signing hard.
# Intellectual Property
The Ricardian Contract is free of any intellectual property restrictions. It was fully published as design and implementation in 1996, and was described in an academic paper presented in 2004. No patent or other intellectual property mechanism was ever asserted by its inventor, Ian Grigg nor by Systemics.
# See also
- The Ricardian Contract - iang.org
- Ricardian vs Smart Contract
- Ricardian contract tools