Smart contracts are essentially agreements written in software code which automatically execute programmed functions in response to certain conditions being fulfilled without human intervention. The use of computer programs to automate the performance of a contract is not new. Bank payments, online shopping, gaming and supply chain contracts.
Distributed ledgers increasing use to create ‘smart contracts’. Smart contracts are computer programs (e.g. following simple ‘if/when… then…’ statements) which run automatically without the need for human intervention.
The benefits of smart contracts include, among others, speed and efficiency (no paperwork to process and no time spent rectifying errors), trust and transparency (no intermediaries involved and secured records are shared among participants), security (transaction records are encrypted) and savings (no middlemen involved). Smart contracts can be used in many different aspects, like trade finance, food supply, exchange of collectibles and online gambling programs.
Is smart contract legally enforceable?
They are contracts where some or all of the contractual obligations are defined in and/or performed automatically by a computer program, with the need for human intervention.
Essential features of a smart contract include:
- Some or all of the contractual obligations under the contract are performed automatically by a computer program; and
- The contract is legally enforceable.
The use of computer programs to automate the performance of a contract is not new. Bank payments, online shopping all involve elements of automation at the instance of one or both of the parties. More recently, smart contracts are drafted primarily or solely in code and deployed on a distributed ledger system. Distributed ledger is a way for the storage of information or data. It is shared among a network of computers and may be available to other participants. Distribution ledger technology enables the operation and use of a distributed ledger, whereby the ledger is not maintained or controlled by a central administrator or entity. Under the DLT system, participants approve and synchronise additions to the ledger through an agreed mechanism.
There can be three forms of smart contracts:
- Natural language with automatic performance by code
- This is a natural language contract in which some or all of the contractual obligations are performed automatically by the code of a computer program. The program is merely a tool employed by one or both fo the parties to perform the obligations.
- Hybrid contract
- Is a contract in which some of the contractual obligations are defined in natural language and others are defined in the code of a computer.
- Contract recorded solely in code
- Where all the contractual terms are defined in, and performed automatically by, the code of a computer program. No natural language version of the agreement exists.
- Natural language with automatic performance by code
Formation of legal contracts.
There are several requirements for the formation of a legally binding agreement under the law of Hong Kong: agreement, consideration, certainty and completeness, intention to create legal relations, and compliance with formalities.
Interpretation of smart contracts
A court may be asked to interpret a contract where the parties disagree as to the meaning of the terms of that contract. Contractual interpretation is the process by which a court determines the meaning of the language used by the parties in the express terms of a written agreement. The courts take an objective approach to contractual interpretation – i.e., the court would ask what the language would have meant to a reasonable person, with all the background knowledge available to the parties.
Business process document
Parties to a smart contract may prepare a business process document or term sheet which sets out in detail the terms of the transaction. The document can be handed over to a coder to translate into code, which constitutes the smart contract.
An antecedent agreement may be relied upon in interpreting a later agreement. However, the usefulness of such a prior contract in interpreting the terms of a later contract will depend on the facts of the case.
Evidence of parties’ pre-contractual negotiations
Evidence of the parties’ prior negotiations as to the meaning of the words used is not admissible. Admitting such evidence is generally thought to be unhelpful because what the parties did and said in their negotiations may not reflect the final position they took when they entered into the contract.
Remedies and smart contracts
Various problems can arise in the lifecycle of a contract, and in response to these problems, the law provides a range of remedies.
Remedy of rectification could be available to amend the coded terms of a smart contract where, errors in translation result in the code failing to give effect to the parties’ actual common intention at the time of contracting.
However, the court would face practical difficulties in rectifying the coded terms: (a) where the coded terms are recorded on an immutable distributed ledger – where the relevant smart contract is of such a nature that it cannot be rectified; and (b) a party may only discover the error in the code after the code has executed. In these circumstances, rectification may not, in itself, provide an effective remedy for a claimant, who will want to reverse the effects of the code’s performance.
The extent of any practical difficulties in rectifying coded terms will likely depend on the technical specifications of the particular smart contract platform, whether it has relevant built-in functionality to rectify the coded terms.
‘Vitiating factors’ such as mistake, misrepresentation, duress and undue influence may render a contract defective, resulting in the contract being ‘void’ (of not effect from the start) or ‘voidable’ (liable to be set aside from the start).
1. Common mistake
A contract may be rendered void if one or both parties laboured under a mistake when entering into a contract. A ‘mistake’ can be described as an erroneous belief or assumption about a matter of fact or law relating to the subject matter of the contract or the facts surrounding the formation of the contract. Mistake is a common law doctrine.
Where parties hold beliefs or make assumptions about how the code will perform, the parties would be advised to allocate the risks of any potential mistakes by appropriate drafting.
2. Unilateral mistake
Where only one of the parties is mistaken at the time the contract is made. If it can be shown that (at the time of entry of the contract) a party was mistaken as to a term of the contract, and the other party knew of this mistake, the contract is void.
This gets a bit tricky when the contract is offered and accepted by computer programs on behalf of the parties. Tests would need to be formulated to address whose knowledge of the mistake is relevant; the time frame for assessing the person’s knowledge; and the type of knowledge required.
A contract is voidable if a party is induced to enter into the contract by a misrepresentation made by the other party.
If the parties have included clauses in the natural language element of their smart contract which seek to exclude or limit liability for misrepresentation, the law can be applied in the conventional way.
Duress and undue influence
A contract is voidable if a party is induced to enter into the contract by an illegitimate threat made by the other party, or where a party enters into the contract under the undue influence of the other party.
Matters to consider when preparing a smart contract
- Planning – understand the business requirements and objectives of smart legal contract
- Form of the smart contracts would take
- The role of code in smart contract, if the code is intended both to define contractual obligations as well as to perform them, or only to perform them
- Relationship between any natural language and coded terms
- Allocate risks in relation to:
- A malfunctioning oracle or inaccurate data inputs
- External events – upgrades
- Bugs and coding errors in code
- Potential mistakes that may arise due to the parties holding certain beliefs or assumptions about how the code will perform
- Provide a natural language explanations of the workings of the code. An understanding of the parties’ intentions
- Coded element of the smart contract can be terminated if necessary. Avoid a scenario where the code performs pending the outcome of a dispute
- Include choice of law and court – in a natural language agreement or by way of comments in the code
Get in touch with us to gain a deeper understanding of various aspects of smart contracts / blockchain such as its legal effects, ways to use deploy it and considerations for implementation.
If you wish to find out more about how we can help in guiding you through the various aspects of smart contracts: planning, implementation and litigation, please contact:
YTL LLP is a law firm headquartered in Hong Kong, China. This article is general in nature is not intended to constitute legal advice.