From What I Read: Smart Contracts

I have been thinking a lot about what would make a good topic to write, after featuring ICOs and blockchain in this site. The original idea was to move on to another genre away from blockchain technology, such as machine learning/artificial intelligence. But I felt there is a need to address about smart contracts to provide a fitting closure to the blockchain genre, since smart contracts are mentioned in the two articles and yet did not have enough screen time for elaboration.

Smart contracts – it is quite tempting to perceive at first glance that this could be something revolutionary. After all, anything that adds the word “smart” in front would suggest a radical shift from its original nature. Just take smartphones for instance – Alexander Graham Bell would not in his wildest dreams foresee his invention of communicating through electric wires would have come to this day of wireless and interactive communications (which also means having to bear with dog-faced Snapchat filters). But I digress – does putting the word “smart” before contracts presents a tectonic shift to the legal contracts as we know it?

My readings will be from Blockgeeks Inc., Coin Center, Bloomberg (an opinion piece by Elaine Ou, a blockchain engineer, and a news article) and MIT Technology Review (both articles by Mike Orcutt). The references will be included below.

What is the subject about?

The phrase “smart contracts” was coined by Nick Szabo (a legal scholar and cryptographer) in 1994 after realising that the blockchain could be used for digital contracts. And according to Blockgeeks, smart contracts are contracts converted into code, stored and replicated in the system and supervised by the network of computers running the blockchain, resulting in ledger feedback, such as transfer of money, or the receiving of product or service.

The article also quoted Nick Szabo’s analogy of the vending machine, where the machine takes a coin and dispense a product and the correct change according to the displayed price – the parallel being the blockchain (digital ledger) takes the coin (or a certain asset) and runs the code until it reaches a point that it validates a condition and determines how the asset should be managed, such as transferring to another person, or to be refunded back to the person, or any combination of both.

Mike Orcutt from MIT Technology Review further elaborates Nick Szabo’s view, in that the vision is to embed the many contractual clauses in the hardware and software we use and interact with such that the breach of contract would be expensive. However, the author pointed out in a separate article that the newness of the technology meant that there was no agreed definition on what smart contracts are (and this has implied consequences, which will be elaborated later).

How does it work?

Continuing in MIke Orcutt’s article in MIT Technology Review was a distilled technical definition of smart contract: it’s simply an “If-Then” statement that runs on a blockchain.

Blockgeeks illustrated how a smart contract may work in an example of an apartment rental through the blockchain (and payment is made by cryptocurrency): a receipt of the rental is held in a virtual contract; a digital entry key comes to the tenant by a specified date or otherwise a refund is released,; the system works on the If-Then premise witnessed by people on the blockchain ensuring a faultless delivery; the document is cancelled automatically after the agreement period expires; the code cannot be interfered by either landlord or tenant without the other knowing since all parties are simultaneously alerted should there be changes.

The same site also provided example in a basic code on Ethereum, as well as a visual illustration:

How-Smart-Contracts-Works-1

How does it impact (in a good way)?

As you can see from the visual illustration, there would be opportunities of automation at the registry and even at a legal institution (or at least what a courthouse looks like). Coin Center’s Houman Shadab pointed out that smart contracts may reduce the need for litigators, judges and arbitrators since the execution of a contract is done automatically without human element, and is verified by witnesses i.e. the network of people in the blockchain.

The other reduction we see would be the need for intermediaries. We may need to rely on brokers and lawyers to prepare (monitor and execute) an agreement currently, while smart contracts may enable us to create (and manage) these agreements on our own in the future, thereby eliminating the need for middlemen. That being said, as Houman Shadab pointed out, the use of smart contracts would lead to an increase in the need for transactional attorneys and others to structure smart contractual relationship. Blockgeeks offered a different possibility of the future, where lawyers would change from writing traditional agreements to coding standard smart contract templates (such as those traditional contract templates on LegalZoom).

Blockgeeks outlined the benefits of smart contracts, which sounded similar to the blockchain: Autonomy (no need for intermediaries, reducing third-party manipulation), Trust and Safety (encryption on a shared ledger), Backup (documents are duplicated many times over the blockchain network), Speed (automation of task processes), Savings (elimination of intermediaries or notaries for a transaction), Accuracy (errors in manual input of forms avoided through automation).

