Blockchain and distributed ledger technologies — Overview of and interactions between smart contracts in blockchain and distributed ledger technology systems

This document provides an overview of smart contracts in BC/DLT systems; describing what smart contracts are and how they work. It also discusses methods of interaction between multiple smart contracts. This document focuses on technical aspects of smart contracts. Smart contracts for legally binding use and applications will only be briefly mentioned in this document.

Titre manque

Blokovno veriženje in tehnike razpršenih glavnih knjig - Pregled medsebojnih vplivov med pametnimi pogodbami in sistemi tehnike razpršene glavne knjige (ISO/TR 23455:2019)

General Information

Status
Published
Publication Date
29-Sep-2019
Current Stage
6060 - International Standard published
Start Date
30-Sep-2019
Due Date
21-Mar-2021
Completion Date
30-Sep-2019

Buy Standard

Technical report
ISO/TR 23455:2019 - Blockchain and distributed ledger technologies -- Overview of and interactions between smart contracts in blockchain and distributed ledger technology systems
English language
42 pages
sale 15% off
Preview
sale 15% off
Preview

Standards Content (Sample)

TECHNICAL ISO/TR
REPORT 23455
First edition
2019-09
Blockchain and distributed ledger
technologies — Overview of and
interactions between smart contracts
in blockchain and distributed ledger
technology systems
Reference number
ISO/TR 23455:2019(E)
©
ISO 2019

---------------------- Page: 1 ----------------------
ISO/TR 23455:2019(E)

COPYRIGHT PROTECTED DOCUMENT
© ISO 2019
All rights reserved. Unless otherwise specified, or required in the context of its implementation, no part of this publication may
be reproduced or utilized otherwise in any form or by any means, electronic or mechanical, including photocopying, or posting
on the internet or an intranet, without prior written permission. Permission can be requested from either ISO at the address
below or ISO’s member body in the country of the requester.
ISO copyright office
CP 401 • Ch. de Blandonnet 8
CH-1214 Vernier, Geneva
Phone: +41 22 749 01 11
Fax: +41 22 749 09 47
Email: copyright@iso.org
Website: www.iso.org
Published in Switzerland
ii © ISO 2019 – All rights reserved

---------------------- Page: 2 ----------------------
ISO/TR 23455:2019(E)

Contents Page
Foreword .iv
Introduction .v
1 Scope . 1
2 Normative references . 1
3 Terms and definitions . 1
4 Symbols and abbreviated terms . 2
5 Overview of smart contracts . 2
5.1 History of smart contracts . 2
5.2 Different ways of understanding smart contracts . 3
6 Operation of smart contracts . 4
6.1 The concept of a smart contract . 4
6.2 Benefits and challenges of smart contracts . 6
6.3 Difference between on-chain and off-chain smart contracts regarding deployment
and execution . 7
6.4 Access of real-world-information for smart contracts . 8
6.4.1 General considerations about real-world-interaction . 8
6.4.2 One-way event delivery from a smart contract to an event consumer . 9
6.4.3 Transfer of control from a smart contract to an external process .11
6.5 Life cycle of smart contracts: creation, operation, termination .11
6.5.1 Overview .11
6.5.2 Modifying smart contracts in a public BC/DLT system .11
6.5.3 Update and roll-back mechanisms supported by the underlying ledger .12
6.5.4 Migration mechanisms defined by smart contracts .12
6.6 Security .12
7 Binding and enforceable smart contracts .14
7.1 General .14
7.2 Legal enforceability of smart contracts .14
8 Smart contracts for information transfer between blockchains (cross-chain and
sidechain transactions) .15
8.1 Introduction .15
8.2 Implementations of cross-chain and sidechain transactions .16
8.3 Importance of semantics, syntax, inputs and languages for the interoperability of
smart contracts .20
Annex A (informative) Examples of smart contract implementations .21
Annex B (informative) Role of domain specific languages and methods .24
Annex C (informative) Applications and smart contract use cases.26
Bibliography .40
© ISO 2019 – All rights reserved iii

---------------------- Page: 3 ----------------------
ISO/TR 23455:2019(E)

