A Trustless and Truthful Revolution: Road to Bitcoin Smart Contracts #1

Objective

This article is the first in a series of twenty-one articles that will: 

1) Articulate the importance and potential impacts of smart contracts on the Bitcoin and Lightning networks.

2) Introduce and explain the technical tools that will be needed to appreciate the power and utility of smart contracts. 

A Trustless and Truthful Revolution

What is trust? What is truth? Philosophers, epistemologists, theologians, artists, and academics in the broadest sense of the word have attempted and struggled to provide adequate definitions to both terms for millennia. We will provide two definitions of both trust and truth below to illustrate the complexities that arise when attempting to find an answer to both of the posed questions:

Two Definitions of Trust

Gambetta’s Definition: “trust (or, symmetrically, distrust) is a particular level of the subjective probability with which an agent assesses that another agent or group of agents will perform a particular action”. [1,2] 

Weckert’s Definition: trust is “the cognitive, the affective and the conative. Trust is any of these, is all three.” In essence, to trust an individual is to see that individual as trustworthy. [2,3]  

For even more definitions of trust, see Taddeo 2011. [2]

Two Definitions of Truth 

General Correspondence Theory: A proposition or claim is true provided that there exists a fact or piece of reality which corresponds to it. Phrased as a logical statement, p is true if and only if p corresponds to a fact. [4]

General Coherence Theory: A proposition or claim is true provided that the proposition coheres or agrees with a specific claim or group of claims. Phrased as a logical statement, p is true if and only if it coheres with q, where q is another claim or set of claims.5

For even more definitions of truth, see Glanzberg 2021. [6]

You may be scratching your head at this point in confusion. What is the point of bringing up different definitions of trust and truth in an article on Bitcoin smart contracts? 

Well, the point of bringing up these various definitions of trust and truth is to show you that there is no one universal definition for such terms. Depending on what definitions you choose, trust and truth can mean different things in different circumstances and thus can serve different goals. 

In general, the definition that you use for a term provides you with certain functionalities and limitations. For an important concrete example, the way in which you define poverty has massive implications on public policy and socioeconomic research; the public policies that a local government implements is different if poverty is defined as a household income of $10,000 per year or lower versus $50,000 per year or lower. 

Definitions are like keys in a mansion with locked rooms. Certain keys can unlock specific doors while being unable to unlock others. It is through choosing the right key that you can enter your room of choice. Thus, we will have to carefully specify what we mean by the terms trust and truth when continuing our discussion of Bitcoin and smart contracts. 

Bitcoin, Trust, and Truth

With the release of the Bitcoin whitepaper in August 2008 and the creation of the Bitcoin Network in January 2009, Satoshi Nakamoto breathed life into an open-source organism that forces individuals to ask difficult philosophical and epistemological questions. A few of these questions are listed below:

  1. What is money?

  2. What is time-preference?

  3. What is inflation? 

  4. What is trust? 

  5. What is truth? 

The first question is explored in the excellent podcast series, What is Money?, by Robert Breedlove. [7] The second question is explored in The Bitcoin Standard by Dr. Saifedean Ammous. [8] The third question is explored in the video, Explained: How Michael Saylor defines Inflation, risk premiums, and hurdle rates?, by The Investor’s Podcast Network. [9] It is the last two questions that motivate the entirety of this article series entitled Road to Bitcoin Smart Contracts. We provide the following definitions for trust and truth:

Cryptographic Trust: The trust that one has in a cryptosystem or cryptographic authentication mechanism. Cryptographic trust is trustless in the social sense: there is no need for social trust or belief between parties within a cryptographic system. This term is more commonly understood as verification. 

Oracle Truth: Information created and imported onto a blockchain by an Oracle or a network of Oracles in a smart contract. In essence, Oracles create truth in a smart contract using off-chain data and thus can be understood as truth themselves.

You may be asking: What is cryptography? What is an oracle? It is important not to get hung up on these two definitions for now. We ask that you accept both definitions as “black boxes” or known unknowns for now. We promise that we will explore them in great detail throughout this article series.

What Is a Smart Contract?

The term smart contract was formally coined by Nick Szabo in his 1994 paper, Smart Contracts. [10] In his 1996 paper, Smart Contracts: Building Blocks for Digital Markets, [11] Szabo defines smart contracts as the following: 

Smart Contract (Szabo 1996): “A set of promises, specified in digital form, including protocols within which the parties perform on these promises”. [11]

Szabo’s definition was created well ahead of Nakamoto’s release of the Bitcoin whitepaper or network and thus lacks operational utility. We will now state a modern operational definition of smart contracts: smart contracts as conditional payments

Smart Contract (Conditional Payment): A self-executing, verifiable agreement on a blockchain between two or more parties where the contract conditions are written directly into code.

