Smart Contract: The Code is the Law between Parties
Are contracts written purely in code legally enforceable? The contractual principles underlying vending machines and slot machines may furnish the answer.
Imagine Bob and Alice entering into a loan of digital currency on the Ethereum network. The terms of the agreement are not written in natural language, but in lines of code on Solidity. There are no paragraphs to parse, no clauses to scrutinize. What happens if the borrower decides to unwind or rescind the loan, claiming that the code-only contract isn’t legally binding?
At first glance, the question of whether code-only smart contracts are legally binding may seem like a moot point. After all, the whole idea behind smart contracts is to create self-executing agreements that require no human intervention to enforce their terms. A smart contract is “smart” precisely because it should be impossible to renege, delay or default on its terms. A smart contract that is susceptible to breach, or leaves a breach without an automatic cure or indemnity, isn’t very smart. In theory, this means that once the terms of the contract are set in code, the contract should be automatically executed without any external dependency or third-party enforcement mechanisms (read: lawyers, judges, sheriffs). This makes legal enforcement irrelevant.
Code is law, so to speak.
However, in practice, there may be situations where unanticipated disputes arise (life is complicated), or where there are technical glitches that prevent the contract from executing properly (nothing is perfect). In these cases, legal enforcement may still be necessary to resolve any disputes and ensure that the parties’ rights and obligations are upheld. As such, the legal status of code-only smart contracts is still a matter of debate and will likely continue to be a hot topic in the legal world for some time to come.
And in that scenario, we have no choice but to go back to the ancient school of contract law.
1. Taxonomy of contracts
Contracts are agreements between two or more parties that create legally binding obligations. They can be either express or implied.
Express contracts are those where the terms are explicitly stated, either in writing or orally. Written contracts are the most common form of express contracts, as they provide strong evidence of the parties’ intentions. Oral contracts, while less common, can also be enforceable if there is evidence to support their existence.
In contrast, implied contracts arise from the conduct of the parties. The parties’ actions and behavior suggest that they intended to enter into a contract, even if they did not explicitly state the terms. For example, if a person goes to a restaurant, orders a meal, and then eats it, there is an implied contract between the person and the restaurant to pay for the meal.
Apart from contracts, there are also extra-contractual obligations, which are legal obligations that arise outside of a contractual relationship. One type of extra-contractual obligation is quasi-contract, which is a legal fiction used to prevent unjust enrichment. Quasi-contracts are not true contracts, but rather obligations imposed by law to prevent one party from benefiting unfairly at the expense of another.
Within quasi-contract, there are two sub-categories: solutio indebiti and negotiorum gestio.
Solutio indebiti refers to the situation where one party mistakenly pays another party more than they owe. In such cases, the party receiving the payment is obligated to return the excess amount to the other party.
Negotiorum gestio, on the other hand, refers to situations where a person acts on behalf of another person without their consent, but in a manner that is beneficial to them. In such cases, the person who acted on behalf of the other person is entitled to be compensated for their efforts.
2. Form of contracts
In general, contracts do not require any specific form to be valid and enforceable. However, certain types of transactions may require a particular form to be considered valid or binding to third parties. For instance, sale of real property, wills, mortgages, and negotiable instruments often require a specific form to be recognized by law. While there is no one-size-fits-all rule for the form of contracts, it is important to understand the specific legal requirements that may apply to a particular transaction.
3. The doctrine of implied-in-fact contracts
There is such a thing as “contracts implied in fact” (implied-in-fact contracts). The concept can be traced back to the early common law courts of England and it evolved as a way to address situations in which the parties did not enter into an express agreement but their conduct or circumstances implied the existence of a contract.
In the early common law courts, a contract was typically considered to be an express agreement between the parties that was either written or spoken. However, it soon became clear that there were situations in which parties would act as if there was a contract between them, even though there was no formal agreement. In these cases, the courts began to recognize the existence of implied-in-fact contracts.
Implied-in-fact contracts are created by the conduct of the parties, rather than by their express words. They arise when the parties act in a way that indicates an agreement to be bound by certain terms. For example, if a person hires a contractor to build a house and the contractor begins work without discussing the terms of the contract, the parties may be considered to have entered into an implied-in-fact contract.
4. Vending machines and slot machines
Vending machines and slot machines are examples of automated arrangements that can give rise to implied-in-fact contracts based on the conduct of the parties. These machines create an expectation in the user that they will receive a product or service in exchange for their payment, which can imply a contract for the purchase of the product or service. The promise is not expressed in words but is implied from the promisor’s conduct.
The use of vending machines and slot machines typically does not involve text-based contracts or even communication between the parties. The contract is implied from the conduct of the parties, where the user puts money into the machine, and the machine provides a product or service in return. This conduct can create an expectation that the machine will deliver the product or service in exchange for payment, which can give rise to an implied-in-fact contract.
5. Implied-in-fact contracts are not quasi-contracts
According to Nimmer on Copyright, implied-in-fact contracts and quasi-contracts are two distinct legal concepts that should not be confused with each other. A quasi-contract is not a true contract, but rather an obligation imposed by law to prevent unjust enrichment. Quasi-contract is a contract implied in law. Quasi-contractual recovery is based on a benefit accepted or derived, from which the law implies an obligation to pay. In contrast, an implied-in-fact contract is a consensual agreement based on the same elements as an express contract, except that the promise is not expressed in words but rather implied from the promisor’s conduct.
6. Code-only smart contracts are implied-in-fact contracts
Smart contracts are self-executing contracts with the terms of the agreement directly written into lines of code. The code is designed to automatically enforce the terms of the agreement when specific conditions are met, such as the completion of a specific task or the receipt of a particular payment.
While the terms of the agreement are not explicitly stated in text form, they are encoded into the software itself, and parties interact with the smart contract through their conduct. Users’ conduct in submitting transactions to the blockchain and fulfilling the specified conditions creates an expectation that the smart contract will execute the agreed-upon terms.
As with other examples of implied-in-fact contracts, the use of code-only smart contracts does not involve text-based contracts or communication between the parties. Rather, the contract is implied from the conduct of the parties in interacting with the code. Thus, smart contracts can be viewed as an example of how contract law can adapt to new technological developments and allow for agreements to be made based on parties’ conduct and the use of innovative tools.