I. Executive Summary

Can an agreement which is formed purely through the operation of algorithms be considered a binding contract? If so, can such a contract be unilaterally cancelled because of a mistake, where such mistake resulted in trades being concluded at 250 times the market rate? This was the question before the Court of Appeal (“CA”) in the case of Quoine Pte Ltd v B2C2 Ltd [2020] SGCA(I) 2.

B2C2 Ltd (“B2C2”) traded on a cryptocurrency exchange created by Quoine Pte Ltd (“Quoine”), known as QUOINExchange (the “Platform”). Both B2C2 and Quoine were market-makers on the Platform: they created liquidity there, by actively placing orders to buy and sell cryptocurrencies.

B2C2’s entire trading process was automated using its algorithmic trading software (“Trading Software”). This meant that its trades were concluded without any direct human involvement, save for that involved in the creation of the algorithmic processes leading to their formation. The algorithms were also deterministic, meaning they would do only what they were programmed to do.

To determine the price on the trades, the Trading Software essentially relied on inputs based on the 20 best orders on the Platform. Without such input, it was pre-programmed to rely on a failsafe trading price (the “Deep Price”) of 10 Bitcoins (“BTC”) to 1 Ethereum (“ETH”).[1] This price was established by Mr Maxime Boonen (“Boonen”), a director of B2C2 who also designed the Trading Software.

The events in question occurred around 19 April 2017. There were 13 trades (“the Disputed Trades”) concluded between B2C2 and two other users of the Platform – Pulsar Trading Capital (“Pulsar”) and Mr Yu Tomita (“Tomita”) (Pulsar and Tomita together the “Counterparties”) – where B2C2 sold them ETH for BTC at around the Deep Price. These rates were approximately 250 times the then-going market rate of around 0.04 BTC for 1 ETH. The Disputed Trades were automatically settled by the Platform.

It transpired that due to an operational oversight by Quoine, the Platform was not able to access external market data to generate new orders, resulting in the Trading Software having no or insufficient input for its trades. This caused the Deep Price to come into effect, eventually making the Disputed Trades.

When Quoine became aware of the Disputed Trades the next day, it considered the rates of the trades to be highly abnormal, and unilaterally cancelled the trades. The debit and credit transactions involving B2C2’s account and the Counterparties’ accounts were also reversed.

B2C2 subsequently commenced proceedings against Quoine for breach of contract and/or breach of trust. Generally, B2C2 argued that usage of the Platform was governed by a user agreement (the “Agreement”), and Quoine had breached a provision in the Agreement which disallowed an order from being cancelled once fulfilled (the “Irreversible Action Clause”). A central plank of Quoine’s defence was that the contracts underlying the Disputed Trades (the “Trading Contracts”) were void or voidable[2] for unilateral mistake.

The case was first pursued in the Singapore International Commercial Court (“SICC”), where judgment was given in favour of B2C2 on both issues of breach of contract and breach of trust. On appeal, the CA in a majority decision[3] upheld the SICC’s judgment on the breach of contract claim, but reversed the decision on the breach of trust claim.

II. Issues on Appeal

To determine the above claims, the CA had to consider the following:

(a) The nature of the contractual relationships between the parties;
(b) Whether the Agreement allowed Quoine to cancel the Disputed Trades;
(c) Whether the Trading Contracts were invalidated by unilateral or common mistake;
(d) Whether B2C2 was unjustly enriched (hence allowing Quoine to cancel the Disputed Trades); and
(e) Whether Quoine held the cryptocurrencies on trust for B2C2.

A. The nature of the contractual relationships between the parties

To determine if the defence of unilateral mistake could be raised, the CA first had to examine the nature of the contractual relationships between Quoine, B2C2 and the Counterparties. This would allow it to see which contract was affected by any asserted mistake, and who the actual mistaken party was. The CA held that Quoine merely provided a service to the users of the Platform under the Agreement, and that trading contracts were made directly between buyers and sellers. Thus, the Trading Contracts were formed directly between B2C2 and the Counterparties, and it was the parties to the Trading Contracts that were responsible for whether and on what terms they would place or fill orders.

B. Whether the Agreement allowed Quoine to cancel the Disputed Trades

Quoine had two main arguments on this issue:

(1) The Agreement permitted it to cancel the Disputed Trades; and
(2) Terms could be implied into the Agreement that allowed Quoine to cancel the Disputed Trades.

(1) The Agreement permitted it to reverse the Disputed Trades

Quoine argued that in addition to the Agreement, its services to the Platform users were also governed by a “Risk Disclosure Statement” posted on Quoine’s website. This Risk Disclosure Statement contained a clause empowering Quoine to cancel trades resulting from an aberrant value produced by the Platform (the “Aberrant Value Clause”). Further, Quoine argued that under the Agreement, it could amend the terms of the Agreement without first informing the Platform’s users of such change. This was due to clauses which stated that the Agreement “may be changed at any time by [Quoine]” and that Quoine could change any of the terms “for access to or continued use of services … without providing notice of such change” (the “Unilateral Variation Clauses”).

