Friday, September 29, 2017

Blockchain 101 - Part 1


What is blockchain? When this question is posed by someone unfamiliar with blockchain, the typical answer by someone familiar with blockchain is that it is a distributed "digital ledger." To the person asking the question, this may mean absolutely nothing. There is no clarity or understanding gained. This article is the first in a series of three articles. The three articles will attempt to set out the following: an explanation of how blockchain works, its potential uses in the supply chain and the legal issues arising from its use.

Blockchain has been linked to Bitcoin, a digital currency. Bitcoin is built on the foundation of blockchain, which serves as Bitcoin’s shared ledger. Blockchain is like an operating system or platform. Bitcoin is only one of the many applications of blockchain. Blockchain is a shared ledger, a record of transactions, like a traditional ledger. The transaction can be any movement of money, goods, services or data. Blockchain facilitates the process of recording transactions and tracking assets in a business network. An asset can be tangible — a house, a car, cash, land — or intangible like intellectual property, such as patents, copyrights, or branding. Virtually anything of value can be tracked and traded on a blockchain network, reducing risk and cutting costs for all involved. (*1)

Typically, transactions are verified by a central authority such as a bank or government authority.  An example is illustrative. Your bank account transactions are stored on a computer server hosted by or for the bank. Your transactions such as deposits, withdrawals, fees, cheques, Interac payments and receipts etc. are stored on a computer server. They may be reflected in paper records such as deposit slips, withdrawal slips, cheques and bank books but the full record of the transactions are stored as data on the bank’s servers. Blockchain applications replace the centralized systems with decentralized ones, where verification comes from the consensus of multiple users. This is what distinguishes and is unique to blockchain. The information is not stored in any one server that can be hacked. The transactions are stored as blocks of data on multiple worldwide servers. The blocks are time stamped and sent out to the blockchain network. The blocks are connected as chains. Hence the term “blockchain” or originally “block chain.”  The blocks are chained together securely using cryptography. In order to change or add to a record the transaction has to be verified by the majority of computers on the network. The records on the chain is like a traditional computer database. All the information is sequential which avoids duplicate entries. Blockchain networks are anticipated to meet the needs of the future. That need has been described as follows (*2)

Throughout history, instruments of trust, such as minted coins, paper money, letters of credit, and banking systems, have emerged to facilitate the exchange of value and protect buyers and sellers. Important innovations, including telephone lines, credit card systems, the Internet, and mobile technologies have improved the convenience, speed, and efficiency of transactions while shrinking and sometimes virtually eliminating the distance between buyers and sellers. Still, many business transactions remain inefficient, expensive, and vulnerable, suffering from the following limitations:
(a) Cash is useful only in local transactions and in relatively small amounts.
(b) The time between transaction and settlement can be long.
(c) Duplication of effort and the need for third-party validation and/or the presence of intermediaries add to the inefficiencies.
d) Fraud, cyberattacks, and even simple mistakes add to the cost and complexity of doing business, and they expose all participants in the network to risk if a central system, such as a bank, is compromised.
(e) Credit card organizations have essentially created walled gardens with a high price of entry. Merchants must pay the high costs of onboarding, which often involves considerable paperwork and a time-consuming vetting process.
(f) Half of the people in the world don’t have access to a bank account and have had to develop parallel payment systems to conduct transactions.

Transaction volumes worldwide are growing exponentially and will surely magnify the complexities, vulnerabilities, inefficiencies, and costs of current transaction systems. The growth of ecommerce, online banking, and in-app purchases, and the increasing mobility of people around the world have fueled the growth of transaction volumes. And transaction volumes will explode with the rise of Internet of Things (IoT) — autonomous objects, such as refrigerators that buy groceries when supplies are running low and cars that deliver themselves to your door, stopping for fuel along the way. To address these challenges and others, the world needs payment networks that are fast and that provide a mechanism that establishes trust, requires no specialized equipment, has no chargebacks or monthly fees, and provides a collective bookkeeping solution for ensuring transparency and trust.