This operational definition of smart contracts is more useful than Szabo’s in the context of blockchains: it allows us to create an on-chain agreement between two or more parties using on-chain data that relies on cryptographic trust (i.e verification).

However, this definition is severely limited. There are only so many things that you can directly code into a blockchain protocol without suffering massive trade-offs in blockchain size, scaling, and security. With such a definition, we are forced to import all of the world’s data onto the blockchain itself to be able to conduct smart contracts – a notion that is unfeasible. Thus, we will need to expand our definition of smart contracts to ensure that we can import off-chain data onto the blockchain. 

Hybrid Smart Contracts

For the remainder of this article series (unless specified otherwise) we will use the notion of hybrid smart contracts when referring to smart contracts. Coined by the team at Chainlink Labs, [12] we will define smart contracts as follows:

Smart Contract (Hybrid Smart Contract): A self-executing, verifiable agreement on a blockchain between two or more parties where the contract conditions are written directly into code. Furthermore, an Oracle(s) can confirm a specific off-chain condition(s) that is not itself cryptographically trustworthy (i.e not verifiable) on the blockchain. [12]

With this revised definition we now have a powerful tool that enables Oracles to access data in the real world and bring it onto the blockchain. This superpower is subtle and thus will be intensely explored near the end of this article series. 

Oracles

Now that you have made it this far, we will now provide a definition for what was previously regarded as a “black box”: Oracles.

Oracle: An agent that imports off-chain data onto a blockchain.

With this simple definition, let us illuminate all that we have learned with an example. 

Example of a Smart Contract

Meet Alice, Bob, and Olla. These three individuals will join us in our journey to better understanding bitcoin smart contracts. In this example, we will gloss over most of the technical details to promote a conceptual understanding of smart contracts; these technical details will be thoroughly explored in later articles. 

Setup #1: Conditional Payment

Alice and Bob both live in West Vancouver and want to make a bet via a smart contract on a blockchain. Both Alice and Bob own 1 BTC respectively. The smart contract conditions are as follows:

RBTC1_img1.png
  • Alice deposits 1 BTC into the smart contract 

  • Bob Deposits 1 BTC into the smart contract

RBTC1_img2.png
  • If it rains tomorrow in West Vancouver at 6 pm PT, Alice wins all the BTC in the smart contract (2 BTC)

BTC1_img3.png
  • If it does not rain tomorrow in West Vancouver at 6 pm PT, Bob wins all the BTC in the smart contract (2 BTC)

RBTC1_img4.png

The smart contract that Alice and Bob have set up is a conditional payment (see our second definition of smart contracts). If the blockchain that they are using natively stores the weather in West Vancouver, this contract is valid. 

Reflecting upon our definition of cryptographic trust, we see that this form of contract is trustless. Even if Alice and Bob have a falling out in their friendship, the smart contract conditions have been written directly into code and cannot be changed during the duration of the contract. Thus, Alice and Bob do not have to place any social belief or trust on one another; all they have to do is verify that the software and cryptographic mechanism works as intended. 

There is a problem with this setup. We have already teased at the computational problems that arise with having massive amounts of data on blockchains. We will assume in the next setup that the weather in West Vancouver is not natively stored on the blockchain. 

Setup #2: Hybrid Smart Contract

Without weather data natively stored on the blockchain, Alice and Bob will need an Oracle to bring in data from the outside world (in this case from a weather network) onto the blockchain. 


Luckily, Alice and Bob have a mutual friend, Olla, who is willing to act as an Oracle in their smart contract. In this new setup, the smart contract that Alice and Bob create will follow the definition of hybrid smart contract. Both Alice and Bob own 1 BTC respectively. The smart contract conditions are as follows:

RBTC_img5.png
  • Alice deposits 1 BTC into the smart contract.

  • Bob Deposits 1 BTC into the smart contract.

  • Olla will serve as an Oracle to determine whether or not it rains in West Vancouver at 6 pm PT.

RBTC_img6.png
  • If it rains tomorrow in West Vancouver at 6 pm PT, Alice wins all the BTC in the smart contract (2 BTC).

RBTC_img7.png
  • If it does not rain tomorrow in West Vancouver at 6 pm PT, Bob wins all the BTC in the smart contract (2 BTC).

RBTC_img8.png

In these conditions we see our definition of Oracle Truth at work. In Setup #1, the weather was natively stored on the blockchain and thus the blockchain served as the arbiter of truth in Alice and Bob’s smart contract. In Setup #2, Olla serves as an Oracle in the smart contract and thus serves as the arbiter of truth. With respect to the smart contract, Olla alone determines the weather in West Vancouver at 6 pm PT regardless of what the actual weather is in that geographical and chronological location. In essence, Olla is truth itself in this smart contract. 