However, the CA agreed with the SICC that the Unilateral Variation Clauses did not allow Quoine to change the terms of the Agreement without first notifying the Platform users of such change. It held that a user had to have reasonable means of knowing that there had been a modification to the terms, and what that modification was, before any such change could have legal effect. With such knowledge, the user could then decide whether it would continue to use the Platform. Quoine’s actions in merely uploading the Risk Disclosure Statement onto its website, without doing more, did not suffice to constitute the requisite notice.

In any case, the clause which stated that changes would be made “without providing notice of such change” contemplated that Quoine would take active steps to inform its users of such changes, as it also stated that changes would be “posted or emailed”. The Agreement also separately provided that “[i]t is the responsibility of the User to keep himself/herself updated with the current version of the Agreement” – the CA held that this contemplated that users would have the opportunity to review the changes in the first place, which in turn necessitated them being given notice of these changes.

In any event, the Aberrant Value Clause did not have the effect Quoine intended. It was applicable only when the Platform, because of “emergency system maintenance” or “system failure”, generated a price that was not intended by the user. Here, while the price was abnormal, it was clearly intended by B2C2 in accordance with its programming. The Disputed Trades were concluded based on prices correctly quoted by the Trading Software for B2C2, and market orders that were correctly placed by the Platform for the Counterparties. Further, “system failure” had been defined as situations where orders could not be placed; this was not such a situation.

(2) Terms could be implied into the Agreement that allowed Quoine to cancel the Disputed Trades

Quoine sought to imply the existence of two additional terms into the Agreement (that were not already written in the Agreement): that Quoine could reverse trades executed at an abnormal price resulting from a technical error or system failure, as well as trades resulting from a breach of the Agreement (collectively, the “Proposed Implied Terms”). However, the CA rejected this argument because these terms contradicted the Irreversible Action Clause, a clause which was actually written in the Agreement. 

(C) Whether the Trading Contracts were invalidated by unilateral or common mistake

Quoine argued that there was both unilateral mistake and common mistake here:

  • First, there was a unilateral mistake at common law that allowed Quoine to void the Trading Contracts. Quoine alleged that the Counterparties entered into the Trading Contracts based on two mistaken beliefs: that it was necessary to sell in response to the margin calls the Platform made on them;[4] and that the price of the Disputed Trades accurately represented the true market value of the ETH relative to BTC on such date.
  • Second, there was a unilateral mistake at equity, given that B2C2 exploited the Counterparties’ mistake as to the price.
  • Alternatively, Quoine argued that B2C2 and the Counterparties shared a common mistake as to the price.

However, the CA found that there was neither unilateral mistake (either in common law or equity[5]) nor common mistake here.

The CA first reiterated that a unilateral mistake in contract happens when one party knows that the other party entered into the contract because it was mistaken about a fundamental term of the contract, such as the price. Conversely, a common mistake happens when both parties shared a mistake about the terms of the contract.

There are also two types of unilateral mistake. Unilateral mistake at common law requires that the non-mistaken party have actual knowledge that the other party had mistaken a term of the contract. In contrast, unilateral mistake at equity does not require actual knowledge by the non-mistaken party. Instead, the question is whether a reasonable person in the position of the non-mistaken party would have known of the mistake (i.e. constructive knowledge). The non-mistaken party must also have acted unconscionably in the latter situation.

(1) Unilateral mistake

Before deciding whether and how the doctrines of unilateral mistake should apply to contracts made by computerised trading systems and algorithms, the CA first had to consider whether there could be a valid contract in such situations. In such cases, the parties would not know beforehand that a contract (in this case the Trading Contracts) would be entered into, or the specific terms on which such contract would be concluded (here, the price), but would nonetheless be content to abide by what the relevant algorithms did, so long as it was within the ambit of their programmed parameters.

The court thus first considered the more fundamental question of how such contracts were formed. It compared the Trading Contracts with the automated electronic contracting process found in the insurance industry. Essentially, automated contracting allows insurance brokers to receive quotations automatically calculated from a set of pre-programmed criteria (i.e. a deterministic algorithm) from insurers, and enter into contracts generated from these quotations. Such automatically generated contracts have been deemed valid by the English courts despite the parties not knowing the terms of the contract before it was entered into.

Similarly, the CA held that a contract can be formed when an offer made by one algorithm is accepted by another. In this regard, the CA rejected what it called Quoine’s “artificial” argument that the mistake should be analysed through the lens of traders having a face-to-face negotiation on the “floor of the exchange”. Instead, the CA agreed with the SICC that where contracts are made by way of deterministic algorithms, any analysis concerning knowledge of a mistake or unconscionably taking advantage of one must be done by reference to the programmer’s (or the person running the algorithm’s) state of mind.