There are currently several real-world use cases of smart contracts. The Depository Trust & Clearing Corp (which was mentioned in the previous post on blockchain) in 2015 has processed 345 million securities transactions on a blockchain ledger, while Barclays Corporate Bank have partnered with a blockchain tech company, Wave in testing the use of smart contracts to log change of ownership and automatically transfers payments to other financial institutions within supply chain management. Bloomberg also reported several cases of smart contracts being tested on the equity- and credit-default-swaps markets.

Of course, the potential of smart contracts can be scaled up to cover other areas of life, such as government (electronic voting), management (process automation), automobile (accident fault detection, variable-rate insurance), and healthcare (transferring of health records to insurance providers, healthcare management i.e. supervision of drug administration, test results etc.).

What are the issues?

At present, there are trust issues with the blockchain platforms on which smart contract attempts are built upon. According to Elain Ou’s article, in 2017, $150 million worth of ether were stuck in multi-signature wallets (which functions like joint bank accounts requiring permission of two or more individuals) after a botched hacking attempt. Earlier in the same year, a Canadian exchange, QuadrigaCX accidentally trapped $13 million in its own broken smart contract. And yet according to the author, the multi-signature wallet is the simplest application one can build based on smart contracts.

These issues came about due to the wallets’ reliance on a single, centralised bit of code which made it vulnerable to hacking attacks and trapping users’ funds within the wallet. And to make matters more difficult, the immutability nature of smart contracts (and the blockchain) makes issues harder to resolve or contracts to be rescinded.

Smart contracts’ vague definition (earlier mentioned) also caused different understanding among legislators, which potentially causes chaos from the variation of smart contracts’ governance. Mike Orcutt reported the cases of legislators in Tennessee and Arizona legally recognising smart contracts to attract investments and entrepreneurs, but also highlighted the difference in the laws enacted by the respective states. Furthermore, the Chamber of Digital Commerce argues that existing laws have provided an “unquestionable legal basis” for smart contracts, which are essentially legal contracts executed on the blockchain – hence Orcutt’s point that “a smart contract is simply an “if-then” statement that runs on a blockchain”.

On a practical level, the problems of smart contracts pile up. Blockgeeks highlighted the potential issues of bugs in smart contracts’ code, government regulation, taxation, legal jurisdiction and enforcement on non-digital components in a contract (for example, a rental agreement via a smart contract would be difficult, if not impossible, to enforce the clause of prohibiting the tenant to make the rented property for public use).

Houman Shadab highlighted several issues that are on a conceptual level. Since smart contracts are immutable, this would led to contracts ending up being ambiguous and imprecise, as contracting parties would prefer flexibility and avoiding to lock themselves into rigid commitments and outcomes. The example given in the article was the renegotiation feature of a traditional contract when circumstances change, like a contract for an actor can be renegotiated after his/her debut movie became a big hit.

Shadab further added that the real world is not sold on the benefits brought about by presently available systems that are similar to smart contracts, such as bank payment obligations – an electronic letter of credits that pays the seller if the correct data showing the goods were shipped to the buyer were transferred to the bank – which were slow to be adopted by corporate clients of banks due to the lack of awareness, critical mass and cost of implementation.

Not to mention, there are already automation in the contracting process and related business operations in which smart contracts are expected to replace. The promises of smart contracts may have been captured with the likes of automation softwares provided by software companies such as Oracle (PeopleSoft platform), ABLSoft and Ftrans.

The allure of smart contracts, after all, may not be that attractive as we perceive.

How do we respond?

In view of the many issues surrounding smart contracts, it goes without mention that there is much room for improvement for this piece of innovation. As a start, Shadab pointed out that built-in mechanisms and protocols would be needed to facilitate adjustments in the terms of an agreement without the need for renegotiation. This would mean that users would not need to require new code when there arise a need for changes in terms as circumstances change.

The author further urged for smart contracts to overcome problems of existing contract automation initiatives to provide differentiation points over them, making smart contracts as a viable replacement over them. This could be done by having features over and above those offered by companies selling contract-enhancing softwares.

Elaine Ou implied that blockchain platforms would need to prove itself to be trustworthy and reliable for smart contracts to operate, in order to restore trust within the public and facilitate mass adoption. Improvements, though, would be “an onerous, slow-moving process” unlike the surge in cryptocurrency prices in 2017.

