<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Model of Dynamic Smart Contract for permissioned Blockchains</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Adnan Imeri</string-name>
          <email>adnan.imeri@list.lu</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Jonathan Lamont</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Nazim Agoulmine</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Djamel Khadraoui</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Luxembourg Institute of Science and Technology</institution>
          ,
          <addr-line>LIST</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Universite of Evry Val d'Essonne</institution>
          ,
          <addr-line>Evry</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>The blockchain technology and smart contract capabilities encourage scholars and retailers on investigating the new conceptual modeling and technological opportunities for redesigning the current and future business processes. The emerge of blockchain technology indicates the new era in designing and developing the business process mainly by using smart contracts. Along with these opportunities, di erent challenges are presented in the current state of blockchain technology and smart contracts. Among them, the emphases cases are the alignment of the new changes on the requirements from the business process, to the smart contracts. We present a new way of modeling a smart contract that impacts on the maintainability of the enterprise blockchain-based solution. This paper shows a new approach that allows smart contracts acting dynamically over lift time changes on the business process logic speci c to the use case.</p>
      </abstract>
      <kwd-group>
        <kwd>Enterprise modeling</kwd>
        <kwd>Smart Contract</kwd>
        <kwd>Immutability</kwd>
        <kwd>Maintainability</kwd>
        <kwd>Design Pattern</kwd>
        <kwd>Hyperledger Fabric</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1 Introduction</title>
      <p>
        Since the invention, blockchain technology has been the subject of