Some descriptions describe blockchain as a “transparent ledger”. This does not mean that it is visible to everyone. On a public blockchain (such as is used on bitcoin) the information is stored on everyone’s computers on the blockchain network. There is security involved. The key to blockchain’s security is a “hash”. A hash is a bit of cryptographic math (a digital fingerprint or unique identifier) that makes the links between the blocks virtually unbreakable. Each block contains hash timestamped batches of recent valid transactions, and the hash of the previous block. The previous block hash links the blocks together and prevents any block from being altered or a block being inserted between two existing blocks. In this way, each subsequent block strengthens the verification of the previous block and hence the entire blockchain. Blockchain has its own language. Every computer (yours and mine) are considered “nodes”. Every node has a file of transactions (a “ledger”). There are also “miners” - verifiers of the transaction who receive a reward. A very good comparison of how a traditional transaction takes place versus how a blockchain transaction takes place has been described as follows (*2): 

In a traditional environment, trusted third parties act as intermediaries for financial transactions. If you have ever sent money overseas, it will pass through an intermediary (usually a bank). It will usually not be instantaneous (taking up to 3 days) and the intermediary will take a commission for doing this either in the form of exchange rate conversion or other charges.

The original Blockchain is open-source technology which offers an alternative to the traditional intermediary for transfers of the crypto-currency Bitcoin. The intermediary is replaced by the collective verification of the ecosystem offering a huge degree of traceability, security and speed.

