Blockchain: why smart contracts need shrewder people
“I’ve forgotten – woe is me! What the magic word may be.” Johann Wolfgang von Goethe, The Sorcerer’s Apprentice (1797)
How smart is your code?
So-called “smart contracts” are science fiction realised. Executable pieces of code stored on a mutual distributed ledger for future execution bind people and payments to actions and outcomes. Computer scientist Nick Szabo has promoted the term since the early 1990s and describes bringing the “highly evolved” practices of contract law to the design of electronic commerce protocols between strangers on the internet.
Interest in the term “smart contract” has risen recently in line with interest in Bitcoin and blockchain. Blockchains are immutable distributed ledgers that can store pieces of executable code for future execution. The many potential applications range from betting contracts to digital rights management, loans, or even “smart bonds” and “smart equities”. Claims have been made that virtually all of finance can move to smart contracts when combined with an appropriate payment system, often a cryptocurrency.
Here we draw a distinction between smart contracts and “dumb code”. Computer code can be extremely stupid. Bits of code are Sorcerer’s Apprentices, doing what we thought was our bidding at the time we wrote the code, oblivious to changes in our intentions. Author Larry Niven explains: “That’s the thing about people who think they hate computers. What they really hate is lousy programmers.”
Code embedded in mutual distributed ledgers is real and useful, and sometimes dangerous. If that code is written to emulate real world contracts it should perhaps more appropriately be called a “code contract”.
Smart contracts have a number of parts. The transactions must involve more than the mere transfer of a virtual currency from one person to another (i.e. a payment transfer) and involve two or more parties (as every contract must). Most critically, the implementation of the contract requires no direct human involvement after the smart contract has been made a part of the distributed ledger, which makes these contracts “smart”, or autonomous. The code automates the “what if this happens” element of traditional contracts. Computer code behaves in expected ways without the linguistic ambiguity of human languages. The code is replicated on many computers and run by the network when events require it, typically the expiry of some time period.
“Sprite” is an old term for using more traditional coding languages to achieve similar ends. They are effectively little “ghosts” or “geists” that act autonomously. Three decades ago, sprites were commonly used to integrate graphics into video games. Sprites are still found on navigation buttons or adding visual appeal to web pages.
While smart contract coding languages try to “hobble” the code to ensure no unintended consequences, sprite coders are trying to use the power of traditional coding languages to release their potential, relying on control by coders who are presumed to be smarter than the code they let loose. Sprites are no more than code placed into a distributed, immutable data structure, and can be run from pieces of Python, Lisp or Go languages embedded in, and recursively writing to, a blockchain. Sprites are often used to perform simple security functions such as key and password structures, reading and writing directly to their ledger.
Smart contracts, unlike sprites, tend to use specialist architecture. A number of programming languages and virtual machine software engines have been developed to ensure that smart contract code runs in a secure way.
Ethereum is a particularly popular a cryptocurrency and blockchain platform with programmes and protocols to facilitate the automated performance of a contract. Ethereum, though perhaps the strongest proponent of smart contract enabled blockchains, is moving away from using “smart contract” indiscriminately for pieces of code, towards using the term only when the code is directed at contemporary legal issues.
Ethereum plans to use its blockchain to conduct cryptocurrency transactions of some complexity. Augur is a decentralised, open-source prediction market platform built on the Ethereum blockchain for prediction markets. Ethereum hopes to satisfy complex contracts in areas such as betting, mortgages, and insurance. In theory, platforms can be created which enable financial firms to create programmable versions of traditional securities – “smart securities” – stored in a distributed ledger.
The benefits seem obvious. Faster and cheaper bureaucracy and administration. Fewer errors and disputes. The amount of paperwork to support transactions should diminish. Routine transaction processing jobs will disappear. Many mid-level jobs with routine judgemental tasks and controls can be automated. Securities issuance, transfer and tracking should be streamlined using unique identifiers and asset segregation through securities clearing and settlement. Asset servicing, allocating dividends and interest payments as well as corporate actions processing, should be automated. Derivatives clearing might move to smart contracts…
By Professor Michael Mainelli, Z/Yen Group and Bob McDowall, States of Alderney
This is an excerpt. The full article is available in the April 2016 edition of Banking Technology. Click here to read the magazine online.
To get your free introductory print copy, please register here.