You may be screaming internally at the above text: why would anyone want to enter into a contract where one individual serves as the sole arbitrator? Indeed, there are many interesting security and game theoretic problems that arise with the introduction of Oracles in smart contracts. We will see in later articles many clever techniques that can be used to reduce the trust and power placed on individual Oracles. 

For now, we will highlight a few applications of smart contracts to motivate the massive utility that smart contracts can serve in an increasingly digital economy. 

Applications of Smart Contracts 

This section is not meant to serve as a thorough exploration of all of the current and potential use-cases for smart contracts. Instead, it links to several resources that explain in detail the impact of smart contracts within a respective domain and are written by authors who are industry experts. These resources will be hyperlinked and thus will not be included in the references below. If any of the hyperlinks are broken, please send an email to mateusz@blockwaresolutions.com.  

Finance

Insurance

Mortgages 

Property Ownership 

Corporate Governance 

Digital Identity 

Voting

Road to Bitcoin Smart Contracts

Now you may be asking yourself two questions: 1) Where is Bitcoin in all of this? 2) Hold on, how do smart contracts on Bitcoin actually work? 

These are questions that will be explored through a series of twenty-one articles that will: 1) motivate the importance and potential impacts of smart contracts on the Bitcoin and Lightning networks to you. 2) introduce and explain the technical tools that you will need to appreciate the power and utility of smart contracts. 

We hope that you have gained value from this article and will continue following this article series.

Acknowledgements

I want to thank Mason Jappa, Sam Chwarzynski, and the Blockware Solutions Team for their continued support and valuable feedback on drafts of this series of articles. 

Disclaimer

The views presented in this article as well as any errors are my own. If you think that any section of this article requires technical revision, please email me at mateusz@blockwaresolutions.com

This article is for informational purposes only. It is not intended to be investment advice. Contact a licensed professional for investment advice.

Contact

Mateusz (Matthew) Faltyn

Blockchain Developer 

Blockware Solutions

Twitter: @FaltynMateusz

References 

[1]. Gambetta D. Trust: Making and Breaking Cooperative Relations. B. Blackwell; 1988. https://books.google.ca/books/about/Trust.html?id=97VmQgAACAAJ&redir_esc=y. Accessed May 4, 2021.

[2]. Taddeo M, Floridi L. The case for e-trust. Ethics Inf Technol. 2011;13(1):1-3. doi:10.1007/s10676-010-9263-1

[3]. Weckert J. Trust in Cyberspace. In: Cavalier RJ, ed. The Impact of the Internet on Our Moral Lives. New York: SUNY; 2005:95-117. https://researchoutput.csu.edu.au/en/publications/trust-in-cyberspace. Accessed May 4, 2021.

[4]. David M. The Correspondence Theory of Truth. The Stanford Encyclopedia of Philosophy (Winter 2020 Edition). https://plato.stanford.edu/entries/truth-correspondence/. Published 2020. Accessed May 4, 2021.

[5]. Young JO. The Coherence Theory of Truth. The Stanford Encyclopedia of Philosophy (Fall 2018 Edition). https://plato.stanford.edu/entries/truth-coherence/. Published 2018. Accessed May 4, 2021.

[6]. Glanzberg M. Truth. The Stanford Encyclopedia of Philosophy (Summer 2021 Edition). https://plato.stanford.edu/entries/truth/. Published 2021. Accessed May 4, 2021.

[7]. Breedlove R. The “What is Money?” Show. https://www.listennotes.com/podcasts/the-what-is-money-show-robert-breedlove-4XBAzvpCmj0/. Accessed May 4, 2021.

[8]. Ammous S. The Bitcoin Standard: The Decentralized Alternative to Central Banking . 1st ed.; 2018. https://www.amazon.ca/Bitcoin-Standard-Decentralized-Alternative-Central/dp/1119473861. Accessed May 4, 2021.

[9]. The Investor’s Podcast Network. Explained: How Michael Saylor defines Inflation, risk premiums, and hurdle rates? . https://www.youtube.com/watch?v=sw3kVeE1Pxg&ab_channel=TheInvestor%27sPodcastNetwork. Published March 8, 2021. Accessed May 4, 2021.

[10]. Szabo N. Smart Contracts. https://www.fon.hum.uva.nl/rob/Courses/InformationInSpeech/CDROM/Literature/LOTwinterschool2006/szabo.best.vwh.net/smart.contracts.html. Published 1994. Accessed May 4, 2021.

[11]. Szabo N. Smart Contracts: Building Blocks for Digital Markets. https://www.fon.hum.uva.nl/rob/Courses/InformationInSpeech/CDROM/Literature/LOTwinterschool2006/szabo.best.vwh.net/smart_contracts_2.html. Published 1996. Accessed May 4, 2021.

[12]. Breidenbach L, Cachin C, Chan B, et al. Chainlink 2.0: Next Steps in the Evolution of Decentralized Oracle Networks.; 2021.