In addition, the relevant time frame for assessing the programmer’s knowledge would be from the point of programming up to the point that the relevant contract is formed. This accounts for situations where a programmer who did not contemplate the relevant mistake at the point of programming came to learn of it subsequently before the contract was formed, and yet allowed the algorithm to continue running, intending thereby to take advantage of the mistake.

Thus the inquiry should be: when programming the algorithm, was the programmer doing so with actual or constructive knowledge of the fact that the relevant offer would only ever be accepted by a party operating under a mistake, and was the programmer acting to take advantage of such a mistake?

Applying the above principles, the CA held there was no unilateral mistake here, whether at common law or equity.

No mistake. The CA held that the Disputed Trades, and the trading price of the cryptocurrencies, were a result of the deterministic algorithms deployed by B2C2. These algorithms had acted exactly as they had been programmed to act. In fact, the actual mistake here was a mistaken assumption on the part of the Counterparties as to how the Platform operated. They had assumed that the Platform would either always operate as intended, or there would be adequate systems to prevent trading from continuing if the Platform operations deviated from this assumed state. However, this was a mistaken assumption only as to the circumstances under which the Trading Contracts would be concluded, not as to a fundamental term of the contracts.

No knowledge. The CA also held that Boonen did not have actual or constructive knowledge of the fact that the price of the Disputed Trades did not accurately represent the true market value of the ETH relative to BTC on such date. As programmer of B2C2’s algorithm, Boonen would have had to foresee a “perfect storm of events” that began with the problems with Quoine’s own algorithm, and ended with the Disputed Trades being concluded at the Deep Price for him to have had, or be taken to have had, this knowledge. There was no evidence that he had ever contemplated anything of the sort. Indeed, based on the evidence, Boonen had never considered that there was a real possibility of orders placed on the Platform being filled at the deep prices. Boonen also did not know of the glitches causing the illiquidity on the Platform until after the Disputed Trades had been transacted.

No taking advantage. In any event, the CA agreed with the SICC that there was no sinister motive behind Mr Boonen programming the Trading Software with the Deep Price. He had not programmed it with either the awareness or the intention to take advantage of a mistaken bid by a counterparty or to enter into a contract on that basis. Following from the principles stated above, the relevant inquiry would be: when programming the Trading Software with the deep prices, was the programmer doing so with actual or constructive knowledge of the fact that sell orders at those prices would only ever be accepted by a party operating under a mistake and was the programmer acting to take advantage of that mistake? The CA held that the answer was no.

(2) Common mistake

Quoine also argued that B2C2 and the Counterparties shared a common mistake to the price of the Disputed Trades. The CA quickly dismissed this argument as well, because there was no mistake on B2C2’s part. B2C2 had placed its sell orders for ETH at around the Deep Price because the intentionally pre-programmed deep price of 10 BTC to 1 ETH had taken effect.

(D) Whether B2C2 was unjustly enriched

Quoine claimed it was entitled to cancel the trade because B2C2 had been unjustly enriched due to the mistake, at the expense of the Counterparties and/or Quoine. The CA stated that for an action in unjust enrichment to succeed: there must be a benefit received by the defendant; the benefit must be at the claimant’s expense; and the defendant’s enrichment must be unjust.

In this case, the CA held there was nothing “unjust” about the situation. The Trading Contracts were not invalidated by any mistake. Moreover, an enrichment cannot be “unjust” if it was a result of a valid contract between the parties.

(E) Whether Quoine held the cryptocurrencies on trust for B2C2

To create a trust, three things must exist: an intention to create a trust, a property to be placed on trust, and a beneficiary of the trust. The CA did not have to decide whether cryptocurrency was a species of property that could be held on trust, given its finding that there was no intention to create a trust.

The SICC had found that Quoine’s separation of cryptocurrencies in different accounts was a “decisive factor” in inferring intent to create a trust, as it indicated that Quoine claimed no title to the user’s assets and acknowledged that it was holding them for the user who could demand withdrawal at any time. However, the CA held that the mere fact that Quoine’s assets were segregated from its customers’ could not, in and of itself, lead to the conclusion that there was a trust. In any event, the way the BTC was stored by Quoine suggests that there was in fact, no segregation.

III. Dissent

In contrast to the majority opinion, the dissent found that there was indeed a unilateral mistake at equity. However, it conceptualised unilateral mistake at equity differently: the mistake need not be as to a fundamental term of the contract, if it was sufficiently fundamental to justify judicial intervention.

