Smart Contracts in the Courts
“Code is Law” May be Put to the Test in Ontario
Cryptocurrency trading and other forms of investment are enabled via smart contracts that execute themselves according to rules defined by code. But what happens if somebody finds a loophole and manipulates the rules to produce an unexpected result in their favour? Will Ontario courts regulate the outcomes of trades executed through smart contracts, or will they defer on the principle that “code is law”?
Blockchain technologies enable self-executing “smart contracts”. Instead of traditional contracts that require the parties to first agree to do something and then to do the thing to complete the contract, smart contracts complete themselves according to a set of rules embedded in programming code stored on blockchain. Once one of the parties takes a particular step, the smart contract is executed. One analogy is that smart contracts are like vending machines – once the coin is dropped into the slot, they execute themselves without any further need for human action or intervention and deliver whatever it is that the code dictates.
Some day smart contracts may be widely used to sell real estate, make wills, or manage supply chains, but for now one of their principal uses is enabling crypto trades and other forms of investment.
Vulnerability in the code
What happens when somebody finds a vulnerability in the code governing a smart contract, and devises a way to exploit that vulnerability to their favour? This is the question at the heart of a case currently unfolding in the Ontario Courts. In Cicada 137 LLC v. Medjedovic, the plaintiffs allege that AM, a 19 year-old math whiz, exploited a vulnerability in the code governing the functioning of a crypto index pool (like an index fund comprised of cryptocurrency), and engineered a series of trades that netted him $15.8 million at the expense of other investors in the pool. The alleged elaborate details of the caper are set out in detail in some of the public filings in the case.
Code is law
The case raises a very interesting question: did AM break the law?
Not according to some who adhere to the notion held by some in the crypto community that “code is law.” This theory says that everybody who participates in the system governed by a smart contract agrees to abide by the outcomes dictated by the code underlying that contract. As long as somebody acts within the parameters of the code governing a smart contract, anything that comes out of the contract’s execution is theirs to keep. There is no room in this theory for external regulation or even external norms; there is only the outcome dictated by the code, which is by definition lawful.
The unhappy investors, not surprisingly, disagree. They contend that aspects of AM’s attack on the index pool were fraudulent and amounted to computer hacks, subjecting him to civil liability to the other investors, and potentially to sanctions under the Criminal Code.
The case is still at a preliminary stage, with the investors attempting to locate AM and to take steps to secure the crypto before it is moved out of their reach. Regardless, whether in this case or the next one, Ontario courts will have to grapple with novel questions posed by smart contracts, and the extent of their role in regulating them.
The content on this website is for information purposes only and is not legal advice, which cannot be given without knowing the facts of a specific situation. You should never disregard professional legal advice or delay in seeking legal advice because of something you have read on this website. The use of the website does not establish a solicitor and client relationship. If you would like to discuss your specific legal needs with us, please contact our office at 613-563-7544 and one of our lawyers will be happy to assist you.