We as a society would also need to better understand the implications of smart contracts, namely the empowerment of users to manage their own rights and obligations in the apparent absence of intermediaries or legal institutions. This would possibly require a paradigm shift, a generation’s mindset and lifestyle overhaul, assuming conventional contracts and agreements would be replaced with digital contracts with automatic enforcement

But for now, there are just quite a myriad of issues for smart contracts to address and overcome – so much so that the blockchain engineer called them outright “dumb”. Would the idea of smart contracts work eventually, though? Perhaps we have to take cue from the earlier example of Alexander Graham Bell’s invention of the phone, and keep an open mind to future’s endless possibilities.

References

What Are Smart Contracts? A Beginner’s Guide to Smart Contracts – Blockgeeks: https://blockgeeks.com/guides/smart-contracts/ 

What are Smart Contracts, and What Can We do with Them? – Coin Center: https://coincenter.org/entry/what-are-smart-contracts-and-what-can-we-do-with-them 

Smart Contracts Are Still Way Too Dumb – Bloomberg: https://www.bloomberg.com/view/articles/2017-11-16/smart-contracts-are-still-way-too-dumb 

Blockchain Gets a Wall Street Win: ‘We Know the Thing Works Now’ – Bloomberg: https://www.bloomberg.com/news/articles/2017-11-20/blockchain-gets-a-wall-street-win-we-know-the-thing-works-now 

Ethereum’s smart contracts are full of holes – MIT Technology Review: https://www.technologyreview.com/s/610392/ethereums-smart-contracts-are-full-of-holes/ 

States that are passing laws to govern “smart contracts” have no idea what they’re doing – MIT Technology Review: https://www.technologyreview.com/s/610718/states-that-are-passing-laws-to-govern-smart-contracts-have-no-idea-what-theyre-doing/

Featured Image from Blockgeeks: https://blockgeeks.com/guides/smart-contracts/

From What I Read: Blockchain

Blockchain – a topic that is kind of overshadowed by its famous application in the past couple of years, and could fundamentally change the world as we know it. But ask someone on the street to try explaining the concept, and more likely than not it would be met with blank stares and stuttered response. So, I will try to communicate some understanding about the concept in 5 main points.