Foreword
ISO (the International Organization for Standardization) is a worldwide federation of national standards
bodies (ISO member bodies). The work of preparing International Standards is normally carried out
through ISO technical committees. Each member body interested in a subject for which a technical
committee has been established has the right to be represented on that committee. International
organizations, governmental and non-governmental, in liaison with ISO, also take part in the work.
ISO collaborates closely with the International Electrotechnical Commission (IEC) on all matters of
electrotechnical standardization.
The procedures used to develop this document and those intended for its further maintenance are
described in the ISO/IEC Directives, Part 1. In particular, the different approval criteria needed for the
different types of ISO documents should be noted. This document was drafted in accordance with the
editorial rules of the ISO/IEC Directives, Part 2 (see www .iso .org/directives).
Attention is drawn to the possibility that some of the elements of this document may be the subject of
patent rights. ISO shall not be held responsible for identifying any or all such patent rights. Details of
any patent rights identified during the development of the document will be in the Introduction and/or
on the ISO list of patent declarations received (see www .iso .org/patents).
Any trade name used in this document is information given for the convenience of users and does not
constitute an endorsement.
For an explanation of the voluntary nature of standards, the meaning of ISO specific terms and
expressions related to conformity assessment, as well as information about ISO's adherence to the
World Trade Organization (WTO) principles in the Technical Barriers to Trade (TBT) see www .iso
.org/iso/foreword .html.
This document was prepared by Technical Committee ISO/TC 307, Blockchain and distributed ledger
technologies.
Any feedback or questions on this document should be directed to the user’s national standards body. A
complete listing of these bodies can be found at www .iso .org/members .html.
iv © ISO 2019 – All rights reserved

---------------------- Page: 4 ----------------------
ISO/TR 23455:2019(E)

Introduction
Smart contracts, a synonym for automated applications on blockchain and distributed ledger
technology-based (BC/DLT) systems, are an important development step from early stage, purely
transaction oriented blockchains to more interactive technologies where the transactions on the
blockchain or distributed ledger technology system are conditional on the terms of that application.
According to the current working-definition of ISO/TC 307, WG1, Terminology, a smart contract is a
“computer program stored in a distributed ledger system wherein the outcome of any execution of the
program is recorded on the distributed ledger”.
In specific implementations of BC/DLT systems, such a program can vary from program code interpreted
on single peers to (pre-)compiled programs recorded on the ledger to be executed on arbitrary virtual
machines within the system (such as miners). It should be understood that the "effects" to be recorded
on the distributed ledger will usually be the transaction that is the deterministic, predefined coded
outcome from the smart contract code.
As the term smart contract in its original intention as created by Nick Szabo in 1994 had a different,
mainly legally oriented (precise and legitimate) meaning, this has often caused confusion regarding
“legally binding intentions”: As this document discusses and describes smart contracts as a technology
for BC/DLT automation in general, it is also important to understand that smart contracts may have a
legal binding intention. Because of this, the legal binding application and structure of smart contracts
also requires understanding of legal background, context and definitions.
This document mainly describes the aspects of automated software in a BC/DLT-system.
© ISO 2019 – All rights reserved v

---------------------- Page: 5 ----------------------
TECHNICAL REPORT ISO/TR 23455:2019(E)
Blockchain and distributed ledger technologies —
Overview of and interactions between smart contracts in
blockchain and distributed ledger technology systems
1 Scope
This document provides an overview of smart contracts in BC/DLT systems; describing what smart
contracts are and how they work. It also discusses methods of interaction between multiple smart
contracts. This document focuses on technical aspects of smart contracts. Smart contracts for legally
binding use and applications will only be briefly mentioned in this document.
2 Normative references
There are no normative references in this document.
3 Terms and definitions
For the purposes of this document, the following terms and definitions apply.
ISO and IEC maintain terminological databases for use in standardization at the following addresses:
— ISO Online browsing platform: available at https: //www .iso .org/obp
— IEC Electropedia: available at http: //www .electropedia .org/
3.1
asset
anything that has value to a stakeholder
[SOURCE: ISO/TS 19299:2015, 3.3, modified — Note 1 to entry has been removed.]
3.2
ledger
information store that keeps records of transactions (3.10) that are intended to be final, definitive and
immutable
3.3
miner
DLT node which engages in mining (3.4)
3.4
mining
block-building activity in some consensus mechanisms
Note 1 to entry: Participation in mining is often incentivized by block rewards and transaction (3.10) fees.
3.5
off-chain
related to a blockchain system, but located, performed or run outside a blockchain system
3.6
on-chain
located, performed or run inside a blockchain system
© ISO 2019 – All rights reserved 1