In the example above (a "public Blockchain"), there are multiple versions of you as “nodes” on a network acting as executors of transactions and miners simultaneously. Transactions are collected into blocks before being added to the Blockchain. Miners receive a Bitcoin reward based upon the computational time it takes to work out a) whether the transaction is valid and b) what is the correct mathematical key to link to the block of transactions into the correct place in the open ledger. As more transactions are executed, more Bitcoins flow into the virtual money supply. The "reward" miners get will reduce[s][sic] every 4 years until Bitcoin production will eventually cease (although estimates say this won't be until 2140!). Of course, although the original Blockchain was intended to manage Bitcoin, other virtual currencies, such as Ether, can be used.

Blockchain technology does not have to exist publicly. It can also exist privately - where nodes are simply points in a private network and the Blockchain acts similarly to a distributed ledger.

The following is an example of how blockchain could hypothetically transform an everyday transaction - sale and purchase of a trusted concert ticket (*3): 

Can You trust Your Seller? 
It’s hard to tell real tickets from counterfeits, especially if you bought them from a third-party website or a private individual. 
Going Straight to the Source
A blockchain can help buyers quickly establish that a ticket (and its seller) can be trusted. 
The event venue registers the event, date and serial number of each ticket to a blockchain which is accessible online. 
When the ticket is first sold, it’s assigned an address - a string of data which is publicly viewable on the blockchain.
The owner is given a private key, which is a hash of the address data. The key can be used to “unlock” the address. 
So by producing the correct key, the buyer can prove the item is hers, without having to check with the event venue. 
If she chooses to sell the ticket, it’s assigned a new address, and the new owner gets a new private key. And the new transaction is added to the blockchain. 
The ticket can be resold multiple times, and when a seller unlocks the address with this private key, the buyer knows the ticket he is getting is authentic. 

Blockchain has a number other potential uses. It can hold and protect sensitive information such as ID’s. Traditionally ID documentation has been issued and monitored by governments. Digital identification with the assistance of a blockchain network could be more secure. It’s the decentralization of the bits of information that is critical to the security. Many companies have been hacked and customer information compromised. Home Depot and more recently Equifax suffered from hacking incidents whereby customer information was obtained by hackers. The hacker was able to “hack” into the server storing the information and this should not happen with a decentralized storage system, where the information (blocks and chains) are stored on multiple nodes in the blockchain network. 

A number of hurdles have to be overcome for businesses to separate from manual processes and to adopt blockchain in their processes. Many businesses in the transportation field are already moving in this direction. For example, most ocean carriers already use electronic bills of lading. These were the first steps into the future. For businesses the new costs and risks of utilizing new technology may delay its implementation. Goldman and Sachs sets out the milestones relating to the adoption of blockchain (*4): 

1. Companies Begin Piloting Uses of Blockchain Technology
2. Global Companies Start Adopting Blockchain
3. Early adopters begin to benefit
4. Majority of Corporations Have Blockchain projects in production
5. Widespread Adoption of Blockchain

Security concerns can also delay blockchain adoption. No technology is one hundred percent secure. Where large sums of money are involved, hackers will try to follow. Through the use of private keys, IDs and permissions, users can specify which transaction details they want other participants to be permitted to view. Permissions can be expanded for special users, such as auditors, who may need access to more transaction detail. The ledger itself is shared, updated with every transaction and selectively replicated among all participants (nodes) in near real time. It is not owned or controlled by a single organization. The platform’s continued existence is not dependent upon any individual entity. All relevant network participants (or a large majority) must agree a transaction is valid. This is achieved through a use of consensus algorithms. Each blockchain network can establish the conditions under which a transaction or asset exchange can occur. Smart contracts (those that execute based on one or more conditions being achieved) can be built into the platform (*5). Below is another example of a potential use in the automotive industry (*6):

1.         The government regulator creates and populates the registration for the new vehicle on the blockchain and transfers the ownership of the vehicle to the manufacturer.
2.         The manufacturer adds the make, model, and vehicle identification number to the vehicle template within the parameters allowed by the smart contract (a digital agreement or set of rules that govern a transaction
3.         The dealer can see the new stock availability, and ownership of the vehicle can be transferred from the manufacturer to the dealership after a smart contract is executed to validate the sale.
4.         The leasing company can see the dealer’s inventory. Ownership of the vehicle can be transferred from the dealer to the leasing company after a smart contract is executed to validate the transfer.
5.         The lessee can see the cars available for lease and complete any form required to execute the lease agreement.
6.         The leasing process continues between various lessees and the leasing company until the leasing company is ready to retire the vehicle. At this point, ownership of the asset is transferred to the
scrap merchant, who, according to another smart contract, has permission to dispose of the vehicle.


Part 2 of this article will examine the uses of blockchain in the supply chain. 

Contract Interpretation in Quebec


The Supreme Court of Canada recently affirmed the validity of contracts in Quebec that contain perpetual terms. In so doing, the Supreme Court of Canada also reaffirmed general principles of interpretation and freedom of contract in Quebec.

Uniprix Inc. v. Gestion Gosselin et Bérubé Inc. 2017 SCC 43 concerned a number of pharmacists who decided to affiliate their pharmacy with the Uniprix Inc. (“Uniprix”) banner. The parties had entered into a contract of affiliation for a fixed term of five years. The contract contained a clause to the effect that it would be renewed automatically unless the member pharmacists gave notice to the contrary six months prior to the automatic renewal date.

The contract was renewed automatically in 2003 and 2008 (two terms). On July 26, 2012, Uniprix notified the member pharmacists that their contractual relationship would terminate as of January 28, 2013, thus providing notice six months prior to the automatic renewal period. Of note is the fact that the contract had a provision for termination for the member pharmacists but no equivalent clause for Uniprix. Uniprix could only terminate the contract for cause. The member pharmacists objected, arguing that the contract of affiliation was to be renewed automatically unless they gave notice to the contrary. In their view, nothing in the renewal clause entitled Uniprix to oppose this renewal. Uniprix argued that it could oppose the renewal and terminate the contract upon the expiry of the term. It added that the interpretation proposed by the pharmacists had the effect of binding it in perpetuity, which would be contrary to public order.

In a 6 to 3 decision, the Supreme Court of Canada held that unilateral renewal clauses are valid in Quebec law even though they may give a contract perpetual effect. The dissent opinion held that the renewal clause made it impossible for Uniprix to know the contract’s termination date, which turned the contract into one for an indeterminate term. The contract could therefore be terminated on reasonable notice, six months in this case. For indeterminate contracts the Civil Code allows a court to fix the term of the contract or to allow termination on reasonable notice.

The Supreme Court of Canada held that autonomy of the will (freedom of contract) is a fundamental principle of Quebec civil law. This contractual freedom allows the parties to a contract to structure their relationship as they see fit within the limits imposed by legislation and the requirements of public order. The contract did not fit within the limits imposed by legislation or the requirements of public order. At paragraph 26 the Court described this type of contract:

The parties signed a contract entitled contract of affiliation. This type of contract is not a nominate contract within the meaning of the Code. Rather, it is an onerous, bilateral contract of successive performance in which the parties obligate themselves reciprocally, each to the other (arts. 1380, 1381 and 1383 C.C.Q.). Because the contract was freely negotiated, it can hardly be characterized as a contract of adhesion (art. 1379 C.C.Q.).

The Supreme Court of Canada provided a pathway of analysis of a contract in Quebec.

a)         The first step in interpreting a contract is to determine whether its words are clear or ambiguous. If the words are clear, the court’s role is limited to applying them to the facts before it. If the court identifies an ambiguity, it must resolve the ambiguity by proceeding to the second step of contractual interpretation.

b)         The cardinal principle that guides the second step of the interpretation is that “the common intention of the parties rather than adherence to the literal meaning of the words shall be sought.” In this exercise, it is necessary to consider intrinsic aspects of the contract, such as the words of the clause at issue and the other clauses, in order to ensure that each of them is given a meaningful effect and that each is interpreted in light of the others. The interpretation of a contract also requires consideration of the nature of the contract and of the context extrinsic to it, including the factual circumstances in which it was formed, how the parties have interpreted it, and usage.