My readings will be from WIRED, Harvard Business Review, Bloomberg, and two other individual authors – Hayley Somerville (https://www.linkedin.com/in/hayleysomerville/) and Tony Yin (https://www.linkedin.com/in/tonyin/). The references will be included below.

What is the subject about?

When it comes to explaining blockchain, the technical definition would obviously involve the words “block” and “chain”. But on a more general and conceptual level, it is explained as an “open, distributed/decentralised, digital ledger of transactions”.  And for those who may not be that familiar, ledger is like a notebook to record transactions, and previously was more common in the world of accounting (and still is).

So how does a notebook containing transactions be open and distributed? While the more intricate details will be explained in the next point, for now we will understand it as such: the ledger is replicated, and an identical copy is stored on each computer that makes up the blockchain network – and when there are changes to one copy, all other copies will be updated simultaneously.

How does it work?

Harvard Business Review has nicely outlined 5 basic principles in explaining how blockchain works:

  1. Distributed Database: In a blockchain network (made up of multiple parties on the computers), each party has access to the whole database and its complete history. Distributed also means no single party controls the data or the information, but every party verifies the records in the database without any middleman.
  2. P2P Transmission: Instead of going through a central node (point), communication is done between peers (the earlier mentioned parties/computers) where each node stores and forwards information to all other nodes.
  3. Transparency with Pseudonymity: Transparency – every transaction is visible to anyone with access to the system; pseudonymity – each node on a blockchain has a unique alphanumeric address that identifies it (instead of names), and transactions occur between these addresses.
  4. Irreversibility of Records: Records of completed transactions are linked (hence, the “chain”) to every transaction record that came before them. This way, the transactions are locked, and to alter would require altering the records that came before them (before new transactions attaches to them). To add on further, various computational algorithms ensure the recording is permanent (or super-duper difficult to crack), chronologically ordered, and available to all others in the network.
  5. Computational Logic: Users can set up alogrithms and rules that automatically trigger transactions between nodes. (This feature will be explained further in the following points about application).

Now, many may still find it difficult to visualise how this works from the 5 principles, which explains why there are articles such as “Explained Like I’m 5: Blockchain”, and a video of an expert explaining blockchain in 5 different difficulty levels.

In one “Explained Like I’m 5” article, Hayley Somerville used an example of schoolchildren trying to track lunch IOUs (an informal note on who-owes-what) between each other. The problem was this particular child was owing lunches all-around after asking for bits and pieces of lunch from the other children, but did not reciprocate by offering parts of his lunch to others. Without an IOU recorded somewhere, he could get away with it. But relying on a central IOU notebook (held by a teacher who conveniently sleeps during recess), the child exploits the fallibility of the sleeping teacher to alter the records in this notebook.

The solution then is to invent an electronic IOU notebook via a mobile app used by the whole class of children, where every time a person adds an IOU, it goes to everyone’s phone at the same time (and no one can change the truth, because everyone knows the truth – the same list of all the IOUs, and which phone number the IOUs came from). Every time an IOU is added, everyone’s app will verify the IOU, and when enough of the apps agrees that the IOU is legit, the IOU is stored as a ‘block’ in everyone’s digital notebook.

The other feature is that these blocks are linked, so that no matter how many times the IOU is exchanged (let’s say A owes B, and B owes C – allowing C to claim from A), the origin of the lunch can be traced back. And to encourage participation, the whole class agrees that each time x number of IOU blocks have been verified, those apps that did the verification will get a chance for a treat.

(But seriously, how does it work?)

For a more technical way to explain blockchain, you may want to check out this video (which I previously mentioned).

How does it impact (in a good way)?

Now, the first application of blockchain technology was Bitcoin, founded by Satoshi Nakamoto (an anonymous person whose identity is still a mystery). And since then, a flood of cryptocurrencies were thus born, aimed to substitute traditional means of transacting money (that is through “central nodes” of banks). This would also mean lower transaction costs, and faster transaction speeds.

So far in this post, I have been using the word “transaction”, which may lead to confining the idea to mere financial transactions. In the world of blockchain though, simply replace the word “transaction” to “information”, and the scalability of blockchain’s application would be almost endless.

According to WIRED, biggest advocates believe that blockchains can replace central banks (through cryptocurrencies), and “usher in a new era of online services outside the control of internet giants such as Facebook and Google”. The example they cited was Storj, a startup offering file-storage service by distributing files across a decentralised network.

Also, since no single entity has monopoly over the validity of transactions (as Tony Yin pointed out), there would be no single point of failure, and that no one can cheat the system. Therefore, there is the potential of application in corporate compliance.

Going a step further into the future, WIRED pointed out that our digital identities can be tied to a token on a blockchain, in which we will use this token (that is permanent and verified to be true) to log in to apps, open banking accounts, apply for jobs and even verifying messages. And since the blockchain cannot be tampered with, there are ideas of using blockchains to even handle voting.

Other than that, blockchains can also help in automating tasks. The WIRED article used an example of a will, in which it can be stored in the blockchain (hence replacing notaries), and even be made into a smart contract to automatically execute the will and disburse money to the heirs in the will. A smart contract is a software application that can enforce an agreement without human intervention.

So far, the immense potential of blockchain’s application sounded like the future is here. However, the pace of its arrival may not be as quick as we expect.

What are the issues?

In the readings, I can generally summarise the main issues into three points:

  1. Adoption requires time

    Harvard Business Review in its article compared the adoption of blockchain to the adoption of the TCP/IP protocol. And if that protocol sounds familiar, it is because you ARE on the protocol – the internet. Bear in mind, the technology was introduced in 1972, and its first single-use case was emails among researchers on ARPAnet. We have indeed come a long way in terms of time and concerted effort, going through 4 phases as identified by the article before the protocol transforms to the internet we know today (examples in parenthesis): single use (the emails on ARPAnet), localisation (private e-mail networks within organisations), substitution (Amazon online bookshop replacing traditional brick-and-mortars), and finally transformation (Skype, which changed telecommunications).And this is what Harvard Business Review argues: blockchain, as a foundational technology like the TCP/IP, would also need to go through these 4 phases: single use (Bitcoin payments, which we now see), localisation (private online ledgers to process financial transactions, which is still pretty much in development), substitution (retailer gift cards based on bitcoin), and trnasformation (self-executing smart contracts). Furthermore, the article suggested two dimensions affecting the evolution of the two technologies: novelty (how new it is, which also mean how much effort is required to ensure the users understand what problems the tech solves), and complexity (how much coordination is required to produce value with the technology).In short, it would take a while, even with the rapid pace of technology transformation, because the users would need to take a while to cope with it.

  2. Decentralised means less-to-no control

    When cryptocurrencies gained traction (and the idea of them potnetially replacing fiat currencies gained steam), central banks are generally squeamish (or weary) given the fact that cryptocurrencies, which leverages on the blockchain, have no central banks to speak of, and hence have limited-to-none influence or control on how the cryptocurrencies behave, and its relative impact to the normal fiat currencies. And such fears are also echoed by companies who want to keep a certain amount of control on how information is kept, which leads to the next point of…

  3. Open means less-to-no privacy

    At the moment, there are several financial institutions have begun experimenting the blockchain technology (examples in the next section). But these experiments involve creating “private” blockchains which run on the servers of a single company and other selected partners. This stands in contrast with the blockchains in which Bitcoin and Ethereum operate on – anyone can view all of the transactions recorded on the network. Perhaps this would indeed be the next phase of foundational technology evolution that was spoken of earlier – localisation.But on a more futuristic level, when it comes to a point where we would actually have a digital identity on a blockchain, it would mean all of our data would be in public view to everyone. And let’s say that a nation’s government has created such a blockchain, it would try to remove the pseudonymity out of the picture in the name of national security.On a less futuristic front, there are already privacy issues raised against companies that use blockchain. Bloomberg’s article pointed out that under the European Union’s General Data Protection Regulation, companies would be required to “completely erase the personal data” upon requests of any citizens. Some blockchains’ design may even be incompatible to the said regulation.

On a technical front, some may point out the issue of preventing double spending, or a conflict about a certain transaction in the ledger. To this end, according to Tony Yin, the blockchain technology do not solve the problem, but rather the implementation does via the blockchain’s proof-of-work, or how the solution to the problem is verified. (If you are thinking, what problem needs to be solved, just remember that the blocks are encrypted with mathematical problems).

On a perceptional front, there may be concerns about hacking following several cases of cryptocurrencies and ICOs hacking (e.g. Bitcoin’s Mt. Gox and the DAO hacking mentioned in the previous ICO post). However, if you were to look deeper into these hackings, you will find that while the exchanges in the front-end suffered the attacks, the underlying technology remains intact. Thus, it is important to separate front-end interfaces from underlying technology in discussing about blockchain’s security.

How do we respond?

Indeed, there are organisations that have already begun their journey of using blockchain. According to the WIRED article, the Australian Securities Exchange announced a deal to use the blockchain technology from a Goldman Sachs-supported startup for post-trade processes in the country’s equity market. On the other hand, there are reports of JPMorgan and the Depository Trust & Clearing Corp experimenting with blockchain technology to improve efficiency of trading stocks and assets. These examples show that blockchain technology can be used to solve existing problems with slow transfers beyond payments and remittances.

Harvard Business Review suggested for company executives to “ensure their staffs learn about blockchain”, and to consider developing company-specific applications based on the 4 phases identified, and to invest in blockchain infrastructure.

On a broader level, we as a society would have to address and answer more fundamental questions that the blockchain technology poses when it reaches a greater scale, such as how do we perceive data privacy, and what does it mean to have less central control in a decentralised world.

Meanwhile, the development journey of this technology has only one way to go – up. And we have to embrace the transformation and changes that come along with that development, by getting ourselves more educated about the subject matter, and considering how we can leverage the technology to make lives better.

References

What Is Blockchain? The Complete WIRED Guide – WIRED: https://www.wired.com/story/guide-blockchain/

The Truth About Blockchain – Harvard Business Review:  https://hbr.org/2017/01/the-truth-about-blockchain

Is Your Blockchain Business Doomed? – Bloomberg: https://www.bloomberg.com/news/articles/2018-03-22/is-your-blockchain-business-doomed

Explain Like I’m 5: Blockchain (an easy explanation of the technology behind Bitcoin) – Hayley Somerville: https://www.linkedin.com/pulse/blockchain-5th-graders-hayley-somerville/

Blockchain, Bitcoin, and Ethereum ELI5 (Explained Like I’m Five) – Tony Yin: https://tonyy.in/blockchain-eli5/

Featured Image: By B140970324 (Own work) [CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0)%5D, via Wikimedia Commons