---------------------- Page: 6 ----------------------
ISO/TR 23455:2019(E)

3.7
DLT oracle
oracle
distributed ledger technology oracle
service that updates a distributed ledger (3.2) using data from outside of a distributed ledger system
Note 1 to entry: Smart contracts (3.8) cannot access sources of data external to the distributed ledger system on
their own; therefore, DLT oracles act as services designed to provide trustworthy data from external sources for
use by a smart contract.
3.8
smart contract
computer program stored in a distributed ledger (3.2) system wherein the outcome of any execution of
the program is recorded on the distributed ledger
Note 1 to entry: A smart contract might represent terms in a contract in law and create a legally enforceable
obligation under the legislation of an applicable jurisdiction.
3.9
token
representation of a collection of data
Note 1 to entry: In this document, token is also used as synonym for a virtual asset (3.1).
[SOURCE: ISO/IEC 14776-323:2017, 3.1.85, modified — The original Note 1 to entry has been removed; a
new Note 1 to entry has been added.]
3.10
transaction
smallest unit of a work process resulting in a state change
[SOURCE: ISO/TR 26122:2008, 3.5, modified — The words "consisting of an exchange between two or
more participants or systems" have been replaced with "resulting in a state change".]
3.11
trust
relationship between two elements, a set of activities and a security policy in which element x trusts
element y if and only if x has confidence that y will behave in a well defined way (with respect to the
activities) that does not violate the given security policy
[SOURCE: ISO/IEC 13888-1:2009, 3.59, modified — Note 1 to entry has been removed.]
4 Symbols and abbreviated terms
BC/DLT: blockchain and distributed ledger technology
DSL: domain specific language
5 Overview of smart contracts
5.1 History of smart contracts
The term "smart contract" was first introduced by Nick Szabo in the early 1990s. But it was only with the
advent of blockchain and distributed ledger technology (BC/DLT) that this concept gained widespread
interest.
According to Szabo, a smart contract represents the idea of automatically fulfilling contractual clauses
by embedding these clauses in a digital entity that has control over the property dealt with. This should
be done “in such a way as to make breach of contract expensive […] for the breacher” (Szabo, 1997).
Szabo therefore proposed the use of secure, machine-executable transaction protocols that ensure
2 © ISO 2019 – All rights reserved

---------------------- Page: 7 ----------------------
ISO/TR 23455:2019(E)

automatic performance of predefined, conditional actions in accordance with the contract clauses. He
saw smart contracts as a promising opportunity to significantly reduce “mental and computational
transaction costs”. In his seminal paper, Szabo also described various well-known cryptographic
techniques suitable for ensuring the desired characteristics of a smart contract, such as security,
confidentiality and unforgeability. At that time, however, technology and market demand were not yet
ready to implement these requirements comprehensively.
BC/DLT now provides capabilities that not only satisfy Szabo's demands but also offer advanced
possibilities that reach beyond Szabo’s ideas. Massively distributed by design and safeguarded by
a variety of cryptographic instruments (for example, transactions with pseudonymized accounts,
immutability, unknown numbers of parallel executed and evaluated transactions), this environment
allows smart contracts to be written in full-fledged programming languages, to communicate and
interact with each other as well as with external resources, and to transparently keep track of their
current state of execution. Thus, smart contracts with any relation to a legal context and its automation
are actually a subgroup of all smart contracts as used for process automation on blockchains (see
Figure 1). Examples for smart contract use-cases are listed in Annex C, Table C.1.
Figure 1 — Different understandings of the scope of “smart contract”.
Therefore, the smart contract concept is not limited to BC/DLT systems, smart contracts may also be
used on traditional platforms (for example procurement portals); this document only considers smart
contracts in the context of BC/DLT systems.
5.2 Different ways of understanding smart contracts
In the course of these technological developments, the understanding of the term “smart contract” has
also evolved from its original meaning. Unfortunately, there is currently a lack of uniform understanding
of the term "smart contract" in practice.
It is important to note that the term "smart contract" does not necessarily refer to a contract in the legal
sense. Smart contracts can rather be taken to mean distributed applications that automate transactions
by leveraging the security of DLT systems, and no implicit legal meaning should be inferred.
As already explained above, in 1996 Nick Szabo described smart contracts as being:
A set of promises, specified in digital form, including protocols within which the parties perform on the
[9]
other promises .
[10]
In 2014, Vitalik Buterin invented a new generation of smart contracts: decentralised and immutable
once it exists in DLT systems. The notion of smart contracts within DLT systems is mainly developed on
this new generation. For the purposes of this analysis, it is useful to consider three ways to understand
smart contracts.
— Piece of code: According Szabo, he did not originally want to automate contracts, but instead to
automate contractual clauses or exchanges:
The basic idea behind smart contracts is that many kinds of contractual clauses (such as collateral,
[11]
bonding, delineation of property rights, etc.) can be embedded in the hardware and software .
© ISO 2019 – All rights reserved 3

---------------------- Page: 8 ----------------------
ISO/TR 23455:2019(E)

So it was intended to automate the evidence and consequence of contractual agreements and not
the full act behind contracts and contracting; the binding and, in the event of dispute, enforcement.
[41]
— Code as Law: “Code is [shall be] law” has been widely used and specifically promoted by Lessig .
This terminology is not precise or reasonable as it blurs the distinction between “law” being “the
system of rules which a particular country recognizes and enforces” and “a rule defining correct
procedure (as in the laws of a game, the laws of physics, etc.)”. A somewhat less contentious
alternative is “the code is the (smart) contract”, in which case the automation needs to include all
consequences and their enforcement
— As defined by legal professionals: Common position of the legislators and legal professionals is
the following:
The legal character of a smart contract is that which a judge or the law decides to be. So if the result of
a smart contract should be enforceable, it is better to apply contractual standards to smart contracts.
It is important to note that even a contract is not a statement of law; a contract is an agreement
between parties that needs to comply with the requirements of applicable legislation including
contract law.
6 Operation of smart contracts
6.1 The concept of a smart contract
DLT systems are designed to record transactions immutably into a ledger (examples for implementations
are provided in Annex A). Some implementations support the deployment of custom code to the ledger,
and later the invocation of deployed code with some parameters. Such deployed code is called a smart
contract on a public DLT, and can itself interact with the underlying ledger such as user accounts or
other smart contracts. It has to be mentioned, that the term “smart contract” is most popularly used in
the context of public BC/DLT systems, for example Ethereum, in which the smart contract code may be
executed with a deterministic result in an arbitrary virtual machine of a mining peer. Other concepts,
for example on private DLT-systems such as Hyperledger Fabric, originally named the distributed code
differently, for example “chaincode”, to emphasize differences in the execution concepts (see Figure 2).
Meanwhile this term is also commonly referred to as smart contract. If there are any significant
differences that require description, a precise distinction will be made between on-chain smart
contracts and off-chain smart contracts.
Such code is installed and executed at selected peers. Consequently the deployment, execution and
consensus process of such public and private systems differ.
4 © ISO 2019 – All rights reserved

---------------------- Page: 9 ----------------------
ISO/TR 23455:2019(E)

NOTE See further explanation in 6.3.
Figure 2 — Difference between an on-chain and an off-chain smart contract execution
Thereby, smart contracts allow participants to implement and deploy custom functionality to augment
the features of a running DLT system. Deployment and execution of smart contract code itself benefits
from any transparency and immutability guarantees made by the principles and methods of the
underlying DLT.
As well as generating changes to the underlying ledger state, some DLT implementations also allow
smart contracts to control virtual assets (tokens). The clearest example of this is the case where smart
contracts control an address, account or database item to which a cryptocurrency can be sent. The
balance belonging to the address can only be sent by invoking the smart contract code itself, allowing
a vast array of complex transactions to be performed under the security guarantees of the DLT system.
Similarly, the control of a smart contract, representing aspects of a legal contract between two parties
can restrict handling and operation of the smart contract by checking the identity of potential users
of a smart contract and the smart contract owner with the identity such as registered on the BC/DLT-
system. This example also shows the benefit of using underlying security measures of the BC/DLT-
system to increase the security of the control of a smart contract.
© ISO 2019 – All rights reserved 5

---------------------- Page: 10 ----------------------
ISO/TR 23455:2019(E)

Once deployed, smart contracts are subject to the rules of the underlying BC/DLT platform. These
implementation-specific rules do not necessarily allow smart contracts to be upgraded, modified or
cancelled. Smart contract authors need to be aware of the implications of deploying to a live system, and
carefully consider whether and how to build migration or termination features into their code. Here
significant differences between private and public systems respectively off-chain and on-chain smart
contracts may be observed: whereas on-chain smart contracts are usually operated and handled in a
transaction-like manner, usually private off-chain smart contracts are part of a dedicated peer. Here
off-chain smart contracts may be exchanged, upgraded or even manipulated without any significant
notice to the remaining BC/DLT-system.
In order to control real-world assets via smart contracts, interactions with the outside need to be
possible. For example, a smart contract’s behaviour may depend on an external event or on information
from external sources. In this case, trusted third party services or physical IoT-devices (called “DLT
oracles”) may be used to provide the data that triggers transactions in the DLT system (passing real-
world information to smart contracts), or to monitor the ledger state and perform some action under
specific conditions. Such DLT oracles may also be called by smart contract code.
6.2 Benefits and challenges of smart contracts
Even though they are generally considered a symbiotic alliance, smart contracts and distributed ledgers
each are technologies on their own.
As an independent concept, smart contracts may reduce transaction cost in business relationships.
As they formalize contractual terms or automation processes in clear computational logic, they
significantly reduce room for misinterpretation and misunderstandings or accelerate processes.
Furthermore, proven smart contracts for recurring tasks can be standardized and made available in
libraries for re-use, which could be especially useful in government e-procurement from authorized
suppliers. In this way, the contracting parties can quickly find consensus on implementations that best
reflect their contractual intentions.
However, DLT systems provide an ideal environment to exploit the strengths of smart contracts. Instead
of leaving it to the contracting parties to translate their individual interpretation of an agreement
independently into proprietary business logic, the distributed ledger ensures that all parties involved
see the same code at all times. Moreover, due to its consensus mechanisms, a distributed ledger provides
each participant with unequivocal evidence of the occurrence of relevant events and the results
obtained. Any replacement or update of a smart contract results in invalidating the old and replacing
it with a new smart contract and needs to be validated by network participants under the terms of the
consensus mechanism, so the network ensures full transparency and unforgeability of a smart contract
and its current state of execution. As a result, distributed ledger-based smart contracts may reduce
counterparty risk and transaction cost, and may make third party escrow services obsolete.
However, there are still some challenges with regard to distributed ledger-based smart contracts, with
risks and benefits essentially stemming from the same characteristics. There is experience of malicious
actors, also using smart contracts for various kind of profiling and discrimination or for involving the
user into undesirable, unethical or illegal activities.
Of course, there are the well-known and widely discussed challenges regarding DLT systems in general,
such as limited scalability, low performance, lack of privacy or danger of mining monopoly. Numerous
projects are working on addressing these weaknesses.
However, there are also more specific risks and open questions that are closely related to the
implementation of smart contracts on a distributed ledger. These will be elaborated in more detail in
the following clauses. The following are some examples of typical problem areas.
From a conceptual perspective, most business use cases will require a smart contract to interact with
the wider world, thus involving the support of trusted entities. This of course seriously questions the
original idea of a fully decentralized system designed specifically to do away with third parties.
From a technical perspective, once switched on, a smart contract cannot be stopped from the outside as
it is distributed to an unknown number of executing and evaluating parties. Unless the stop-mechanism
6 © ISO 2019 – All rights reserved

---------------------- Page: 11 ----------------------
ISO/TR 23455:2019(E)

is actively programmed into the code, there is not a single “plug to pull” for stopping it. But there may
be important reasons to halt the execution of a smart contract, for example in case of legal objections or
a security breach. Moreover, as with all computer programs, a smart contract’s behaviour depends on
the input data, which makes it impossible to predict its behaviour or whether it will even terminate at
all in all cases (halting problem). So what happens if a smart contract gets trapped in an infinite loop?
Exhaustive algorithms can be limited in their execution by the requirement of paying for execution
time. If the “execution currency” is consumed, the program automatically stops. Also, coding errors are
unavoidable and their fault handling have to be covered.
From a legal perspective, smart contracts also raise many questions. For example, the “Code is law”
dogma, while gaining popularity among programmers and IT professionals, is in conflict with many
national law systems. It is still unclear e.g. whether a legal contract can be written in a programming
language at all. If smart contract is considered as a tool, there is the question whether and when its
outcome becomes legally binding. In addition, in the event of a dispute, the circumstances surrounding
the conclusion of the contract also need to be taken into account when interpreting the contract.
6.3 Difference between on-chain and off-chain smart contracts regarding deployment
and execution
NOTE T
...

Questions, Comments and Discussion

Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.