The Court went on to find that the termination clause was not ambiguous and that nothing in the Quebec Civil Code prohibits such a contract of affiliation from having effects that could be perpetual. Nor was there any basis for concluding that such contracts are contrary to public order. The Court noted that Uniprix was unable to identify the fundamental values that would be undermined by a perpetual contract, and more specifically, by its contract of affiliation with the member pharmacists.

At paragraph 91 the Court commented on when perpetual contacts may offend public order:

We agree that there are circumstances in which the imposition of perpetual obligations could offend public order. For example, the protection of individual freedom and fundamental rights is one of our fundamental societal values. It is why the legislature has limited the term of contracts of employment: to preserve the freedom of employees (Baudouin and Jobin, at No. 441; Asphalte Desjardins inc. v. Québec (Commission des normes du travail)2013 QCCA 484, at para. 50 (CanLII); reversed on appeal, but not on this point: 2014 SCC 51 (CanLII), [2014] 2 S.C.R. 514). For contracts whose attributes have not been regulated by the legislature, it is also necessary to [translation] “reconcile two principles, autonomy of the will and freedom of the person — especially that of natural persons” (Lluelles and Moore, at No. 2154). It follows that it would likely be contrary to public order to impose in perpetuity obligations whose nature is such as to affect an individual’s person and freedom (ibid., at No. 2156).

The Court also rejected the argument that an express stipulation is required in order to give effect to the term of the contract whose effects could be perpetual. The Court added at paragraph 72:

 In Quebec civil law, the fundamental principle of consensualism prevails unless a “particular or solemn form is required as a necessary condition for the formation of a contract” (art. 1414 C.C.Q.). As Professors Baudouin and Jobin point out, [translation] “a contractual obligation arises from the meeting of two minds and does not have to be expressed in a particular form prescribed by law in order for the contract to be valid” (No. 90). The problem raised by the possibility of the contract having perpetual effect must be resolved not by taking a formalistic approach, but by analyzing the common intention of the parties having regard to the provisions of the Code and to public order. Once this common intention has been identified, it does not matter whether the possibly perpetual effects of the contract result from an express stipulation. In our opinion, the metaphor our colleague employs in this regard (at para. 167) seems inappropriate. While it is true that the Code requires the observance of formalities, on pain of nullity, for the exchange of marriage vows (arts. 365 to 377 and 380 C.C.Q.Rules respecting the solemnization of civil marriages and civil unions, CQLR, c. CCQ, r. 3), it does not do so for an innominate commercial contract of affiliation entered into by sophisticated parties.

The majority of the Supreme Court of Canada dismissed Uniprix’s appeal. The minority found that the contract was indeterminate. As such, the parties would be able to terminate the contract on reasonable notice.

Lesson learned: Clarity is required in drafting contracts to ensure that a party has an avenue for exit unless that is the intention of the parties and it should be clearly set out.

The last paragraph of the dissent decision of the Supreme Court of Canada, delivered by Justice Cote is apt:


 I acknowledge that the civil law’s workings in this case are somewhat complex. But, as always, its underlying rationale is simple. A court should not forever wed two parties in an unhappy marriage where only one of them has an avenue for exit, in the absence of express vows to that effect. In other words, in characterizing the term of a contract, perpetuity should not be inferred.