exploration from academics and industries. The technology that stands behind
Bitcoin initially was the focus of cryptocurrency industries [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Further, it has
been extended in di erent domain of application, and many governmental,
nongovernmental, industrial organization are exploring the technological design of
the blockchain to improve their activities, business process, etc., [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ][
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. The rst
generation of blockchain, i.e., Bitcoin comes with limited technological
capabilities in terms of designing complex business processes [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. The emerging of
the Ethereum (ETH) blockchain framework, with the possibility of deploying
smart contract (SC), enabled a new way of execution of application over the
blockchain network [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. The combination of blockchain and SC enabled a new
market for a decentralized application that provides a new level of automation
of many business processes [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. Simultaneously, with the opportunities o ered by
Copyright © 2020 for this paper by its authors. Use permitted under
Creative Commons License Attribution 4.0 International (CC BY 4.0).
blockchain and SC, there are various concerns to considers for blockchain-based
applications. These issues are on designing a blockchain-based application that
should behave as intended by the end-user. Further, the security and privacy
issues, performance issues, and programmable issues and maintainability of
already running blockchain solutions are amongst the most highlighted concerns
when considering designing a blockchain-based application [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. The research and
industrial communities already faced before-mentioned problems, and for
overcoming these issues, there are discovered several design patterns as the best
practices from the community, that help researchers and developers on
designing reliable smart contracts (SC) [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. Through this research, we intend to provide
a new model for improving SC designing and execution. The research problem
discussed in this paper is related to the maintainability of immutability feature
of SC. Indeed, the code of a SC cannot be modi ed due to the blockchain
immutability property once it is deployed. For any required modi cation on the
existing SC, the deployment of this SC into a blockchain, meaning to have a
new reference of this SC on the blockchain. This leads to complicated
maintenance tasks according to the number of contracts to update, the eventual static
cross-references. Our goal is to enable a way to integrate a dynamic behavior
into SCs without deploying them again.
      </p>
      <p>Regarding this research, we implemented a proof of concept, for a particular
use case, and it is accessible on a public Git.</p>
      <p>The rest of the paper is organized as follows. Section 2 presents an extensive
study over the blockchain technology and exploration of Hyperledger Fabric as
the selected blockchain framework for this study. Section 3 de nes the study
problem and a use case. In section 4 we present related works studies. Section 5
shows our conceptual approach and proof-of-concept implementation. The
evaluation of the solution is presented in section 6 along with discussion and future
works.</p>
    </sec>
    <sec id="sec-2">
      <title>2 Background: Blockchain Technology</title>
      <p>
        Blockchain is a decentralized-distributed append-only database that enables
storing of the immutable set of transactions, organized in a hash tree
(MerkleTree) [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. The transactions present any kind of data such as nancial data,
textual or numeric data, that are encapsulated on transactions by users [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ].
These transactions are gathered together into a candidate block by miners that
compete with each other intending to validate this new block [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. Miners are
high-performance computers that is allowed to add a new block on the chain of
blocks. The block, besides transactions root it contains other signi cant
components such as timestamp, block header, mathematical di culty puzzle usually
called as \nonce", the hash of the previous block, thus forming a chain of blocks
or "blockchain" [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ].
      </p>
      <p>
        Blockchain network: The blockchain network is an extensive set of devices
that communicate in a peer-to-peer mode (P2P). The nodes are
computersservers that are geographically distributed, and they contain the same copy of
the ledger. The consensus algorithm that allows these notes to agree on the state
of the data, removes the need for a trusted third party, thus making blockchain
entirely decentralized [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ].
      </p>
      <p>
        Consensus protocol: For agreeing on the state of the data, blockchain uses a
consensus mechanism, e.g., Proof-of-Work, Proof of Stake, etc. Once the miner
solves a computational mathematical puzzle, it distributes the \nonce" to the
other miners. All the miners verify the solution of the puzzle by applying the
"nonce", then they approve the adding of the new block in the chain of blocks,
and all nodes are updated by adding a new block [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ].
      </p>
      <p>
        Immutability: The transactions added on the blockchain are
cryptographically signed. Once the transactions appear in blockchain they remain immutable.
Any tendency to change them will change the transaction root of Merkle Tree,
and the consensus algorithms will deny this change by comparing the
current changed block with other blocks from other nodes that contain the same
blockchain [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ].
      </p>
      <p>
        Non-repudiation: The properties of immutability and data integrity, enforces
the properties of non-repudiation [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ].
      </p>
      <p>
        Availability: The blockchain network maintains the availability, even if some
nodes fails to response [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
      </p>
      <p>
        On-Chain vs O -Chain: The design properties of the blockchain allows
storing a limited amount of data on chain. These data are the most signi cant
information, transaction and meta-data (hash values) referenced from large les
that are stored o -chain [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ]
      </p>
      <p>
        Permission-less and permissioned blockchains: For the permission-less blockchains,
there is not required any authorization for accessing the main network of the
blockchain, mining transactions and exploring the executed transactions. In
contrary, for accessing permissioned blockchain, nodes are required to have
permission by the administrator of the blockchain network [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]. The permissioned
blockchain, such as Hyperledger Fabric [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] and the SCs are subject of this study.
      </p>
      <sec id="sec-2-1">
        <title>2.1 The semantic of smart contract</title>
        <p>
          Smart Contract (SC): is a stand-alone program that is executed when
certain conditions are ful lled. It might execute asset transfers, execute another
contract, ful ll the conditions from any business process [
          <xref ref-type="bibr" rid="ref16">16</xref>
          ] [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ]. At the
highest level it is expressed by sort of object-oriented programming language, e.g.,
Solidity [
          <xref ref-type="bibr" rid="ref16">16</xref>
          ], JavaScript, Go, and Java. The encoding of SC is sourced from
natural language, legal contracts, business agreements, and other domain-speci c
sources. The enforcement of the agreements that are reached between parties
involved, are further translated into SC programming code and added on the
blockchain [
          <xref ref-type="bibr" rid="ref18">18</xref>
          ]. Nowadays the most prominent SC-enable technology is ETH
[
          <xref ref-type="bibr" rid="ref19">19</xref>
          ], and another blockchain platform such as Hyperledger Fabric is providing
high-level programmable SC. By design, SC has some technological features. SC
remains immutable once it is deployed on the blockchain, by contract
transaction. Among the main design principles of the SC are [
          <xref ref-type="bibr" rid="ref20">20</xref>
          ]:
{ SC address (ID), a hash value, that identi es the SC on the blockchain.
{ Owner ID, a 256bit hash value, which indicates the owner of the SC.
{ Internal storage, the SC has its private storage, it holds its execution code
with pre-de ned parameters, some amount of virtual currency (own balance
of the SC).
{ Execution costs, for the blockchain platforms, what need digital coins to
perform a transaction mining, the execution of the SC has its own costs.
{ Enforcement, the contractual obligation that is expressed in the terms of SC,
e.g., transfer assets once the goods are received, are automatically performed
as contractual obligations and enforced by SC.
{ Invoke another SC, by sending a transaction to the SC address.
{ Autonomous, the prede ned parameter on the SC code allow the SC to change
the state of on blockchain if executed successfully.
{ Self-Execution, the SC is a set of autonomous executable agents that are
trigger by prede ned parameters on the SC code or executed from environments
parameters.
{ Event/Method are set of instruction that are executed in the SC for ful lling
intended task.
        </p>
        <p>
          SC are invoked by users, by sending the transaction to the contract address,
e.g., some amount on it and parameters to execute the targeted SC [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ][
          <xref ref-type="bibr" rid="ref18">18</xref>
          ][
          <xref ref-type="bibr" rid="ref20">20</xref>
          ].
Furthermore, an SC can call synchronously another SC and also as synchronously
o -chain service [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ]. SC supports an ordered logic that follows the ordering
rules if this than that (IFTTT). This semantic is called event ordering logic (or
order-execute), and SC events (function invocation) are executed as they are
placed. Under this logic, if the current order passes then, continue on the second
order, otherwise, throw an exception [
          <xref ref-type="bibr" rid="ref19">19</xref>
          ]. This logic is present in almost all SC
enabling blockchain platforms, expect in Hyperledger Fabric, which is one of the
main focus in this study and it is explained in detail in the following section 2.2.
        </p>
      </sec>
      <sec id="sec-2-2">
        <title>2.2 Hyperledger Fabric</title>
        <p>
          Hyperledger Fabric (HF) is an open-source blockchain that allows designing
and developing private or consortium blockchain-based solutions with a focus on
the business-oriented use cases [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ][
          <xref ref-type="bibr" rid="ref21">21</xref>
          ][
          <xref ref-type="bibr" rid="ref22">22</xref>
          ]. HF has a modular and con gurable
architecture that allows users to adopt blockchain technology for their use case.
HF is implemented in the GoLang programming language and supports users
with di erent tools. HF provides Software Development Kits (SDK) for
various programming languages [
          <xref ref-type="bibr" rid="ref25">25</xref>
          ] such as GoLang, Java, NodeJS, and Python
[
          <xref ref-type="bibr" rid="ref21">21</xref>
          ][
          <xref ref-type="bibr" rid="ref22">22</xref>
          ]. HF allows writing of SC in general-purpose programming, which is
beyond domain-speci c language i.e., \Solidity for ETH".
        </p>
      </sec>
      <sec id="sec-2-3">
        <title>2.2.1 HF Overview and functionalities</title>
        <p>
          Entities: Consortium and Organization. HF de nes di erent entities
regarding the participants involved in the project. The HF network is managed by
a group of organizations gathered into a consortium. Each organization should
manage its nodes and should have at least one Certi cation Authority (CA)
node, and one Orderer node [
          <xref ref-type="bibr" rid="ref21">21</xref>
          ][
          <xref ref-type="bibr" rid="ref22">22</xref>
          ].
        </p>
        <p>
          Nodes, Peer, Orderer, CA and Client. HF de nes four types of nodes. The
main type of node is Peer nodes which manage the blockchain mechanisms.
Peers can join channels, and they can host di erent SC over each channel1.
Orderer nodes ensure the consensus of the HF blockchain network and keep
the peer's ledgers consistent [
          <xref ref-type="bibr" rid="ref21">21</xref>
          ][
          <xref ref-type="bibr" rid="ref22">22</xref>
          ]. Each peer must be connected to an Orderer
node. They also execute SC requests in the case where Orderer gives agreement
(after checking permissions) [
          <xref ref-type="bibr" rid="ref21">21</xref>
          ][
          <xref ref-type="bibr" rid="ref22">22</xref>
          ]. Certi cation Authority nodes ensure
identity delivery via digital certi cates, typically required by each organization
to enroll new members. CA is a private root Certi cation Authority provider
which can manage digital identities of participants [
          <xref ref-type="bibr" rid="ref21">21</xref>
          ][
          <xref ref-type="bibr" rid="ref22">22</xref>
          ]. Client nodes can
connect to and interact with peers deployed over the network [
          <xref ref-type="bibr" rid="ref21">21</xref>
          ][
          <xref ref-type="bibr" rid="ref22">22</xref>
          ]. All node
types are provided as docker containers [
          <xref ref-type="bibr" rid="ref23">23</xref>
          ].
        </p>
      </sec>
      <sec id="sec-2-4">
        <title>2.2.2 Smart Contract (SC) or Chaincode in HF</title>
        <p>
          In the HF jargon, a SC is referred to as \chaincode". Chaincode, or SC, is
the blockchain embedded application which is typically a running script inside a
peer. Every SC that is executed maintains its database, to store data or the state
of the code execution. This database is called WorldStateDB. This is a database
local to each channel and SC whose values are continuously kept up-to-date by
reading assets, values changes from the ledger blocks. The ledger keeps all value
changes in blocks, while the WorldStateDB keeps the last current value for each
asset [
          <xref ref-type="bibr" rid="ref21">21</xref>
          ][
          <xref ref-type="bibr" rid="ref22">22</xref>
          ].
        </p>
        <p>
          Amongst the main SC main concepts that are necessary for any kind of
application on HF:
{ Participant refers to a user that is de ned in the SC. For handling di erent
users in our application, we extend the \Participant" type [
          <xref ref-type="bibr" rid="ref21">21</xref>
          ][
          <xref ref-type="bibr" rid="ref22">22</xref>
          ];
{ Asset expresses every kind of valuable thing that can be exchanged between
persons (i.e. participant), and therefore changes its ownership [
          <xref ref-type="bibr" rid="ref21">21</xref>
          ][
          <xref ref-type="bibr" rid="ref22">22</xref>
          ];
{ Transaction is a way to exchange the ownership of the asset.
{ Event is the only way to communicate data outside the blockchain network.
        </p>
        <p>
          Events are broadcasted on channels and can be caught by an external
application that has access rights to listen to the desired channel [
          <xref ref-type="bibr" rid="ref21">21</xref>
          ][
          <xref ref-type="bibr" rid="ref22">22</xref>
          ].
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3 Problem de nition: The issues of maintaining the immutability of the SC</title>
      <p>Immutability: For permissionless or permissioned blockchain, an SC remains
immutable once it is deployed on the blockchain. This means, all the terms and
the logic implemented behind the SC, remains unchanged over time. Thus, in
1 A channel can be considered as a independent sub-blockchain.
case we need to make some changes in the logic of the SC (add or remove events),
we should redeploy it, and a new hash will generate as an ID for that SC. From
the user, that needs to use this SC, they are obliged to know the newest address
of SC, before being able to invoke it. Otherwise, the user will call the old one,
since its hash value is already mapped on the current SC. Figure 1 is illustrating
these issues by showing changes to the SC address.</p>
      <p>The new address of the contract should be distributed to all stakeholders
that are invoking this smart contact. The concern is that all the other smart
contracts that have invoked this SC (now with new hash address) should be
changed. That means that we have to recon gure the entire system (i.e., all
objects need to have the new address). For instance, if there are thousands
of contracts that call the same SC, then, this would be extremely di cult to
recon gure it (cf. maintenance), and the performance will become a concern
for the blockchain-based applications. Furthermore, this implies the automation
capability of the process decreases in this sense.</p>
      <p>This problem is a concern for enterprises that are intending to move some of
their business logic over the blockchain. Indeed, to keep the maintainability, we
need modularity, which means that a complex problem should be divided into
several minor problems further, to solve them much more easily. Just as using
code libraries, using several inter-connected SCs becomes useful for high-level
business processes. Thus, we can assume a complex system using several SC
with cross-references and automation. However, using static addresses for the
contracts that are hardcoded in the contract logic is leading to uncomfortable
maintenance, as explained above.</p>
      <p>Cross-references: From the enterprise modeling perspective, involving several
SC and cross communication to perform high-level tasks, still, exposes the same
problems. Figure 2, shows the issues of logic ows for cross-reference SC. In
case of a SC logic update, either from the caller side, either from the executor
side, there will be another SC address to know. For instance, considering two
SC, where SC1 calls SC2, and if we only update SC2 (to SC20), then we must
change SC2 address reference into SC1 to point to SC20. That implies also to
change SC1 to SC10. These sidesteps are not ideal for a system in production
due to heavy infrastructure maintenance. However, this case, it's even worse
when we have cross-references, i.e., if SC1 calls SC2 and SC2 calls SC1, then we
fall into a deadlock situation because SC1 and SC2 have a hardcoded address
of the other by exchange. That comes from the fact that we cannot guess the
address of a future SC to hardcode it in advance in the logic. Thereby, here
there no workaround to do, except avoiding bidirectional cross-references for
maintainability.</p>
      <sec id="sec-3-1">
        <title>3.1 Use case of temperature checking. The issues of SC in a dynamic environment</title>
        <p>
          Temperature checking: Considering that we have a SC which aims to check the
temperature that are collected by one IoT sensor, storing its data directly into
the blockchain. This SC is checking on demand the current temperature (from
the IoT device), and if this temperature exceeds a speci c threshold, a set of
users should be noti ed based on the pre-de ned condition in a particular use
case, e.g., transporting dangerous goods, that is sensitive to a temperature degree
[
          <xref ref-type="bibr" rid="ref24">24</xref>
          ].
        </p>
        <p>Detailing the features of this SC, it has three core functionalities. The rst
one is to collect the temperatures provided from an IoT sensors. This IoT
device is authenticated and transmitting its data directly in the blockchain. The
second functionality of this SC is to set and change the temperature threshold
of detection. The third functionality is to notify all involved stakeholders when
the temperature threshold is exceeded, for taking the necessary actions need to
avoid any possible consequences.</p>
        <p>The issue is regarding the threshold and the set transactions. The common
approach is to de ne the threshold as a static constant into the SC code (i.e.
as an hardcoded and immutable variable). Certainly, we will need to update
the contract each time when the constant need to be changes, and this exposes
enormous problems as we mentioned above.</p>
        <p>This use-case doesn't deal explicitly with cross-references because there is
only one SC, but the mechanism of the solution remains the same. Indeed, for
both two SCs, by storing the target SC address as a variable (in place of the
threshold ) that allows to dynamically change that address and then unlock the
deadlock situation. For overcoming these issues we propose a new way of
managing the SC, by storing the threshold constant as a variable into a SC asset. The
SC asset is an editable variable that allows to update it dynamically (as required
by the use case), and avoiding the change of the code of SC. In the following
section 4, we present some related works towards designing maintainable SC,
and further in section 5, we present the model of dynamic SC for permissioned
blockchain.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4 SC designing, modeling and development: Related</title>
    </sec>
    <sec id="sec-5">
      <title>Works Studies</title>
      <p>
        SC is the subject of many studies from academia, research organizations
and also from industry. Designing SC is one of the main challenges highlighted
recently by scholars and industry. The literature review shows that there are
presented several design patterns for supporting the best practices for designing
a SC. Mainly these design patterns are on \security of SC" [
        <xref ref-type="bibr" rid="ref25">25</xref>
        ], \structural
patterns" [
        <xref ref-type="bibr" rid="ref26">26</xref>
        ], \privacy issues" [
        <xref ref-type="bibr" rid="ref27">27</xref>
        ], \performance issues" [
        <xref ref-type="bibr" rid="ref25 ref28 ref29">25, 28, 29</xref>
        ]. The research
from [
        <xref ref-type="bibr" rid="ref35">35</xref>
        ], proposes an upgradable SC by using a proxy pattern. Research from
[
        <xref ref-type="bibr" rid="ref26">26</xref>
        ] summarizes SC design patterns based on the existing SC and further apply
some of the design patterns in a real work blockchain-based application for
traceability. There are presented di erent classi cations of patterns for designing SC
such as \action and control", \authorization", \lifecycle", \maintenance",
\security" are presented in [
        <xref ref-type="bibr" rid="ref30">30</xref>
        ]. Within certain classes of the design patterns for
SC, our research is essentially linked to the maintenance pattern, and intend to
improve the current way of maintaining SC. The main related design patterns
proposal satellite and contract relay [
        <xref ref-type="bibr" rid="ref30">30</xref>
        ], are the essentially related to our
research works. The satellite pattern is using two SC: satellite and base [
        <xref ref-type="bibr" rid="ref30">30</xref>
        ]. It
enables to update a variable from base by calculating the value from the
satellite thanks to the address reference of the satellite held into base. This allows us
to dynamically change the value of the variable by just upgrading the satellite
contract with the newest calculus and updating the satellite address in the base
contract. In the contrary to this solution, we do not use the second SC, but
rather the asset notion from HF which can be compared to a internal variable
into ETH (requiring the only update by transaction call). Further, the contract
relay pattern is using two contracts: base and relay. The relay contract serves
as an entry point in order to provide the latest version/address of the base
contract, and then forward any call to it. This is a proxy enabling to upgrade the
base contract without upgrading the user entry point (relay ). Nevertheless, the
drawback that the newer data storage needs to be consistent to avoid data
corruption. These two design patterns propose solutions including good practices
for maintenance issues that well t public blockchains. It requires sophisticated
programming skills in order to implement it correctly, and further maintain it.
In our case, we are focused on permissioned blockchain, particularly HF as one
of the main blockchain framework used by enterprises [
        <xref ref-type="bibr" rid="ref31">31</xref>
        ]. To the best of our
knowledge, none of the studies mentioned above does consider the dynamicity
of the SC based on the parameters of its functions (class methods), nor the
applicability of these SC design patterns on permissioned blockchain, e.g., HF.
Furthermore, our study measures in section 6 that there are issues of scalability
with satellite patterns in case there is a large number of transactions.
      </p>
      <p>We propose a new way of managing SC in a dynamic way by providing a
prominent solution for permissioned blockchains.</p>
    </sec>
    <sec id="sec-6">
      <title>5 Dynamic SC for permissioned blockchain based on dynamic parameterization</title>
      <sec id="sec-6-1">
        <title>5.1 Dynamic parameterization</title>
        <p>We present an approach that allows de ning SC, speci c to a use case, that
will have a static code deployed on the blockchain, but it will run dynamically.
Mainly the dynamic part of these SC remains the parameters of their
transactions. We propose the usage of the blockchain technological features to store
data, which further enables the possibility to store \dynamic parameter"
(DynParam2) into it. That is considered a variable or an asset following the HF
terminology. This variable leads on relying the SC code on that internal data
(i.e. constant) in order to have a dynamic behavior for the cases when in the
case when the DynParam is updated, in an SC that has immutable (static code).
Emphasizing that providing this DynParam as arguments of the SC transactions
is an external input (e.g., from the external API call, a.k.a. \Oracle" in the ETH
community).</p>
      </sec>
      <sec id="sec-6-2">
        <title>5.2 State machine representation</title>
        <p>In Figure 3 we show how DynParam is working for the two functionalities
Set and DoSmth that the SC has. Set corresponds to the ability to set (if
doesn't exist) or update (if exist) the dynamic parameter that will be stored
in the blockchain. That variable can be of any type, even though it is usually
string or integer. And the DoSmth transaction can be of any purpose while it is
using this DynParam to adapt the behavior of the code according to its value.
Further, if the DynParam is not set/de ned, the SC cannot run (cf. Locked
state). If DynParam is set, we can run the DoSmth functionality, which will
be one behavior (or let's say state 1). If we update by setting another value
in DynParam, then the DoSmth transaction will change in consequence (i.e.
2 The dynamic parameter term presents a constant (which is static for the time being)
and it will change when a speci c SC is called for updating its value, then globally
it turns to be dynamic for long-time point of view.
behavior/state 2, 3, ... N), still based on the same static code/logic. This solution
assumes that the DynParam is given by one authorized user from the outside of
the blockchain and checked by the transaction itself to accept or revoke it.</p>
        <p>Moreover, for automation purposes, we can easily extend that solution by
substituting the user by an automated call of the SC to an external database
to getting back the new value for the DynParam while the user identity is still
known and allowed by the contract.</p>
      </sec>
      <sec id="sec-6-3">
        <title>5.3 Use case implementation</title>
        <p>
          The enterprise based model is showed on Figure 4, and for the
implementation is completed by using the Hyperledger Composer3 v0.20.4 over HF v1.4.1
This solution is accessible on GitHub [
          <xref ref-type="bibr" rid="ref32">32</xref>
          ]. On the left side of the model, there
are presented \On Chain" components of the model, while in the right part of
the model, there are presented components that supports blockchain solution.
For developing this model, three SC for performing the necessary functionalities
expressed in transactions, e.g., Collect (TX1), Set (TX2), and Notify (TX3).
The DynParam and Temperature are de ned as assets and also
TemperatureExceeded as an event to notify stakeholders when the temperature threshold is
exceeded. The Collect transaction serves to collect the last temperature value
from the sensor. Set is used to de ne and change the needed dynamic constants.
In our case, it is unique and named \Threshold Tabc", which is hardcoded in
the Notify transaction code to avoid users the need to know the name of this
parameter. The Notify transaction serves to check if the temperature is exceeded
the threshold (DynParam) de ned by the Set transaction. In the case where
that happens, Notify will generate and send the TemperatureExceeded event to
alert the stakeholders allowed to read that event. Thus, Notify is illustrating
the usage of the dynamic constant through access to \Threshold Tabc". So, an
update of the threshold does not require an update of the Notify thanks to the
Set transaction and the use of assets.
3 Composer is now deprecated but still usable, next tools getting the succession and
doing quite the same are named Convector &amp; Hurley.
        </p>
      </sec>
    </sec>
    <sec id="sec-7">
      <title>6 Evaluation and discussion</title>
      <p>
        We evaluated our proposed solution by comparing it with the Satellite design
pattern proposed on [
        <xref ref-type="bibr" rid="ref30">30</xref>
        ] and previously presented in section 4. The satellite
pattern has three main transactions: the rst one is used to update the address
referring to the satellite deployed, the second transaction serves to process and
calculate the value of the variable relaying to intermediate call of a satellite, and
the third one serves to use the calculated result stored in a variable in order to
adapt the contract behaviour by doing \something" indent by user, based on
that variable. So, each satellite is dedicated to do one single thing, which implies
that we need to deploy another satellite when the calculation has to change, but
we can still reused a old one if that calculation has already been de ned and
deployed. Compare with satellite pattern, our approach uses two transactions:
the rst one serves to update the internal variable whose the value is provided as
argument of the transaction, and the second one uses that value as intended by
user. In our approach we assume the calculation for any variable is performed
o -chain, as presented in 4.
      </p>
      <p>
        The methodology is the following: 1) We implemented the satellite pattern
over ETH framework by using Tru e and Ganache tools; 2) We implemented
our solution using HF by using Convector and Hurley tools; 3) We executed both
scripts for testing both test-cases [
        <xref ref-type="bibr" rid="ref32">32</xref>
        ], in order to collect empirical data, and for
being able to compare both metrics. It worth noting that our scripts are running
sequentially, meaning that, it start new transaction only if the previous has been
completed. Also, to avoid distorting the results, we reinitialize the network after
each calculated point (i.e. a group of transactions). Moreover, time spent by the
setup and deployment of the network and contracts is not taken into account,
as global running time on metrics results, as we intend to evaluate the required
time for updating a constant/parameter.
      </p>
      <p>The observed metrics are the number of the transaction resulting over the
blockchain. For each update of the variable, the time spent to process all
transactions, the total weight of all transactions gathered into blocks, and nally,
the number of blocks created. Our scripts process the following set of input
transaction4: 2, 4, 8, 10, 20, 30, 40, 50, 100, 200, 500, 1000. Mainly the
technical di erences between both test-cases are: 1) observed networks (a local ETH
versus a local HF); 2) Blockchain settings regarding the blocks creation: ETH
builds a block each 15 seconds where its size is xed to 1KB, whereas HF builds
a block each 2 seconds or if there are more than 10 transactions per block or if
the block size exceeds 99MB); 3) Benchmark scripts for test-cases (NodeJS for
ETH through Tru e against Bash for HF). The tests are performed by using
the same set of updating transactions, and we use the same processing power
environment: a 64bits GNU/Linux 4.15 Virtual Machine running Ubuntu 18.04.3
LTS, with 8GB of RAM and 3x 3.40GHz.
4 Inputs are grouped by a set of N updates resulting to obtain one point for each set.</p>
      <p>Here, the input set named \update" refers to the number of updates we want for the
internal variable, independently of the test-case implementation. In other terms, for
one update of the variable the e ects are measured in the metrics, e.g., how many
real transactions are applied for one requested logical update.</p>
      <p>The gure 5 is composed of four di erent graphs and shows the results of
this study. The x-axis of the graphs shows the number of updating transaction
batches. Reminding that for the satellite pattern for one input transaction leads
to three applied transactions (showed in orange colors in all graphs), whereas for
our solution that results in exactly two transactions (showed in blue color in all
graphs). The graph on B shows these evidences and in our quantify our solution
as more e cient. The graph in A shows the total time needed to execute both
solutions. The results from A, proof that ETH is around ve-time slower than
HF. Next ascertainment, the graph on C shows the number of created blocks.
The two curves are superposed. There is a two factor between input and output
(i.e. one update leads to two created blocks). However there is a di erence that
cannot be seen on the graph, HF is still using two blocks in addition to the double
inputs. This is due to the need for HF to create the variable before being able to
update it (where ETH needs to create the Satellite before using it). Moreover,
the number of the created block may vary in a real network where transactions
might be provided by peers in the meantime following a distributed way (against
the sequential way used here for test-cases). Finally, the graph on D exposed the
total blockchain weight resulting in comparison to the input sets. We can see
that ETH is eight times lighter than HF. This is due to the default block size
and the sequential execution of transactions. In fact, HF has in average blocks of
8KB and 1KB for ETH. And because of the sequentially processing, we do not
exploit the storage of several transactions in each block. One update for ETH
gives 2 blocks (with 1+2 transactions), on the other side, one update for HF
gives 2 blocks (with 1+1 transaction).</p>
      <sec id="sec-7-1">
        <title>6.1 Discussions</title>
        <p>This approach impacts directly the quality of the blockchain-based solution.
In this paper, we propose a solution that facilitates the maintenance tasks with
a focus on SC. Our approach is enabling the de nition of dynamic parameters
stored as an asset (cf. HF) instead of being hard-coded in the SC logic, as any
classical constants/parameter. The use of assets allows updating the value of this
variables through a transaction without the need to upgrade the SC itself. For
the proposed approach, a proof of concept (PoC) is developed for supporting our
conceptual solution and providing access to this solution regarding our de ned
use case.</p>
        <p>The modeling part of this approach allows extending on other use cases, e.g.,
legal reasoning use case. Since the laws are subject to change, they might be
seen as obstructions for developing a sustainable blockchain-based solution. By
employing our approach, the \law articles" might be saved on the assets and
they might be change-over-time without disturbing the entire system.</p>
        <p>Regarding the security, this exposed set transaction causing changes must be
restricted to some of the stakeholders who are responsible for maintaining the
system. For the case of permission blockchain, e.g., HF, the stakeholder must be
an authenticated and authorized user. In the case of a public blockchain, e.g.,</p>
        <p>ETH, this transaction must be restricted to the owner of the SC or a speci c
list of the authorized users hard-coded in the contract.</p>
        <p>
          For future works, we intend to extend the current approach and investigate
the possibility of implementing our solution in di erent blockchain frameworks
i.e., Quorum [
          <xref ref-type="bibr" rid="ref33">33</xref>
          ] and Corda [
          <xref ref-type="bibr" rid="ref34">34</xref>
          ].
        </p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>Satoshi</given-names>
            <surname>Nakamoto. Bitcoin - A Peer-</surname>
          </string-name>
          to-
          <source>Peer Electronic Cash System</source>
          ,
          <year>2008</year>
          . URL: https://bitcoin.org/bitcoin.pdf
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>Blockchain</given-names>
            <surname>Survey</surname>
          </string-name>
          :
          <article-title>Blockchain gets down to business</article-title>
          , https://www2.deloitte.com/content/dam/insights/us/articles/2019-globalblockchain
          <article-title>-survey/DI 2019-global-blockchain-survey</article-title>
          .
          <source>pdf, Retrieved 18 October 2019</source>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Golosova</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Romanovs</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>The Advantages and Disadvantages of the Blockchain Technology</article-title>
          .
          <source>In the 6th Workshop on Advances in Information, Electronic and Electrical Engineering (AIEEE)</source>
          , IEEE, pp.
          <fpage>1</fpage>
          -
          <lpage>6</lpage>
          , (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>Vitalik</given-names>
            <surname>Buterin</surname>
          </string-name>
          .
          <article-title>A next generation smart contract and decentralized application platform</article-title>
          , http://blockchainlab.com/pdf/
          <article-title>Ethereum white papera next generation smart contract and decentralized application platform-vitalikbuterin</article-title>
          .
          <source>pdf. 2016. Retrieved 19 October 2019</source>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>Nick</given-names>
            <surname>Szabo</surname>
          </string-name>
          . Smart Contract, http://www.fon.hum.uva.nl/rob/Courses/ InformationInSpeech/CDROM/Literature/LOTwinterschool2006/szabo.best.vwh.net/ smart contracts 2.html. (
          <year>1996</year>
          ).
          <source>Retrieved 19 October 2019</source>
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6. Hyperledger - URL: https://www.hyperledger.org/.
          <source>Retrieved 19 October 2019</source>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Mendling</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Weber</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Aalst</surname>
            ,
            <given-names>W.V.D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Brocke</surname>
            ,
            <given-names>J.V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cabanillas</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Daniel</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Debois</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ciccio</surname>
            ,
            <given-names>C.D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dumas</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dustdar</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Gal</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Blockchains for business process management-challenges and opportunities</article-title>
          .
          <source>ACM Transactions on Management Information Systems (TMIS)</source>
          , (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Alharby</surname>
          </string-name>
          , M.,
          <string-name>
            <surname>van Moorsel</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Blockchain-based smart contracts: A systematic mapping study</article-title>
          .
          <source>arXiv preprint arXiv:1710</source>
          .
          <fpage>06372</fpage>
          . (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Gamma</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Helm</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          , Johnson, R.,
          <string-name>
            <surname>Vlissides</surname>
          </string-name>
          , J.: Design Patterns:
          <article-title>Elements of Reusable Object-Oriented Software Addison-Wesley</article-title>
          . Reading, MA, (
          <year>1995</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <article-title>What is a merkle tree? beginner's guide to this blockchain component</article-title>
          , https://blockonomi.com/merkle-tree/.
          <source>Retrieved 19 October 2019</source>
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Zheng</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Xie</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dai</surname>
            ,
            <given-names>H. N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chen</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          :
          <article-title>Blockchain challenges and opportunities: A survey</article-title>
          .
          <source>International Journal of Web and Grid Services</source>
          ,
          <volume>14</volume>
          (
          <issue>4</issue>
          ), pp.
          <fpage>352</fpage>
          -
          <lpage>375</lpage>
          . (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Tasca</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tessone</surname>
            ,
            <given-names>C. J.:</given-names>
          </string-name>
          <article-title>Taxonomy of blockchain technologies. Principles of identi cation and classi cation</article-title>
          .
          <source>arXiv preprint arXiv:1708</source>
          .
          <fpage>04872</fpage>
          .(
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Xu</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Weber</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Staples</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhu</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bosch</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bass</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pautasso</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Rimba</surname>
            ,
            <given-names>P.:</given-names>
          </string-name>
          <article-title>A taxonomy of blockchain-based systems for architecture design</article-title>
          .
          <source>In IEEE International Conference on Software Architecture (ICSA)</source>
          . pp.
          <fpage>243</fpage>
          -
          <lpage>252</lpage>
          . (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Antonopoulos</surname>
            ,
            <given-names>A. M.</given-names>
          </string-name>
          :
          <article-title>Mastering Bitcoin: Programming the open blockchain. "</article-title>
          <string-name>
            <surname>O'Reilly Media</surname>
          </string-name>
          ,
          <source>Inc."</source>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Xu</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pautasso</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhu</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gramoli</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ponomarev</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tran</surname>
            ,
            <given-names>A. B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chen</surname>
            ,
            <given-names>S.:</given-names>
          </string-name>
          <article-title>The blockchain as a software connector</article-title>
          .
          <source>In 2016 13th Working IEEE/IFIP Conference on Software Architecture (WICSA)</source>
          . pp.
          <fpage>182</fpage>
          -
          <lpage>191</lpage>
          . (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <source>Solidity | Solidity 0.5</source>
          .12 documentation, https://solidity.readthedocs.
          <source>io/en/v0.5</source>
          .12/. Retrieved 21 October 2019
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>Kolluri</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nikolic</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sergey</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hobor</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Saxena</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Exploiting the laws of order in smart contracts</article-title>
          .
          <source>In Proceedings of the 28th ACM SIGSOFT International Symposium on Software Testing and Analysis</source>
          . pp.
          <fpage>363</fpage>
          -
          <lpage>373</lpage>
          . ACM. (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>Mik</surname>
          </string-name>
          , E.:
          <article-title>Smart contracts: terminology, technical limitations and real world complexity</article-title>
          .
          <source>Law, Innovation and Technology</source>
          ,
          <volume>9</volume>
          (
          <issue>2</issue>
          ), pp.
          <fpage>269</fpage>
          -
          <lpage>300</lpage>
          . (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19. Home | Ethereum, https://ethereum.org/.
          <source>Retrieved 21 October 2019</source>
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20.
          <string-name>
            <surname>Luu</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chu</surname>
            ,
            <given-names>D. H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Olickel</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Saxena</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hobor</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Making smart contracts smarter</article-title>
          .
          <source>In Proceedings of the 2016 ACM SIGSAC conference on computer and communications security</source>
          (pp.
          <fpage>254</fpage>
          -
          <lpage>269</lpage>
          ).(
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          21. (
          <year>2019</year>
          ). Buildmedia.readthedocs.org, https://buildmedia.readthedocs.org/media/pdf/hyperledgerfabric/latest/hyperledger-fabric.
          <source>pdf. Retrieved 21 October 2019</source>
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          22. Introduction to Hyperledger Fabric, https://hyperledger-fabric.readthedocs.io /en/latest/blockchain.html.
          <source>Retrieved 21 October 2019</source>
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          23. Docker - Website. URL: https://www.docker.com/.
          <source>Retrieved 19 October 2019</source>
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          24.
          <string-name>
            <surname>Imeri</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Khadraoui</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Khadraoui</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>A Conceptual and Technical Approach for Transportation of Dangerous Goods in Compliance with Regulatory Framework</article-title>
          .
          <volume>12</volume>
          (
          <issue>9</issue>
          ), (pp.
          <fpage>708</fpage>
          -
          <lpage>721</lpage>
          ).
          <source>Journal of Software (JWS)</source>
          .
          <article-title>(</article-title>
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          25.
          <string-name>
            <surname>Wohrer</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zdun</surname>
            ,
            <given-names>U.</given-names>
          </string-name>
          :
          <article-title>Smart contracts: security patterns in the ethereum ecosystem and solidity</article-title>
          .
          <source>In 2018 International Workshop on Blockchain Oriented Software Engineering (IWBOSE)</source>
          (pp.
          <fpage>2</fpage>
          -
          <lpage>8</lpage>
          ).(
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          26.
          <string-name>
            <surname>Liu</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lu</surname>
            ,
            <given-names>Q.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Xu</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhu</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Yao</surname>
          </string-name>
          , H.:
          <article-title>Applying design patterns in smart contracts</article-title>
          . In International Conference on Blockchain (pp.
          <fpage>92</fpage>
          -
          <lpage>106</lpage>
          ).Springer, Cham. (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref27">
        <mixed-citation>
          27.
          <string-name>
            <surname>Alharby</surname>
          </string-name>
          , M.,
          <string-name>
            <surname>van Moorsel</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Blockchain-based smart contracts: A systematic mapping study</article-title>
          .
          <source>arXiv preprint arXiv:1710</source>
          .
          <fpage>06372</fpage>
          .(
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref28">
        <mixed-citation>
          28.
          <string-name>
            <surname>Frantz</surname>
            ,
            <given-names>C. K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nowostawski</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>From institutions to code: Towards automated generation of smart contracts</article-title>
          .
          <source>In 2016 IEEE 1st International Workshops on Foundations and Applications of Self* Systems (FAS* W)</source>
          (pp.
          <fpage>210</fpage>
          -
          <lpage>215</lpage>
          ). (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref29">
        <mixed-citation>
          29. Michiel Mulders:
          <article-title>Smart contract safety: Best practices and design patterns</article-title>
          , https://www.sitepoint.
          <article-title>com/smart-contract-safety-best-practicesdesign-patterns/</article-title>
          ,
          <source>Retrieved 19 October 2019</source>
        </mixed-citation>
      </ref>
      <ref id="ref30">
        <mixed-citation>
          30. Wohrer,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Zdun</surname>
          </string-name>
          ,
          <string-name>
            <surname>U.</surname>
          </string-name>
          :
          <article-title>Design patterns for smart contracts in the ecosystem</article-title>
          .
          <source>In 2018 IEEE International Conference on Internet of Things (iThings)</source>
          and
          <article-title>IEEE Green Computing and Communications (GreenCom) and</article-title>
          IEEE Cyber,
          <article-title>Physical and Social Computing (CPSCom) and IEEE Smart Data (SmartData) (pp</article-title>
          .
          <fpage>1513</fpage>
          -
          <lpage>1520</lpage>
          ). (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref31">
        <mixed-citation>
          31.
          <string-name>
            <surname>Top</surname>
          </string-name>
          <article-title>Blockchain Platforms of 2019 for Blockchain Application: https://www.leewayhertz.com/blockchain-platforms-for-top-blockchaincompanies/</article-title>
          .
          <source>Retrieved 22 October 2019</source>
        </mixed-citation>
      </ref>
      <ref id="ref32">
        <mixed-citation>
          32.
          <article-title>Gr4pha/hyperledger-dynamic-smart-contract.</article-title>
          .
          <source>GitHub</source>
          .: from https://github.com/Gr4pha/hyperledger-dynamic
          <article-title>-smart-contract</article-title>
          .
          <source>Retrieved 22 October 2019</source>
        </mixed-citation>
      </ref>
      <ref id="ref33">
        <mixed-citation>
          33.
          <string-name>
            <surname>Quorum</surname>
          </string-name>
          <article-title>- jpmorganchase/quorum: A permissioned implementation of supporting data privacy</article-title>
          . https://github.com/jpmorganchase/ quorum. Retrieved 22 October 2019
        </mixed-citation>
      </ref>
      <ref id="ref34">
        <mixed-citation>
          34.
          <string-name>
            <surname>Corda</surname>
          </string-name>
          :
          <article-title>An open source blockchain platform for businesses https: //www</article-title>
          .corda.net/.
          <source>Retrieved 22 October 2019</source>
        </mixed-citation>
      </ref>
      <ref id="ref35">
        <mixed-citation>
          35. Clearmatics/smart-contract-upgrade, https://github.com/clearmatics/smartcontract-upgrade.
          <source>Retrieved 25 October</source>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>