It further stated that the law of unilateral mistake should not be applied in a manner which left out of consideration circumstances which were normally central to its application, simply because the parties entrusted their dealings to computers which could have no such consciousness. The law had to be adapted to the new world of algorithmic programmes and artificial intelligence, in a way which gave rise to the results that reason and justice would lead one to expect. Thus, there was nothing surprising about the law applying a test which asked what an honest and reasonable trader would have understood, given knowledge of the particular circumstances (i.e. Quoine’s proposed test).

It also noted that the SICC’s decision omitted a usually important element in any appraisal of such a situation, namely (as here): whether there was anything drastically unusual about the surrounding circumstances or the state of the market to explain on a rational basis why such abnormal prices could occur, or whether the only possible conclusion was that some fundamental error had taken place, giving rise to transactions which the other party could never rationally have contemplated or intended.

Here, any reasonable trader would at once have identified, as B2C2 did identify, a fundamental computer system breakdown as the cause of the transactions, which could be rectified without detriment to B2C2 or other third parties. The considerations weighing in favour of reversal of the transactions outweighed any errors or faults which led to that breakdown.

The dissent also discussed the role of the concept of unconscionability, stating that unconscionability (in bringing about the transactions) should not have a role in this novel situation. However, to the extent that the concept might be relevant, it was clearly unconscionable in this context of unilateral mistake for a trader to retain the benefit of transactions which he would – and did – at once recognise as due to some major error as soon as he came to learn of them.

 IV. Implications

First, the majority confirmed, and the dissent did not appear to disagree, that contracts formed through deterministic algorithms are valid. The follow-up question is whether the majority’s reasoning applies to algorithms capable of machine or “deep” learning (termed loosely as artificial intelligence or “AI” here). The issue is that such AI can make its own decisions (within certain broad parameters), as it is programmed to continually “learn” from data input and modify its decision-making behaviour. Since it can modify its decision-making behaviour, logically such AI would not be considered deterministic, in the sense used by the majority. It thus follows that in cases where the AI has modified its decision-making behaviour, it may no longer reflect the intent of its programmers; hence agreements formed by it may not fit within this analysis.

A related question would also be: where AI can “learn” and modify its behaviour, who should be held responsible for what the AI subsequently does? For example, assume an AI chatbot was released on social media because its programmers intended it to interact with and learn from other users. However, the chatbot instead learnt offensive remarks from these users. In such cases, would the programmers be responsible for its behaviour, as they intended for the chatbot to learn autonomously? Or should responsibility lie with the users who taught the chatbot such behaviour?

Second, whether cryptocurrency can be held on trust remains an open question. The CA noted that there was much to commend the view that cryptocurrencies can be assimilated into the general concepts of property. However, the difficulty of the precise nature of the property remains. In coming to this conclusion, the CA canvassed cases from other jurisdictions that had accepted cryptocurrency as property, but noted that they had not pinned down the exact nature of the property. It also noted that while academic commentators broadly agree that cryptocurrencies can be property, there was still much disagreement on its exact nature.

Lastly, there is value in considering the dissenting opinion. While too much judicial flexibility can lead to uncertainty in commercial transactions, there are some cases where justice and fairness should prevail. For example, if (as the dissent suggested) the mistake was caused by hackers depriving the Platform of access to the external market data, and not because of an oversight on Quoine’s part, the majority’s approach may not have led to a just outcome.

– – – For a PDF version of this article, click here. – – –


Written by: Lokman Hakim Bin Mohamed Rafi, 3rd-year JD student, Singapore Management University School of Law.

Edited by: Ong Ee Ing (Senior Lecturer), Singapore Management University School of Law.

[1] Both BTC and ETH are types of cryptocurrencies.

[2] A void contract is treated as if it never existed and cannot be enforced. A voidable contract continues to exist and is enforceable until it is set aside by the party that did not breach the contract.

[3] A majority decision of the court happens when it is agreed to by more than half of the judges. A minority, or dissenting, opinion refers to the decision of the judges that did not agree with the majority. Here, the majority comprised Chief Justice Sundaresh Menon, Judges of Appeal Andrew Phang Boon Leong and Judith Prakash, and International Judge Robert Shenton French. The sole dissent was by International Judge Johnathan Mance.

[4] Margin trades, which are trades entered into using borrowed funds (including cryptocurrencies), is permitted on the Platform. For margin traders with loans from Quoine, the assets in their accounts served as the collateral for the loans. If the collateral in the margin trader’s account fell below a pre-determined percentage of such loan, a “margin call” was triggered and the Platform would automatically sell the cryptocurrencies being held by that trader to meet the shortfall in the loan (i.e. force-close an open position). Due to the way that the Platform was programmed, abnormally priced orders or an abnormally thin order book could affect whether the collateral in accounts had fallen below the pre-determined percentage, causing the Platform to force-close the margin trader’s positions, at the best available price on the Platform.

[5] Generally, there are different rules and remedies when one argues a claim in “law” versus in “equity.”