Upload
others
View
2
Download
0
Embed Size (px)
Citation preview
IN DEGREE PROJECT INDUSTRIAL ENGINEERING AND MANAGEMENT,SECOND CYCLE, 30 CREDITS
, STOCKHOLM SWEDEN 2018
Potential of Smart Contract in Business to Business
AVINASH VATTIKUTTI
KTH ROYAL INSTITUTE OF TECHNOLOGYSCHOOL OF INDUSTRIAL ENGINEERING AND MANAGEMENT
Potential of Smart Contract in Business to Business
by
Avinash Vattikutti
Master of Science Thesis TRITA-ITM-EX 2018:716
KTH Industrial Engineering and Management
Industrial Management
SE-100 44 STOCKHOLM
Master of Science Thesis TRITA-ITM-EX 2018:716
Potential of Smart Contract in Business to
Business
AVINASH VATTIKUTTI
Approved
2018-10-23
Examiner
Jannis Angelis
Supervisor
Luca Urciuoli
Commissioner
SCANIA
Contact person
João Dias Ferreira
Abstract The implementation of smart contract technology with their plausible applications in a business
to business are explored. The thesis work shows how Blockchain technology works on the
concept of decentralized system which is beneficial to eliminate the need for central authority.
The thesis focuses on elimination of challenges pertaining to the selected departments in an
organization. The thesis resolves challenges pertaining to lack of transparency, traceability and
significant time-delays while in the process of decision making. The influence of blockchain
technology and smart contract technology to eliminate these challenges are discussed. Logic of
the smart contract and working of the blockchain pertaining to a specific industrial case study
are demonstrated. Methodology to set up a smart contract interface in a business to business
setting is investigated in this thesis. An observation study has been done in order to show how
transparency, traceability and time delay in decision making is achieved by using smart contract
interface. This thesis also shows how the blockchain and smart contract technology tries to
implement coordination theory.
Keywords: Smart contract technology, Blockchain technology, transparency, traceability, time-
delays, coordination theory.
Acknowledgement
To Luca Urciuoli, my thesis supervisor, for his extreme motivation and guidance in each and
every step of the way. Without his support, expertise and extreme patience, this thesis would
not have been possible. I could not have imagined having a better supervisor for my thesis
study.
To João Dias Ferreira, my company supervisor, for his guidance in each and every stage in the
research. Without his support, this thesis would not have been possible.
To Jannis Angelis, my thesis examiner, for his guidance helped me in all the time of research
and writing of this thesis.
To my family and friends, who have always supported and believed me in each and every step
I have pursued and done.
Table of Contents
1.0 Introduction ....................................................................................................................1
1.1 Research Background ...................................................................................................1
1.2 Problematization ...........................................................................................................2
1.3 Research Purpose ..........................................................................................................3
1.4 Research Questions .......................................................................................................3
1.5 Delimitations ................................................................................................................3
1.6 Contribution .................................................................................................................4
2.0 Literature review ............................................................................................................5
2.1 Information Sharing ......................................................................................................5
2.2 Distributed Ledger technology ......................................................................................6
2.2.1 Blockchain Platform ...............................................................................................7
2.2.2 Smart Contract ...................................................................................................... 12
2.3 Supply Chain Management ......................................................................................... 17
2.4 Supply Chain Coordination ......................................................................................... 17
2.4.1 Transparency ........................................................................................................ 18
2.4.2 Traceability........................................................................................................... 19
2.4.3 Time delay ............................................................................................................ 20
2.5 Literature Framework ................................................................................................. 20
3.0 Method .......................................................................................................................... 22
3.1 Research Approach ..................................................................................................... 22
3.2 Research Method ........................................................................................................ 22
3.3 Data Gathering............................................................................................................ 23
3.3.1 Literature Review ................................................................................................. 23
3.3.2 Interviews ............................................................................................................. 23
3.4 Steps to create smart contract Interface ....................................................................... 24
3.5 Research Ethics .......................................................................................................... 25
4.0 Problem Description ..................................................................................................... 26
4.1 Implementation ........................................................................................................... 27
4.2 Result from the smart contract interface ...................................................................... 29
4.2.1 Observation on transparency ................................................................................. 29
4.2.2 Observation on traceability ................................................................................... 30
4.2.3 Observation on time delay .................................................................................... 31
4.3 After Implementation of smart contract ....................................................................... 32
5.0 Discussion ...................................................................................................................... 33
6.0 Conclusion ..................................................................................................................... 36
7.0 References ..................................................................................................................... 38
Appendix 1: ......................................................................................................................... 43
Appendix 2: ......................................................................................................................... 44
List of Figures
Figure 1: Framework for Blockchain analysis (Brenig, 2016) .................................................7
Figure 2: Centralized, de-Centralized and distributed network comparison (Morabito, 2017 ...8
Figure 3: Blockchain visualization (Zheng et al., 2016) ..........................................................9
Figure 4: Matrix to plot data access and writing/validation restriction (own representation) .. 11
Figure 5: Elements of smart-contract technology (own representation) ................................. 15
Figure 6: Simplified block structure in Ethereum blockchain (own representation) ............... 16
Figure 7: Framework for literature review (Own representation) ........................................... 20
Figure 8: Research approach (own representation) ................................................................ 22
Figure 9: Steps for developing smart contract interface (own representation) ........................ 24
Figure 10: Asset flow and Information flow between departments ........................................ 26
Figure 11: Data for creating smart contract interface(own representation) ............................. 27
Figure 12: Generation of new blocks and connection of blocks in represented in Sequence
Diagram(Own representation) ....................................................................................... 28
Figure 13: Input conditions for generating Block (Own representation) ................................ 28
Figure 15: Input conditions for generating Block (Own representation) ................................ 29
Figure 16: Input conditions for generating Block (Own representation) ................................ 30
Figure 17: Input conditions for generating Block (Own representation) ................................ 30
Figure 18: Traceability of asset before implementation of smart contract (Own representation)
..................................................................................................................................... 30
Figure 19: Traceability of asset after implementation of smart contract (Own representation)
..................................................................................................................................... 31
Figure 20: Notification in the smart contract interface .......................................................... 32
Figure 21: Asset flow and information flow through smart contract between departments
(Own representation) .................................................................................................... 32
1
1.0 Introduction Every business in the modern era is highly dynamic and competitive. To stay ahead of other
competitors, companies demand continuous innovation in their strategies on various aspects.
This continuous process of improvement is driven by the introduction of new technologies to
solve perennial management problems. Problems are broadly classified purely as managerial
and strategic issues which hamper the available productivity and reduce the efficiency of the
overall system.
At present organizations around the world widely use ERP (Enterprise Resource Planning) to
store data in a centralized system. Data can be fetched from the centralized system such that
every stakeholder in the organization can access it. But often in big companies due to reasons
pertaining to lack of communication, transparency, traceability and time delay in planning and
scheduling, the ERP platform poses threat to proper functioning of routine tasks.
In order to counter these demerits of ERP new technologies have to be tried out. One
meaningful way to mitigate such problems is to use smart contract. As described by Nick Szabo
in 1996, “a smart contract is a set of promises, specified in digital form, including protocols
within which the parties perform on these promises” (Nick, 1996). The relevance of Blockchain
technology is probed by improvement in areas such as tracking of asset, traceability of asset
and making the manufacturing business processes more secure and transparent. As per one of
the definitions, “In essence, Blockchain is a technology for decentralized storage of
transactional data. The storage of a transaction is organized in so-called blocks, while following
transactions are stored in new blocks. The sum of several blocks makes up a chain; a logical
sequence of transactions” (Nick, 1996). As far as supply chain management is concerned,
Blockchain technology is potentially poised to play a crucial role in three aspects: first is
traceability, second is smart contracts and third is safe transactions. Creating a consistent
network for traceability of assets will remain a major objective. Moreover, to achieve
transparent and reliable documentation of all movements and transactions, communication in
operations management must be matured as lack of cross functional coordination is one of the
biggest issues faced in currently implemented ERP systems. (Gopaul et al., 2016).
1.1 Research Background Given the advantages of Smart contract, its implementation in operations management is poised
to be disruptive (Erik, 2018) since it is relatively new. It is important to take a step-wise
approach towards the validation of such technology before its implementation on a day-to-day
basis in a business context. Therefore before implementing it on a big network, it is essential to
develop a concept and validate it on a small scale.
At Scania, Södertälje three different departments namely, machining, assembly and logistics
function in the production of an automotive engine component are considered to implement
Smart Contract to their day to day business affairs. Throughout the asset flow, there are several
stakeholders who are involved right from the supplier where the raw material is produced until
the logistics which delivers the product to the end user. In the current study, when it comes to
addressing issues related to traceability, time delay in decision making and planning; and
transparency among the three departments the smart contract is implemented.
If the departments in the company were considered as separate units, a set of rules or protocols
to allow fluent working environment are to be followed both within and outside the
departments. This set of rules not only separates the units, but also connects them. These
established rules and protocols do not necessarily streamline the information sharing and asset
flow process, thus giving rise to strategic issues. To resolve these issues it is first essential to
2
identify the problems that do not allow streamlining of the information and asset flow. The
identified issue in an ERP system are transparency, traceability and time delay in planning and
scheduling. Moreover, once the issues have been identified the use of Smart contract to resolve
the gaps are to be explored. Pertaining to this thesis, a Smart contract can be used to establish
a set of rules and protocols that nullifies the operational limitations of the involved units
(departments) by real time validation and verification of data. Thus, implementation of a smart
contract interface that quickens the communication and has the potential to boost productivity
is an interesting area to probe in. Instead of analyzing business to customer relationship, here
the Smart contract are to be implemented in a business to business setting. The departments of
interest can be considered as a partial link of a big supply chain network.
The most important area of focus here is real time access to data as well as control of the shared
data and immutability of data. Moreover, this enables transparency and traceability of
information among the involved departments. This is because, a transparent association offers
information in a way that the responsible stakeholders can obtain a profound insight into the
problems that are substantial for them (Maitri, 2010). When it comes to importance of
transparency in operations management, some critical business issues like production
performance can be evaluated without any hassle (Meuwissen et al., 2003). If the system is
transparent then it is easier to narrow down to the problems that affect the business performance
and profitability. The performance and profitability are directly attached to the KPI (Key
Performance Indicators). An increase in the KPI highlights better profitability and performance
(Maitri, 2010).
1.2 Problematization The organization of interest have problems with tracking of asset flow and sharing of
information related to the asset which need to be investigated. Upon collection of information
about the issue, the problems that the three departments, logistics, machining and assembly,
were facing could be classified in three different categories:
Transparency – despite collecting data and tagging the assets with identification like
barcode, it is difficult to get the details of the stakeholders involved in handling the
asset, because the barcode is only there to connect the component to information on a
system and in this system the information might not be complete. Moreover, it is easy
to know where and how a problem has occurred. This is possible only when all the
involved stake holders have access to information for monitoring, while only the
authoritative personnel have the designation to modify or approve it. To create such an
open platform for information sharing, the information is to be decentralized so that
everyone who is authorized to get the information can access it.
Traceability – due to various reason like quality rejections and producing different
variants of products, etc. manufacturing businesses are often unable to trace where
exactly the problem arose. By the time the problem is traced back to its origin a lot of
time and effort is already lost. Moreover, in complex manufacturing setting as the one
that has been analysed in this study, tracing an anomaly is quite challenging. To improve
traceability and avoid production or delivery of unwanted asset a platform that connects
all the important nodes of the material flow for a given asset is needed.
Time delay – loss of productive time is intrinsic to the above-mentioned issues in a
general sense. Moreover, there are other activities like planning for maintenance,
scheduling, and decision making, etc. which cannot be categorized as futile but can be
made quicker to improve productivity. This is possible if there was a system that would
record the essential parameters in real time and present the impact results to assist
3
operations management authority in running the business more efficiently. It is not only
about making quicker decisions but making decisions based on actual information. This
will improve the decision making since better decisions can be made when we know
better the state of things.
A suitable technology which could mitigate these problems need to be implemented
therefore enabling streamlined flow of information across all departments.
1.3 Research Purpose
The purpose of this thesis is to see the potential of Smart contract technology in addressing the
problems stated in the problematization. The potential of Smart contract is to be assessed,
considering the domain as three departments (Assembly, Machining and logistic) at Scania,
Södertälje.
Since the departments like logistic, machining and assembly have different technical roles and
different information requirements, it is important to provide a solution that resolves the issues
separately and bring the departments on the same platform as far as the information sharing is
concerned. Therefore, the objective is to device a software solution that allows access to
important information (attached to the asset like product identification number) that tracks
information from the order to delivery and contains the important parameters of time delay.
Access to these information in and across the logistic, machining and assembly departments in
an organized way is to be presented by the Smart contract interface.
1.4 Research Questions
The research purpose will be accomplished by answering the following research question:
The first question is related to creating smart contract interface
What type of contractual agreements (conditions) between the departments are
considered for creating smart contract interface?
The next two questions is related to how smart contract interface will achieve the problems
How are smart contract used to bring transparency and asset traceability across
departments in a business to business setting?
How are smart contract used to share asset information that improves the decision
making and planning procedure across departments in a business to business setting?
1.5 Delimitations This thesis is aimed to provide answers to the questions mentioned with regard to presented
problematization. But there are certain restrictions under which the thesis was performed. It is
delimited to a geographical area of Scania in Södertälje, even further the entire facility is not the
domain of this thesis. Since the focus was to design and test a Smart Contract interface, the domain
has been restricted to only three departments in the company; logistics, assembly and machining.
Nevertheless, the thesis does not take into consideration the supply chain related issues although
it is a popular belief that Blockchain is a solution to the transparency and traceability issues in
supply chain management. At this conceptual stage, financial aspects have been assumed to be of
minor importance, since they are difficult to estimate. Even so, by delimiting the thesis by
considering monetary aspects, the possibility for the solution presented here to serve as a complete
solution is also limited. To explore the technical challenges in implementing smart contract
crank-shaft is the only asset that has been considered for study, this restricts the domain of the
4
thesis but allows the possibility to explore the intricacies of Blockchain and smart contracts in
depth. The interface has not been implemented and tested on actual asset flow in the department
rather, the interface was tested virtually with manual input of data from different nodes
(different computers). This was done to avoid the purchase of new sensors and systems which
would have incurred costs. In order to avoid breach of privacy and legal scenarios, information
which was identified as personal or sensitive for the company has been excluded from the trials
of the interface. The author made the decision to focus only on the technical solution which is
based on Blockchain technology, this is because scholars believe it to be of great potential in
the future.
1.6 Contribution
The main contributions of this thesis can be characterised as empirical and analytical. Empirical
in a way that the thesis work has concluded to a profound technological and business
recommendation. Analytical in a way that the results this thesis has produced are analytical and
are based on empirical findings.
This thesis mainly focuses on exploring the potential of Smart contract technology for
operational processes and information sharing optimization in the three chosen departments.
The topic of this thesis is interesting because currently there is a hype about Blockchain
technology, however there is limited knowledge about its applications in the manufacturing
business and how it can be used to improve the tracking of assets. The target of this thesis is to
design and implement a Smart contract interface based on the recommendations provided by
the officials. The interface benefits transparency, traceability and reduces the time delay for the
activities of the three departments. The operational and technical benefits of using this
technology are discussed in terms of information flow optimization.
5
2.0 Literature review The focus of the literature review is justified by the purpose and research objectives. The main
focus of this chapter is to provide insightful details and analyses that have been done by
previously conducted researches in the subject.
2.1 Information Sharing
For a proper function of supply chain operations and planning, a comprehensive information
system is required which initiates, monitors, assists in decision making and reports. For forming
an integrated information system many components are to be combined. The major components
include:
Enterprise Resource Planning (ERP)
Material Requirements Planning (MRP)
Enterprise resource planning (ERP)
The ERP systems are also known as legacy systems and comprise the backbone of supply chain
information systems for most of the organizations. These systems hold the current and past data
as well as the transactions pertaining to the processes which enable initiating and tracking of
performance. Legacy systems are the main frame applications which were developed before
1990 for automation of transactions like order entry, order processing, warehouse operations,
inventory management, transportation and the financial transaction that are related to the
department. For example, the systems labelled as Order Management Systems (OMS) were the
ones that were related to customer orders, this is because these systems managed the process of
order fulfilment. In Addition to the order information, legacy systems also manage information
about customers, products, status of inventory and facility operations. In majority of the cases,
these legacy systems represented software modules which were developed independently,
hence they lacked consistency and integration. Thus, leading to problem of integrity and data
reliability.
ERP systems allowed integration of operations and initiation of reporting, monitoring and
tracking of critical activities like replenishment and fulfilment of processing. Moreover, the
ERP systems also incorporated an integrated corporate-wide database which was also referred
as a data warehouse, which along with the appropriate transactions facilitated logistics and
supply chain operations. Typical transactions comprised of order entry and fulfilment,
procurement or purchasing and transactions pertaining to production.
Communication system, execution system and planning systems are working close with the
ERP.
Communication Systems
The flow of information between functional groups within a firm and amongst the supply chain
partners was facilitated by the communication module. The logistic information consists of real
time data about operations of the company, inbound material flow, and status of production,
inventory, customer shipments and a record of the incoming orders.
Execution Systems
Enterprise execution systems work in close conjunction with the ERP systems to provide
specific function and support to the logistic operations. While, the ERP systems include
substantial functionality, most of them lack the capability to facilitate warehouse and
transportation operations. Most of the execution systems are integrated in the ERP to allow data
exchange. Apart from the supporting the warehouse management functions like receiving,
6
storage, shipping and the warehouse automation, Warehouse Management Systems (WMS)
also included reporting for management, value added services support and decision capability.
Planning Systems
Supply chain planning systems are now called as Advanced Planning and Scheduling (APS)
systems, these are developed to support in evaluation of supply chain alternatives and advice
the supply chain in decision making. The use of sophisticated supply chain planning systems is
increasing rapidly to allow for considering complex alternatives especially under tight decision
time constraints. General supply chain planning applications comprise of activities like
production scheduling, inventory resource planning and transportation planning. The APS
software systematically identifies and evaluates alternative courses of actions and proposes an
optimal solution that follows the imposed constrains. The decision making and proposing by
the APS is done based on the previously maintained and acquired data. The constraints that
generally are involved in the system are related to production, facility, transportation, inventory,
or raw material limitations.
Material Requirements Planning (MRP)
Material requirements planning (MRP) originates at the sales department with the planning of
sales. This plan allows the management to estimate the volume that they think is to be sold in
the following months or years to come. Then the comparison is made between the sales plan
and the available finished product stock which yields the volume to be produced. The
information from this calculation acts as an input for the manufacturing planning and control
systems. This input information can be distinguished in the following elements:
Master planning
Manufacturing resources planning
Master production scheduling
General capacity testing
Material requirement planning
Capacity requirements planning
Order release
Priority management
Capacity Management
2.2 Distributed Ledger technology
According to Goel (2016), the main four fundamental features are required to create the
distributed ledger technologies. Firstly, the distributed nature of technology is completely
independent and of third party intermediaries. Secondly, the cryptographic hashing creates
consensus mechanism in which transactions are verified. Thirdly, “the irreversibility” of the
transaction history, enabled by a proofing process. Lastly, the selection between permissioned
and permission less ledger, which defines much of the privacy.
The Blockchain is a peer-to-peer distributed decentralized application system which was
originally introduced for Bitcoin application, which then evolved and used for wide range of
applications (Goel, 2016). In the ongoing researches blockchain technology has often been
described as a milestone and considered as the next technology revolution referring to ‘the next
internet’ (Goel, 2016). This chapter serves to make such a statement comprehensible by
providing a basic understanding of how the technology works. In order to explain the
blockchain technology as an integral unit it is necessary to know its purpose, its structural
7
components and functions. In this chapter the vision that is pursued with this technology is
described along with the prerequisites that must be fulfilled. There are many ways in which the
blockchain technology can be implemented and hence a fully-explanatory explanation cannot
be made.
The technology described in this chapter is based on the blockchain technology behind Bitcoin
blockchain, which in other words is the basis for the explanation of a Smart-contract in the
blockchain applications. A technological framework that will work as a base to understand
following chapters of this research project is shown in Figure 1. The description of technology
is shaped as per the framework provided by Brenig et al. (2016).
Figure 1: Framework for Blockchain analysis (Brenig, 2016)
Blockchain Platform: According to Brenig et al. (2016) A Blockchain platform is identified
as a Decentralized consensus system. In market, there are different standards for Blockchain
technology. For example, the technologies working as the backbone of Bitcoin introduces some
standards, Ethereum introduces standards but it is different from Bitcoin standards and they
both represent different platforms, even if they are decentralized consensus system.
2.2.1 Blockchain Platform This section is aimed at providing a comprehensive definition for Blockchain platform. This is
done by analysing the critical building blocks that composes the Blockchain. According to
Mougayar (2016), the Blockchain platform can be recognized as the protocol of the Blockchain
technology, which is the fundamental basis for the other two layers, which are called as
applications and services. Blockchain primarily consists of a skeleton that works as the
technical backbone of applications like Bitcoin and Ethereum.
Following the definition provided by Glaser (2017), the current research recognizes Blockchain
platform as: “Blockchain is a transactional database, which is distributed among nodes linked
8
in a peer-to-peer (P2P) communication network. The access to the network is based on a
permission mechanism, which enables the nodes to perform transactions that hold validity
based on a consensus mechanism.” (Glaser, 2017)
The following paragraphs provide a complete description of the technical building blocks
behind the interface of the Blockchain platform. The main aim of the subsequent sections is to
provide an overview of the technical characteristics behind the present and the future potential
market applications.
The top - down approach is followed for the description of structure of Blockchain platform.
Which starts by describing the network structure. Secondly, after the analysis of the ledger
architecture it will be disintegrated into blocks and transactions. Thirdly, a general
understanding on the Blockchain working procedure will be presented by the transaction
mechanism. Fourthly, the definition of permission mechanism will be established. Finally, the
description of various consensus mechanisms will be done.
2.2.1.1 The Network Architecture According to Swan (2015), the distributed nature of the Blockchain technology is its key
feature. A distributed computing network system is a system where data and resources are
spread out on various hardware nodes, which is different from the centralized and decentralized
networks. As shown in Figure 2, every node in the decentralized network will maintain
historical those who hold signed ledger can access the information. Database of transactions
which is shared among the nodes. In spite of having copy of the ledger on every node, only
According to Morabito (2017), the blocks can be considered as containers that are composed
of the shared ledger which hold the data. These containers can only be accessed by those who
have the permission, otherwise these containers are sealed and their content cannot be accessed.
Figure 2: Centralized, de-Centralized and distributed network comparison (Morabito, 2017)
The IP addresses are used to identify each node, while public key is used by the users to address
to each other. According to Glaser (2017), every node in the network represents a
physical/virtual machine that shares and transfer information via TCP/IP with other nodes in
the network. if the receiver’s public identity is known then any node can be used to send a
transaction to that particular node in the network. This doesn’t require any involvement from
the third party or central authority in the transaction.
9
The system is more secure due to the absence of a central server, this is because it is more
difficult for a network to experience attacks like service denial attacks or client related attacks.
Additionally, huge hash recalculations are required for every block for changing a transaction
in the chain, which is to be registered after the modified block. This will improve the security
protection. Therefore, a trustworthy invisible authority which is represented by a consensus
mechanism is the basis on which the Blockchain is built (Xu, 2016).
As noticed by Meijer (2017), every node in Blockchain doesn’t have same power. Thus, a clear
distinction of powers is made. Making a clear distinction is also important since terms like
“miners”, “validators” and “full-node” are not used correctly and their meaning tends to vary
from application to application:
Users who only read the data: Those who have access to the data and store the
Blockchain.
Users who can read and write the data: These are the users that can send and receive
transactions through the Blockchain. Moreover, these users have access to the data and
store the Blockchain.
Users who validate data: These are the users that validate the transaction that are sent to
the Blockchain.
2.2.1.2 The Ledger Architecture According to Chuen (2015), a Blockchain ledger can be described as a string of blocks, which
can include a detailed list of transaction record, which is also similar to the conventional public
ledger. In Figure 3 describes a schematic visualisation of Blockchain. Every block in the chain
comprises of block-header and block-body. Block-header contains the data of previous and
following block-header hashes and time-stamp. Block-body is having inputs and outputs, which
comprises number of transaction and collection of transaction.
Figure 3: Blockchain visualization (Zheng et al., 2016)
Each node in the network hold a set of private and public keys. The private key is used to
encrypt the transaction before sending them. In order to send transaction, a sender needs his
private key and receiver’s public key. Before being stored or recorded in the Blockchain, the
transaction should undergo verification phase and signing phase. The signing phase is defined
as encryption of the sender’s data with the private key. The verification phase includes
computational problem’s solution that prevents same transaction from happening twice
(Morabito, 2017).
2.2.1.3 Blockchain Transaction Mechanism According to (Froystad P. and Holm J., 2016): The mechanism of transaction can be
explained in five key phases.
10
Definition of Transaction: A sender creates transaction in the Blockchain, by
mentioning the value of transaction and the details of receiver’s public key (It also
includes receiver’s address). Lastly, the sender transaction approves with the sender’s
cryptographic digital signature. According to Morabito (2017), this proves the digital
authenticity.
Authentication of Transaction: As soon as transaction is sent to the network, nodes in
the network receives transaction, then it confirms the message validity by decrypting
the digital signature. As per (Froystad P. and Holm J., 2016), transaction will be waiting
in the pool of pending transaction until block is created.
Creation of the Block: In order to create block, a node in the network takes responsibility
of the transaction by combining with all other pending transaction. Moreover, this is an
updated version of the ledger. As soon as block is created, a block is spread all over the
network for validation.
Validation of the Block: The nodes in the network will be responsible for validating the
block received by the proposed block. Then nodes in the network will start an interactive
process to validate the block. In this process of validation, there might be deviation in
the Blockchain branches, since different nodes do not share same perspective of the
entire network state. Hence, it is essential to reach a consensus on the block validity
among the different nodes based on a validation technique. According to Zheng (2016),
this phase will verifies the validity of every transaction by avoiding the fraudulent
attempts of transaction.
Chaining Block: As soon as each every transaction is included in the block, a block has
been accepted. If the new block is recorded, this will be linked to the last Blockchained
in time. The chain is updated and spread to the network, which will be accepted as
verified version of the Blockchain (Froystad P. and Holm J., 2016).
2.2.1.4 The 4 Ps of the Blockchain The original decentralized Blockchain structure is not applicable to all time stamped ledger
application. Each and every type of applications requires different level of security. Hence,
Blockchain architecture is based on two dimensional classification system:
Public Blockchain/Private Blockchain
There is a huge difference between public Blockchain and private Blockchain, especially when
it comes to level of platform accessibility. In public Blockchain, any user can join the network,
without requiring third party permission. A platform allows to each and everyone in the network
can do transaction. In private Blockchain, only authorize user can have an access and read the
data. In this every user in the network are known and trusted.
Permissioned Blockchain/permissionless Blockchain
Based on the rights to write and vote on the platform, permissioned Blockchain and
permissionless Blockchain is distinguished. Only limited and known users can have an access
to create, update and verify the ledger is called permissioned ledger. But in permissionless
ledger, every users have rights to verify and propose updates to the ledger.
11
Figure 4: Matrix to plot data access and writing/validation restriction (own representation)
2.2.1.5 Consensus Mechanism Blockchain platform is a cryptography-based system that is used to secure transactions in a
verifiable ledger of records. This basis leads to a redefinition of the mediator’s role as a
guarantee of validation in the system. This trust doesn’t rely more on any third-party but rather
on consensus mechanism. According to Swanson’s definition (2015), “consensus mechanism
is the process in which a majority (or in many cases all) of network validators come to
agreement on the state of a ledger”. Therefore, it comprises in the set of procedures and rules
that allow multiple nodes that are participating in the system to trust the information. From a
technical point of view, the use of pre-defined state transition rules is enabled by the consensus
algorithm, these rules act as a method to securely update the states, where the transition of state
is modified and decentralized in every node (Buterin, 2014). According to Morabito (2017), an
operative consensus mechanism should be based on three key concepts:
The laws, rules, transitions and states in the Blockchain are mutually accepted;
The nodes infrastructure, methods and stakeholders to which the laws apply are also
mutually accepted;
The perception of identity that is accepted by all nodes should be common and should
comply with the same set of rules.
There are various alternative consensus mechanisms that have been developed during the past
three decades. One of the most famous consensus mechanism is the Bitcoin, the Bitcoin
Blockchain is based on the “longest chain” mechanism, in this mechanism the chain which has
the most proof-of-work is defined as the valid ledger. However, there are some drawbacks and
limitations of the original Bitcoin- Blockchain technology like scalability, flexibility,
confidentiality and governance. These limitations have encouraged the investigation of other
12
consensus mechanisms. There is an attempt to make new Blockchain platforms which have
better scalability and are more energy efficient in ways of achieving the consensus amongst the
nodes for a given network. According to Mattila (2016), there are examples of alternative
consensus mechanisms like Proof-of-stake (this has more than one definitions), proof-of-
activity, proof-of-burn and proof-of-validation. The major the proof-of-work (PoW)
mechanism. They were the first to introduce the network security protocol, and then, later the
Hash cash proof-of-work scheme was theorized by Back (1997consensus types are briefly
described in the following part of this section.
The study done by Dwork and Noar (1993) provided). The concept consists of solving
mathematical computation that matches the hash relative to the transactions with one of the last
block recorded on the Blockchain. However, the computational process here needs to be
supported by a hardware, which demands a lot of energy. When the energy required for a single
transaction is multiplied with the total transactions required per second, the total energy
required is evaluated and it is found that the entire process is highly energy demanding.
The proof-of-stake (PoS) represents a treasured substitute to the PoW scheme, this is because
it is based on a more efficient computation procedure. Despite the blocks being generated
similarly to the PoW mechanism, the entire hashing procedure gets processed in a substantially
less search space, whereas unlimited search space is needed for of PoW (King and Nadal, 2012).
With the PoS scheme, since the transactions can be managed and registered quicker, the system
becomes faster and more energy-efficient. However, this system has its own challenges. For
example, there is risk of centralization, this is because the nodes with a high number of stake
holders exerts a dominant role on the remaining network.
According to the theory proposed by King and Nadal (2012), the version that is amalgamation
of Pow and PoS is a hybrid that represents the combination of the mining process of PoW while
having the energy effectiveness of PoS. In this Hybrid mechanism, the mining of the block is
done by miner with highest coinage, which is characterised by the cumulative amount of coins
that are owned by a miner throughout the span of ownership of the coin. In simple words, it
consists of a scheme with has low latency which is typically a PoW characteristic and low
energy-cost which is typically a PoS characteristic on the long run.
2.2.2 Smart Contract
Smart contracts in a Blockchain are nothing but a logic that is applied on the Blockchain, this
Blockchain consists of nodes which can receive and perform transactions among the linked
nodes. Smart contract is the logic on which these transactions are based and controlled. The
entire purpose of smart contracts is like a "computerised transaction protocol that executes
terms of a contract" (Szabo, 1996). The term ‘Smart contracts’ term was first coined by
cryptographer Nick Szabo. The elementary idea and the origin of the contract-part is that several
parts of the contracts can be included in the software in such a way that their breach is either
very expensive or entirely impossible. Sometimes, these smart contracts are often confused with
Ricardian contracts (Griggs, 2015), which is nothing but the compilation of digital recording
and connections of systems on a contract that is to be lawfully abided. But, these are not smart
contracts because they are neither supposed to be legal in any way nor connected to any outside
systems. It can however be imagined that value in connection of smart contracts is one defined
by Ricardian as "outsource" functionality of legal contracts.
According to Szabo, contracts should have a couple of characteristics if they are to be called as
smart contracts. These characteristics are as he describes it are, “visibility, online enforceability,
verifiability and privity”. These are explained as:
Visibility: Visibility (Szabo uses the term observability) means transparency, which is
that the participants bound by the contract should be able to see each other’s
13
performance and some certain activities as per the terms of the contract. Moreover, they
should be able to prove the implementation of their own terms to other participants. It
is like referring to the transparency of the actions taken by the logic algorithm of the
contract. Like, a Point-Of-Sale screen that shows the amount that is to be paid to the
customer but omits the fact that the data is being retrieved and saved from the credit
card is an excellent example of such a hidden action.
Online enforce-ability is referred as making sure of fulfilment of the terms of a contract.
The actions which can be taken to achieve this can be characterised as proactive and
reactive ones. Proactive measures try to make it technically impossible for the
participants to breach the contract terms and prevents either party to drop out of the
contract as well. Furthermore, if in case there is a valid breach on another part, then that
should be notified for further dealing. However, reactive measures seem to deter
malicious behaviour through the reputation or enforcement and by recovery of potential
assets after the breach of contract.
Smart contracts should be verifiable and auditable if there is a conflict amongst the
participants.
Smart contracts should be as private as possible, which means that the knowledge and
control pertaining to the data involved in a smart contract can only be accessed by the
participants if necessary.
The above-mentioned objectives of smart contracts can be observed as resulting in two separate
directions. Privacy is exercising a controlling force over contracts, ability to minimise openness
to outside parties. Whereas, on the other hand, there are three other objectives of: visibility,
enforceability and verifiability. These objectives require access to contractual data, which is to
be available to participants. Thus, an optimum solution must be found where even the little
information’s control is possible if it is given to external parties, however the possibility to
verify, observe and enforce should be simultaneously available.
2.2.2.1 Free Programmability in blockchain The smart contracts are designed to enable the creation of the decentralized programs, it will
also monitors and execute the programs. In addition the smart contracts allows the
implementation and mapping of agreements and stores the complete corporate structures
(Dannen, 2017). In this section, what are all the strength of smart contracts, how the
Implemtation is done are explained. In order to implement the programmable blockchain, the
following conditions are necessary:
The programming in the Blockchain: All the business agreements includes the terms and
conditions. The basic goal of smart contract is to include these conditions as a logical commands
through blockchain system.
The Reliable execution of the code: The implemented code must be work reliably on the
decentralized system. And also data should not be changed without the authorization by the
user.
The Automation of code execution: The fulfillment of all the terms and conditions of a
program is resolute in a digitally. It is the fundamental concept of smart contract.
The Consideration of external influences: The conditions in the program, which refers
circumstances that are linked to several digital systems. Therefore, the applicability of smart
contract is enable interface with other systems and also include the information from external
systems.
14
The Coordination of decentralized: The contracts are digitally signed. They are compatible
with the theory of blockchain. The testing of conditions and the execution of their logic must
function in the network of decentralized.
Speed: The software script is executed and implemented in the platform of blockchain, a fast
response time is required. This would be in conflict with the time consume for processing.
Non-manipulability: Once data and programs is entered into the blockchain system, which
cannot be able to manipulated or deleted. The unauthorized modification of the blockchain is
usually not possible.
Consistency: The programs in the blockchain is reliably stored, nevertheless of the time
between execution and implementation. The stored programs are available all time.
The conditions stated above is satisfying, the blockchain system is used to map the business
logic and agreements. The smart contract also offers different possibilities for participants in
the network:
The reduction in labor: The smart contract helps in real time monitoring, the enforcement of
agreements and the conclusion of agreements can be automated, this help in reducing the human
labor.
Avoiding third parties: The smart contract is a decentralized blockchain structure which
enables automated contract handling and therefore the supervisory from the third parties can be
eliminated.
Reduction in cost: By avoiding third parties and automating the process in turn helps in saving
the labor and time, this helps in transaction and processing cost can be reduced.
The security of the agreement: if the non-manipulability and reliability of a smart-contract
network is ensured, then the foundation to secure the agreements will be created. This includes
both their long-term feasibility over several decades and prevention of unexpected beach of
agreement by the participants.
The Ethereum platform with a Virtual Machine (Ethereum Virtual Machine, EVM) to run smart
contracts. Because the environment exist on the Blockchain in the form of virtual machine, the
smart contracts are completely outlying from the network, file system processes on node
machine. The complete language called Turing was created to write Smart contract on
Ethereum. Nevertheless, solidity programming language has now become standards with
capabilities of Smart contract. A contract is written in a solidity language, compiled into
Ethereum virtual machine byte code, and then deployed at a specific Ethereum address. A
special JavaScript RPC- library is used alongside of web API.3. Because the Smart contract
programming started with solidity and Ethereum, but it is still discipline under development.
The below Figure 5 provides a simplified view of how Ethereum will meets to these conditions.
The system of the blockchain is extended by a virtual machine, which can execute the program
code. This program code is stored in the blockchain using smart contracts and can be created
by the users of the network (Ethdocs, 2017a).
15
Figure 5: Elements of smart-contract technology (own representation)
According to (Dannen, 2017), the Ethereum can thus be understood as an extension of the
Bitcoin concept. Ethereum also has a digital currency like Bitcoin. The further extensions of
the blockchain concept by Ethereum, which are essential for the implementation of the
approach, are the subject of the further development of this chapter. It also explains in more
detail what smart contract are, how the virtual machine of Ethereum works, and how to achieve
the benefits of the concept mentioned in this section.
2.2.2.2 Creation of Smart contracts and dApps – platform specific
programming languages There are four different programming languages like Solidity, LLL, Serpent and Mutan are
available to create smart contracts. These languages specially developed for ethereum virtual
machine on existing languages. Solidity is a majorly used language since it is existing on
JavaScript (Ethdocs, 2017a). The smart contract script will be written from one of these
languages. And then compiler is designed to respective language. Compiler is used to compile
code in byte code. i.e. the EVM-readable commands.
Both processes described so far can be carried out offline and independently of the blockchain.
The created byte code can be communicated to the blockchain during a transaction in order to
initiate the mining of the smart-contract. For this, one of eight different ethereal client
applications is used (Ethdocs, 2017b). If the transaction is transferred to the network, its
contents, including the contained byte code, are checked. If the test is successful and there is
sufficient gas, it is linked to the blockchain by mining. From this point onwards, the smart-
contract is stored as an account in the blockchain and can be called up by means of transactions.
Since smart-contracts can communicate with each other by means of messages, it is possible to
form an application from several contracts and thus perform services similar in scope and
function to conventional computer programs. The blockchain can serve as a backend, which
performs the functions of the application. For this reason, applications implemented on the
blockchain are called dApps, i.e. decentralized apps. Both the results of the function execution
as well as the user input can be implemented thanks to an in Ethereum interface to external
surfaces such as e.g. Websites are offered (Dannen, 2017).
The data structure of the Ethereum blockchain is described in this section by two features. On
the one hand it is explained how data is stored within a block. On the other hand, the linking of
the blocks is displayed one below the other.
16
The structure of a block header of the Ethereum blockchain is analogous to that of a bitcoin
block. It includes features such as time stamp, block number, a reference to a previous block,
nonce, and difficulty. The main difference lies in the way data is stored. Bitcoin blocks contain
a hash tree, which contains all transactions of the block. By calling up all the transactions,
information such as the credit balance of an account can be calculated in the future. According
to (Buterin, 2014), Ethereum also includes such a tree, but adds two more to it. The resulting
Ethereum blockchain structure is shown in Figure 6.
Figure 6: Simplified block structure in Ethereum blockchain (own representation)
The event tree stores the results of all events triggered by the block's transactions. For example,
Changes in variables of a smart contract. The state tree stores the status quo of the blockchain
prevailing at the time of the block generation. This includes existing accounts as well as their
credit balances, data and, in the case of Smart Contracts, their scripts.
Thus, in the Ethereum blockchain, not only all transactions but also, contrary to the original
concept, states are stored. The advantage of this approach is the fast irretrievability of states
without the necessity of reconstructing the relevant transactions, which primarily benefits the
processing speed of inquiries with strong growth of the blockchain as well as the support of
thin clients without complete ledgers (Ethdocs, 2017a).
Solidity contracts are likely to process the ownership of the valuable tokens; execution of
contracts occurs on Blockchain, meaning that all the members can view it and access the source
code. The security guidelines that Solidity has been used are:
Damage control: To avoid damage, the limited amount of tokens should be stored in
Smart contract, because if the source code or compiler contains bug, the tokens will
struck in the contract.
Modularity: The Smart contract should be kept as simple as possible. The length of
functions and local variables should be limited, in order to keep the contracts as clear as
possible. If the contracts are more modular, it is easier to improve system of Smart
contract.
Checks-Effects: Firstly, the functions in the contracts should perform precondition
check. Secondly, changes to state variable should be made. Lastly, interaction with other
contracts should occur.
17
2.3 Supply Chain Management Supply chain management is one of the most vital aspects of directing business. Many people
outside the related community (in research and industry) do not comprehend to this because a
normal consumer only experiences its consequences (Martin, 2015). Earlier, there were times
when the item that the customer wanted was not available in their nearby store; sometimes the
consumers will get a great ’deal’ at the end of the season; sometimes there were sudden surge
in prices of commodities like gas due to shortages; also there were cases when the e-commerce
site promised availability but were unable to deliver the required product or delivered the
incorrect product and there have been incidences when a customised product was delayed to a
great extent. All the above-mentioned and a few other experiences which consumers have had
on a routine basis were direct consequences of supply chain principles on which the firms relied.
The term ‘Supply Chain Management’ was coined by Keith Oliver in 1982, Supply chain
management has evolved from formerly being understood as only logistics to an intricate
multifunctional business responsibility that ranges from purchasing and demand forecasting to
delivery and after-sales service (Martin, 2015). Supply chain management is all about dealing
with the supplier base, determining the outsourcing commodities and from which suppliers, and
managing relationships with those suppliers.
A supply chain is a set of articles that are involved in designing of products into semi-finished
and finished distributing them to end users (Tan, 2001). Supply chain management is the
process in an effective management of the process from end-to-end, starting from design of the
product or service till the time when it is sold, then consumed, and finally disposed by the end
user. This entire process comprises of product design, purchasing, planning and forecasting,
production, delivery, realisation, and post-sales support (Tan, 2001).
The issues faced by supply chain management can be classified into two broad categories –
configuration and coordination. Configuration-level issues are related to high-level designing
and rudimentary infrastructure of the supply chain. Coordination-level issues are related to the
tactical decisions and the day-to-day supply chain operations.
The issues like configuration and coordination are co-dependent. The issue configuration can
be regarded as a long-term strategic decisions. The issue like coordination can be regarded as
medium to short-term decisions. Generally, the organizations will develop strategies for
undertaking the configuration-level decisions and then apply constrains to the coordination
decisions.
2.4 Supply Chain Coordination
The theory of coordination is applied to this thesis to give a theoretical basis to consider how
organisation can together manage the business processes across the supply chain (Malone and
Crowston, 1994).The management of dependencies between activities is called coordination
((Malone and Crowston, 1994). The main purpose of coordination is to achieve collectively
objectives and goals but individuals will not meet. The main issue like information sharing will
affect the coordination capability (Anand and Mendelson, 1997).
Coordination mechanism creates a platform, so that every stakeholders in the supply chain
network together create value and improve performance of the supply chain (Lewis and
Talalayevski, 2004). Coordination mechanism can be achieved by sharing decision
responsibility, information sharing and synchronization of logistics (Lee, 2000). Sharing
decision responsibility and information will help every stakeholder in the supply chain network
which can organize their work and resources effectively. Synchronization of logistics refers to
18
organising the supply chain according to needs of the organisation: customer demand, inventory
management, production targets.
The two approaches like centralise decision making and decentralise decision making will
achieve the coordination. Firstly, centralise decision making applies to optimise the overall
network. Secondly, decentralise decision making applies to coordination mechanism (Sahin and
Robinson, 2002). Ideally centralise decision making necessitates the decision maker to have all
access of relevant information in the supply chain performance which isn’t the scenario in
reality (Li and Wang, 2007).But decentralisation thrives on local and asymmetric information
which improves the performance of individuals and its target, therefore having better advantage
than centralise decision making.
In order to achieve better performance, it is necessary to share responsibilities. This can be done
in two ways. Firstly, complementarity which rely on how supply chain stakeholders jointly
increase value. Secondly, coherency which rely supply chain stakeholders on common
understanding. The coordination may focus on organizational linkages, this is required to
reward or penalize decision maker to reach their common targets. The coordinating collective
learning means sharing knowledge and capabilities across the organisation (Simatupang et al.,
2002).
The main focus of this thesis is on the coordination of operational linkages in a supply chain
which deals with information sharing and synchronising logistics processes. The latter
coordination mode, synchronising logistics processes is also called asset flow coordination.
Coordinating information sharing among supply chain stakeholders aims to give relevant,
timely and accurate information available for decision makers without lack of transparency,
reliability and traceability.
The main challenges of coordination in supply chain are:
Transparency
Traceability
Time delay
2.4.1 Transparency Modern companies, organizations and enterprises tend to be operationally overly complex. The
complexity can be eliminated partially but not completely eliminated (Shalloway, Beaver et al.
2009). The cooperative work involves a lot of interactions with the many teams, which has a
lot of dependencies, a coordination is required to escalate the problems that arrives. (Loch and
Terwiesch 2005). The effective management in the organization having a lot of
interdependencies, which is coordination (Malone and Crowston 1993). The transparency in
information on asset is very much important, since every stakeholder in the organization uses
information to make better decisions (Davenport and Prusak 2000).
In automotive manufacturing business, the important information pertaining to operations
management are like production schedule, quality data, inspection data, cycle time, tact time,
lead time, maintenance schedule, variants of products, machinery involved in machining,
customer requirements in terms of tolerance, run at rate, etc. All this information is important,
but all of these are probably not necessary when interaction between some certain departments
is concerned. Moreover, at critical stations like quality inspection and logistics (production
scheduling) it is important to know the stakeholder involved as well, since decision making is
19
dependent on the designation of the personnel in the official hierarchy. An efficient information
disclosure strategy must be a stepwise built up, first, the type of information that needs to be
shared must be identified, then depending on how confidential, risky and how valuable the
information is, a befitting response must be made (Marshall et al. 2016). The hiding of specific
information in the organisation, which information privacy will plays major role in transparency
(Marshall et al. 2016)
2.4.2 Traceability Most of the researchers define traceability is the follow the asset movement through supply
chain as (Bosona and Gebresenbet, 2013). A system that has good traceability must allow both
tracking and tracing. The other definition of the tracking is the process by which asset is
monitored by keeping all documents and records at each and every stage (Kelepouris,
Pramatari, and Doukidis, 2007; Bosona and Gebresenbet, 2013; Pizzuti and Mirabelli, 2015).
Traceability can also be expressed by three basic characteristics of a system in which it exists:
1. unique identification of units, assets, products and batches,
2. information about the time and place, like when and where the units are transferred,
3. Linking of the units to their movements.
There are internal and external are the two different categories in the traceability (Moe, 1998;
Thakur and Donnelly, 2010). The Internal traceability is defined as the capability to visible and
track the assets within the organizations (Moe, 1998; Karlsen et al., 2010). The external
traceability defined as the capability to visible and track the assets between the organizations
(Moe, 1998; Karlsen et al., 2010). To enable quick and accurate tracing, traceability should be
able to address to both internal and external aspects with clear links in between them (Bertolini,
Bevilacqua, and Massini, 2006; Donnelly, Karlsen, and Dreyer, 2012; Hu, Zhang, Moga, and
Neculita, 2013).
As far as the current work is concerned, internal traceability is of importance. It is vital to
understand the fact that external traceability is a consequence of having a system which is
successful in internal traceability. This is basically due to each and every person is accountable
for collection and communication of the information, which is pertaining to their own processes
and the assets. This means that, a system with internal traceability acts as a prerequisite that
enables the way to external traceability (Senneset, Foras, and Fremme, 2007). Although, an
important disadvantage of traceability is that it does not lead to direct economic benefits, it
requires funding and initial investments (Donnelly and Olsen, 2012). The visibility of
information can also be used for the marketing departments in the organization, to visualize the
quality and safety standards of the assets (Liao, Chang, and Chang, 2011; Storoy, Thakur, and
Olsen, 2013). The advantages of traceability in the organisation is to improve the supply chain
performance and reduces the logistic cost by enable real time information of assets throughout
the supply chain (Regattieri, Gamberi, and Manzini, 2007; Hong et al., 2011; Karlsen, Dreyer,
Olsen, and Elvevoll, 2013).
The efficient traceability system means there should be clear connection between information
flow and asset flow (Bosona and Gebresenbet, 2013). Three main pillars of traceability are
identified:
1. Product identification: marking of asset/product/unit with a unique identification
number (Regattieri et al., 2007; Karlsen et al., 2010; Aung and Chang, 2014).
2. The data to trace: information required to be traced
3. Product routing: identifying and marking the material flow route (Folinas et al., 2006;
Regattieri et al., 2007).
20
2.4.3 Time delay According to Manos and Manikas real time decision are the best and also it will not disrupt the
quality of the decisions.
The real time of taking operational decisions are fast: most of the operational decisions are
repetitive, structural. Having a new software tool which analyses real-time data would make
automated decisions faster. Hence, saving time and increasing productivity by reducing the
non-value activity time.
The view are personal but the same operating picture: One of the disadvantages of ERP system
software is that they mostly have a common user interface and hence does not highlight the
information as per the requirements of the user. For a user to make faster decisions it is essential
to have quick access and a single window visibility to the critical information pertaining to his
work area. If the user must look up and invest time in extracting the required information, then
there is loss of productive time.
The decision management is the best: Decision-making systems are generally being
implemented using rule engines and analytic software tools. As companies nowadays are
aiming to rely more on real-time analytics, they are beginning to exercise Decision
Management, together with their Data Management as well as Business Process Management
activities.
2.5 Literature Framework
Figure 7: Framework for literature review (Own representation)
In this section a representation of the extensive literature review is presented and shown in
figure 7. Firstly literature review on information sharing is presented in order to understand the
different types of information sharing in the supply chain. This in turn helps in understanding
the importance of information sharing activities in the supply chain. Secondly this thesis mainly
focuses on the concept of Distributed ledger technology. In particular, the blockchain
technology literature review is presented this is done to understand the concept of blockchain
platform and block chain application (smart contract). This is helps to clarify the technology
features and the working mechanism and the potential applications.
Lastly, an overview on supply chain management is presented in order to get a basic
understanding of the concept. Since the thesis focuses on supply chain activities between the
departments. And the theory of supply chain coordination is presented which answers questions
like how coordination in information sharing will improve the supply chain performances in
the organization and how decentralized decision making will help in achieving the performance
of every individual in the organization. Also presented are the main challenges in supply chain
coordination which is transparency, traceability and time delay. This thesis mainly focuses on
solving these three challenges by the use of smart contract interface.
21
In the aim to answer research question how smart contract will bring asset transparency,
traceability and time-delays in the process of decision making in a business to business setting?
For this firstly, the extensive literature review on the theoretical concepts of smart contract is
done to understand the How smart contract is implemented and executed. This literature review
helps us how smart contract interface is created. Secondly, literature review on transparency,
traceability and time-delays is done to understand their importance.
22
3.0 Method This section presents method that was used to collect, process and utilize information required
to answer the research questions of the project. Firstly, research approach is presented
followed by how data is gathered and examined. In the last section, explains how the gathered
information is used to device a solution to resolve the problems mentioned earlier.
3.1 Research Approach To answer the research questions, a qualitative method will be used (Arvidsson, 2017) describes
how qualitative data is data that cannot be measured and counted, and is generally expressed in
words rather than numbers. Therefore a qualitative method is suitable for this study and has
therefore been used. The qualitative method is chosen because of the nature of the problem.
Figure 8 elaborates on the methodological approach adopted in this research and it identifies
the main steps that need to be taken in order to answer the research questions. To answer the
research questions, relevant literature was explored and explained in the previous chapter. Now
the fore coming chapter explains the approach adopted in this thesis towards answering the
research questions.
Figure 8: Research approach (own representation)
3.2 Research Method A pre-study was conducted to understand the current situation and identify the issues related to
information sharing activities between departments at Scania. The data was collected through
interviews. A lot of informal communication and meetings with executives at Scania along with
database searches to acquire relevant articles was performed.
This gathered information from the empirical interviews provided a framework on which the
smart contract interface is built. The empirical interviews revealed which are the important
information that need to be shared on the interface and also the challenges that they are facing
sharing of information between departments.
23
Based on the information received, a smart contract interface is developed that allows fast, fair
and easy access to information which is relevant to the stakeholders involved in the three
departments. This is done by using six vital steps that are used to develop a smart contract
interface. These six steps helps in creating a smart contract interface. The information flow and
sharing mechanism is explained by the use of sequence diagram. A sequence diagram is later
made to give a clear representation of the information flow and how it works. Lastly,
observations are made to check the conditions using smart contract interface. The observations
pave way for the solutions of the three research questions asked.
3.3 Data Gathering The data gathered for this study were obtained from interviews within the chosen departments
at Scania. The data was also gathered from secondary sources, which are presented in this
section.
3.3.1 Literature Review The literature review was performed to give a profound understanding and knowledge within
the area of research. Firstly, literature review was done to get a basic overview on supply chain
management, information sharing system. Secondly, based on the information gathered from
primary sources, literature review was done on the identified issues like transparency,
traceability and time delay. Lastly, since the main objective of this research was to see the
potential of Smart contracts, the literature relevant to this technology was also explored. The
resources used were: wide-ranging searches in credible data bases like Google scholar and
KTHB primo. Additionally, information was also gathered from internal company websites and
related articles.
3.3.2 Interviews The primary source of information relevant to the business setting in this thesis are the formal
interviews. Interviews were conducted in the departments of Assembly, Machining and
Logistic. This was done to understand and gather the current asset information flow and supply
chain operations between departments. A questionnaire was drafted to record responses which
are consistent to a given set of questions. Following this approach allowed insights into what is
important for one department or a personnel and what is not. The interviews were based on the
literature review. Later, interviews were conducted with the employees in selected departments
at Scania with matching knowledge and recommended profiles.
Interview A- Assembly department
Employee working as a System Analyst
Interview B-Machining department
Employee working as a production planner
Interview C-Logistic Department
Employee working as a Logistic developer
Interviews were conducted in a semi - structured approach, which were conducted whenever
the topic and information deemed essential in the thesis. To be able to get the most out of the
information from the interviews, the questions were sent in advance to the interviewees. This
was done mainly due to prepare them and bring related material to meeting. To make it more
24
efficient, interviews were recorded to make sure that gathered information is secured. Answers
from each interview can be found in Appendix 1.
3.4 Steps to create smart contract Interface
Figure 9: Steps for developing smart contract interface (own representation)
25
3.5 Research Ethics The research is conducted in the automotive company Scania. Through this research I fully
compiled with the research ethics. The research is followed by the four ethical codes presented
by Swedish research council. The four principles like information, consent, good use and
confidentiality is serve as ethical guidelines for research (Vetenskapsrådet, 2002). Firstly,
information was full filled. Before every interview I elaborated the purpose, methodological
approach to participants. The sharing of this information I ensured that participants felt
comfortable being part of this research study. Secondly code consent was full filled as no
participants in the interview was any way forced to participate in the research. Thirdly code
good use was full filled as the data collected in this study will not be used for any other purpose
of the research. Lastly, confidentiality code was full filled by recorded information from the
interview is deleted. The shared information is considered as confidential and that it would be
treated fully anonymous in the master thesis report.
26
4.0 Problem Description In this chapter, the business setting on which the project work has been done is explained. To
highlight the changes that the smart contract interface has brought to the setting have also been
elaborated. The business setting before and after the implementation of the smart contract
interface have been elaborated and compared. Moreover, special emphasise is given to the
shortcomings in the existing system that are tackled by the smart contract interface.
Figure 10: Asset flow and Information flow between departments
Figure 10 shows the existing operational working of the three departments considered in this
project. The flow of material and information from one department to the other is represented
by the arrows. Firstly, as per the production target and lead time to receive the material delivery,
the assembly department issues an order to the machining department to supply material for
assembly considering the lead time and the delivery schedule. A copy of the same order is also
sent to logistics department, as a notification to plan for material movement and storage to
ensure smooth functioning overall. The order is identified by an order number and contains
information relevant to the production batch that is to be manufactured like product type,
quantity, delivery deadline and product quality (technical specifications). Once order is
received in machining department, the received order is notified to all the sections in the
machining department via ERP. This order contains same details as the original order but with
additional criteria for raw material quality (from the supplier). As per the received order, the
raw material section then delivers material to production section. This material is then
processed, machined and manufactured in way such that it is ready to be assembled in the final
product at the assembly line. During the production of the batch the material is also stored
internally as WIP (work in progress or machined parts). When the entire batch is ready to be
supplied to the assembly department the for the final product assembly, the logistic department
is informed by the machining department and then the logistics department takes over the
responsibility of storing the ready to assemble material in warehouse and deliver to the
assembly department as per the production plan. The information is conveyed to logistics
department by machining via email (Interview A, B and C).
27
The above-mentioned system has a few shortcomings which were identified during the
empirical interviews (Interviews A, B and C) with the officials who are working in the above-
mentioned departments. These shortcomings are:
1. Manual updating of material status amongst the departments and sections which causes
time delays, miscommunications among departments and sometimes there is loss of
important information as well.
2. Poor quality raw material input to the production section due to unclear quality
requirement definition.
3. Difficult to track and trace the asset flow for a product since there is no interface that
stores the information in an organized way. Therefore, it is almost impossible to track
the origin of a failure or discrepancy.
4. Problem with verification of information that is available, like – what is the information
source? Who exactly updates the information and how does it reflect the real time status
of the product during operations? Moreover, the quality of information that is available
plays a main role in driving the decision-making process.
5. The conditions like raw material quality limit and product quality limit should be
specified from the customer(Assembly department)
6. There is no provision for real time data validation in the current setting.
7. There is no provision of in-process control – like traceability of in process quality
inspection results.
4.1 Implementation Firstly, essential data on asset that are required by the each sections in the departments are
mapped and shown in Figure 11. The set conditions like information of the asset should be
entered from the specified owner address of the departments. The information of raw material
quality limit and asset quality limit should be entered by the specified limit by the customer
(assembly department). Once information of the asset is entered by each section in the
departments, every other sections in the departments gets notified. These conditions and data
in the each section is written in the smart contract code as shown in Appendix 2.Thirldy, deploy
smart contract code in the Ethereum virtual machine (EVM). Lastly, execute the smart contract
code by clicking manual option.
Figure 11: Data for creating smart contract interface (own representation)
The Smart contract is created in which all the conditions necessary for structured and traceable
flow of material are incorporated. These conditions allow creation of new blocks in the
Blockchain and controls their connection to the existing blocks. How the conditions specified
in the Smart contract control the blocks is explained later in this section. In Figure 12, the
generation, creation and connection of blocks in a Blockchain is explained. All the nodes in the
Blockchain represent all the sections along with their departments. This connection of nodes
forms a network and all the information is stored in each node. This is called distributed ledger.
28
Figure 12: Generation of new blocks and connection of blocks in represented in Sequence Diagram (Own
representation)
The initial block in the Blockchain is called as the Genesis block which is represented by B0.
A new block B1 is created when the order is generated by the assembly department. B1 is
generated if and only if the smart contract requirements are fulfilled by the user while generating
the order. The required input conditions that the user must input to successfully create a block
are shown in Figure 13 for all the blocks (see block 1 for B1).
Figure 13: Input conditions for generating Block (Own representation)
Creation of B1 is notified to all the departments (nodes) of the Blockchain. When B1 is received
by the raw material department then the raw materials section supplies material to the
production section. This raw material is received by an outside supplier by the raw materials
Rawmaterial Section
Production Section
WIP Section
Warehouse & Logistic Section
CustomerPlace order
Section
B2
B1
B3
B4
B5
B0 + B1 + B2 + B3
B0 + B1 + B2
B0 + B1 + B2 + B3 + B4 + B5
B0 + B1 + B2 + B3 + B4
B0
Assembly Department
Logistic Department
Machining Department
Send Transaction
Send Transaction
Send Transaction
Send Transaction
Send Transaction
Query
Query
Query
Query
Query
Query
Query
Query
Query
Query
Query
Query
29
section. After the successful delivery of material from raw materials section to production
section the raw materials section takes up the responsibility to send a transaction to the next
department (node) containing the information pertaining to the delivery of the material. If this
transaction contains correct and authenticate information, it will lead to generation of another
block B2 which is then added to the existing Blockchain which consists of B0+B1. But, before
adding the block B2 to the existing Blockchain a set of queries is generated, these queries check
whether the information in the transaction sent by the department is coming from a previously
specified authenticate source or not. The queries will also check if the block contains all the
required information as per specifications in the Smart contract. Once, these conditions are
satisfied then and only then will the new block B2 be added to the existing Blockchain. Once
the block gets added, the Blockchain becomes B0+B1+B2 and the successful creation of new
block (B2) is notified to all the nodes. This process is repeated by the subsequent nodes to create
add B3 and B4 to the Blockchain. The nodes responsible for creation of B3 and B4 are
production section and WIP section respectively. Eventually, when the material is delivered to
the customer (assembly department, also the last node in the Blockchain network). Then the
last transaction is sent, which after satisfying all the queries, results in creation of block B5.
Likewise, if every condition is satisfied by all the departments in the process the final
Blockchain pertaining to a given order would be like B0 + B1 + B2 + B3 + B4 + B5.
4.2 Result from the smart contract interface
4.2.1 Observation on transparency This section explains how transparency is achieved for the test case considered in section 4.0.
Here in Figure 14, Block 1 has three conditions which need to be satisfied in order for the
information to flow for Block 2. Since the three conditions are satisfied, highlighted in green,
the information from Block1 is cleared to Block 2. Similarly, in Block 2 there are two conditions
that need to be satisfied in order for the information to flow to Block 3. But one of the
conditions is not satisfied, hence the information is rejected from Block 2. The Blockchain
thereby gives a clear understanding about the conditions necessary to transfer information from
one Block to another thereby making the whole process transparent.
Figure 14: Input conditions for generating Block (Own representation)
If both the conditions in Block 2 are satisfied the information flows to Block 3 as shown in
Figure 15. In block 3 there are two conditions which need to be satisfied. Upon failure of
satisfying either one of the conditions the information is rejected from Block 3.
Figure 15: Input conditions for generating Block (Own representation)
30
Figure 16 shows that in Block 5 the condition is satisfied, hence the information is rejected.
Figure 16: Input conditions for generating Block (Own representation)
Figure 17 shows all mandatory conditions are satisfied thereby accepted the final information
flow. This whole process makes the information flow transparent.
Figure 17: Input conditions for generating Block (Own representation)
4.2.2 Observation on traceability This section explains how traceability is achieved by considering an example which is taken
from the test case. There are different suppliers S1, S2, S3, S4, S5, and S6 in the raw material
section, machines in the production section are M1, M2 and M3, storage locations in the WIP
section are SL1, SL2, SL3 and SL4, logistics in the warehouse and logistic section are L1, L2
and L3. Before implementation of smart contract, if there is a faulty product found in the
assembly department, it is difficult trace back where it happened, who did it, which end fault
had happened(interview A,B and C). This as shown in Figure 18.
Figure 18: Traceability of asset before implementation of smart contract (Own representation)
31
After implementation of smart contract, it is easy to trace back the asset. Real time visibility of
asset will help in identifying which end the fault happened. This has shown in Figure 19
Figure 19: Traceability of asset after implementation of smart contract (Own representation)
4.2.3 Observation on time delay This section explains how better decision making and planning with help of smart contact is
achieved. For tracing real time decisions it is necessary to modify conditions with the help of a
smart contract interface that track asset on a real-time basis and provide information to make
real-time decisions and planning. This process can be done in a faster and more efficient way
as the software provides the user with ease of modification in the conditions that derive the real-
time decisions. Moreover, the change in conditions is to be notified across the management
hierarchy to allow quick request approvals and instant implementation of the changed
conditions. Smart contract interface allows this provision in a very easy way.
The major condition in this smart interface are:
Raw material quality limit
Product quality limit
Owner address
For instance when order is placed by the assembly department. It contains the details of quality
limits of the product and raw material and owner address. The changing in conditions will be
notified to all the departments. Below Figure 20 shows how notification is appear in the
departments
32
Figure 20: Notification in the smart contract interface
To prevent real-time mistakes and to maintain the quality of the assets in manufacturing
business, if any automated or user defined decision leads to degradation in quality then the
software should be able to highlight that in the notification. This would not only prevent the
quality of the product from going bad but will also allow better decision making.
4.3 After Implementation of smart contract
Figure 21: Asset flow and information flow through smart contract between departments (Own representation)
A Smart contract interface is made and implemented. The flow of information in a Blockchain
is represented in Figure 21. Smart contract interface is made in which all the conditions are
incorporated for information sharing and controlling of asset flow amongst the departments and
sections (tracking and traceability, allowing material from a specified source to a specified
destination). As the order is generated by the assembly and sent to the machining department,
a notification triggered by the order is sent to all the involved departments and sections (like
logistics, production, storage and warehouse). The material is allowed to flow from one
section/department to the next if and only if the conditions in the smart contract are satisfied
like quantity, quality and delivery time, etc. As soon as the material is transferred from one
section to another, a notification is generated and circulated across all the involved sections and
departments (transparency, tracking and traceability in real time) – as shown in the interface.
Relevant information is made available to the concerned departments to fasten the process of
decision making.
33
5.0 Discussion This current structure of the interface results in addressing of the problems of transparency and
traceability. The blocks contain information pertaining to node by which the block was
generated. Once all the blocks for all the nodes are connected and the Blockchain is complete
then the information is available to every node and is accessible to people with authority. This
helps in accessing the required information quickly which leads to reduction of delays in
decision making.
How are Smart contract used to bring transparency across departments in a business to
business setting? Smart contract can improve transparency by recording the origin of the goods. When the
information such as the production date, quality limits, quantity and the origin of a product is
stored in the Blockchain it can be easily verified anytime. This assures every involved
department stakeholder that the raw material is coming from a trustworthy source and is
following a pre-defined production plan, which is highly essential in a business setting. Every
involved department stakeholder can have more assurance that are working on a legitimate
product. The transparency in information on asset is very much important, since every
stakeholder in the organization uses information to make better decisions (Davenport and
Prusak 2000). This recommendation should be considered, since the transparency in the
information will help in better decision making.
The information that needs to be shared must be identified, then depending on how confidential,
risky and how valuable the information is, a befitting response must be made (Marshall et al.
2016). Creation and sorting of a digital identification on the Blockchain by smart contracts
helps with transparent attestation across the entire network of departments while keeping the
information discrete from outsiders at the same time. Departments and their sections are now
able to easily verify that other sections have the required certifications to perform their duties.
Reputation and reliability of the raw material provider is recorded and managed on the
Blockchain. This allows the managers to take informed decisions while choosing a supplier for
a new part and it also motivates the involved departments to work hard to maintain a good track
record.
The important benefit of having a Blockchain is that "Blockchain ledgers establish a shared,
secure record of supply chain information flows - a single version of the truth across networks
for supply chain transactions, processes, and partners”. Apart from the information related to
the product, transportation and accounting (e.g. purchase order, receipt, and shipment
notification) is stored on the Blockchain and is accessible to relevant parties. This accessibility
and openness of the information helps in ensuring that all parties are on the same page.
Moreover, it also reduces the chances of conflict amongst the involved parties. Even if any
disputes arise, then they can be resolved quickly since there is a common database for reference.
The privacy of information is important in the supply chain (Marshall et al. 2016). The digital
identity in the smart contract will reduce concerns about information privacy. The every
stakeholder in the network has a digital identity that is given permission to access specific
information. Then the information is regulated by a smart contract. This creates a more trusted
network for sharing information.
As mentioned in the problematization, if the information pertaining to an asset like when and
where it was manufactured, which departments as well as the officials were involved at that
time, etc., then it should be shared as well, so that who so ever wants to access that information
can access it without any hassle. Right now, there is manual updating of material status amongst
34
the departments and sections, the information is shared in a specific manner with other
departments but is not available to everyone. This lack of availability of information among
departments and sometimes there is loss of important information as well. Thus, an open smart
contract interface is created for information sharing, where the information is decentralized so
that everyone who is authorized to get the information can access it anytime.
How are Smart contract used to bring traceability across departments in a business to
business setting?
Smart contract improve traceability within the departments by tracking the inventory at every
step throughout the production process, which starts at raw material source and ends at the end-
user (in this case, assembly department). This objective of traceability can be accomplished by
assigning identification numbers to the assets like serial numbers, radio frequency identification
(RFID) tags, or smart sensors. The latter way of identification is mostly promising here,
particularly due to the rapid growth of loT and connected devices. Smart sensors have the
potential of providing ample of data such as location, surrounding conditions and even product
quality details (like quality inspection stats). All this collected information when stored against
an identification number can be used for real-time updates on asset status. For efficient
traceability, marking of asset with a unique identification number (Regattieri et al., 2007;
Karlsen et al., 2010; Aung and Chang, 2014). This recommendation should be considered for
the efficient traceability. The information is helpful to the department managers who will be
able to make better and quicker decisions.
The result of traceability in this thesis shows that how smart contract helps in asset routing
when the fault asset found. The ability of tracing the chain of custody of any asset’s inventory
throughout the various departments becomes particularly helpful when asset is being recalled
for rework due to quality or safety concerns. Earlier, it was difficult to track and trace the
material flow for a product since there was no interface which stored the information in an
organized way. Now, the information is stored in a structured way and covers the entire domain
of material flow. This would specifically help in narrowing down to the origin of a quality flaws
in the system. For effective traceability, asset routing is very much important which is
identifying and marking the material flow route (Folinas et al., 2006; Regattieri et al., 2007).
How are smart contract used to share asset information that improves the decision making
and planning procedure across departments in a business to business setting?
Use of smart contracts enhances the efficiency and hence reduces the time delay in two aspects:
decision making and planning. The efficiency of decision making gets improved since the smart
contracts are executed on a distributed ledger which help in simplifying complex multi-party
systems that are present in typical business to business setting. Given the self- executing nature
of smart contracts, they can be used to automatically execute the "contractual rights and
obligations, including the terms for transaction of assets and information" .This would eliminate
the cumbersome paperwork that is generally required and reduces time wastage. The decision
making is improved by programming the contracts in such a way that it is executed only when
a given milestones are fulfilled, parties can now trust each other more and not have to worry
about unfulfilled obligations. Thus, allowing quicker and better decision making.
The other way time delay is reduced is through improved planning. A better plan is in close
relation to a better and faster decision-making process. This is a result of relying on a trust-
worthy computer code which can be customized to perform contract agreements, which
prevents the creation and approval of numerous physical documents, which are then supposed
to be maintained by each department and supplier (if involved). Moreover, the use of smart
contract interface also helps in lowering the costs and the amount of manual effort that is
35
required. Furthermore, to have a database where identity and reputation is easily verifiable
results in saving of costs associated with conducting certification checks and building new
trusted business relationships. According to Manos and Manikas argued that the real time of
taking operational decisions are fast: most of the operational decisions are repetitive, structural.
Having a new software tool which analyses real-time data would make automated decisions
faster (Manos and Manikas, 2010).
In Blockchain technology, the information is available to each and every stakeholder which
means that every stakeholder in the network can easily track asset in the supply chain. With the
blockchain being decentralized, the information is stored in a decentralized way which means
everyone in the network have a copy of information. Once the information is stored in the
blockchain which cannot be changed or altered. If there is any hacking of information, everyone
in the network will get a notification so that everyone can take their individual decisions to
avoid hacking. According to Sahin and Robinson (2002), decentralise decision making helps in
better coordination.
One strong argument in this thesis is Smart contract will allow complete surveillance awareness
of situation by using continuous intelligence: continuous (monitoring) systems record all the
information and events. These systems make it easier to detect a threat (in terms of poor quality
and low productivity). Moreover, they notify the stakeholder and other systems about the
altering situation, allowing them to tackle and avoid the threats in a proactive manner.
As pointed out by other research works in the area, Smart contracts are capable of building on
the progress already achieved by Electronic Data Interchange (EDI) software via more efficient
and real-time status tracking. Smart contracts have made business to business transactions more
transparent and trusted, along with the secure recording of product specifications and making
them accessible to all involved departments.
36
6.0 Conclusion The Potential of using Smart Contract in business to business setting was analysed to resolve
few perennial problems related to the supply chain. The supply chain management in a well-
established organization was studied which gave an idea how asset and information was shared.
The motive of this exercise was to check ways to identify flaws and improve the existing
system. The three main challenges in the supply chain coordination are transparency,
traceability and time delays which were tried to be resolved in this thesis. The thesis work shows
how Blockchain technology works on the concept of decentralized system which is beneficial
to eliminate the need for central authority which in retrospect eliminate issues of transparency,
traceability and time delay. A smart contract system was established in a small scale which
involved selected departments in an organization. Methodology to set up a smart contract
interface in a business to business setting is investigated in this thesis which can be broken into
six principle steps. Upon implementation an observation study has been done in order to show
how transparency, traceability and time delay in decision making is achieved by using smart
contract interface. The challenges pertaining to lack of transparency, traceability and significant
time-delays while in the process of decision making were resolved by using the smart contract.
The Blockchain gives a clear understanding about the conditions necessary to transfer
information from one Block to another thereby making the whole process transparent. The
Blockchain enables ease to trace back the asset therefore making it traceable. By the use of the
in-built feature of Blockchain to give instant notifications of rejections in material time delays
were reduced.
The use of smart contracts which allows self-executing contractual agreements deployed on the
blockchain can help to increase transparency, traceability and efficiency across a supply chain.
They can be used to provide transparent credentialing and reputation management, track the
flow of assets through a supply chain, and automatically execute the logistic activities. This
will lead to create trust among partners and reduces time and cost inefficiencies associated with
verification checks. It also speeds up the supply chain and absolutely makes it more agile in
managing risks and disruptions, since real-time data can be used to guide decision-making.
The thesis work at Scania throws light on how Blockchain technology, which works on the
concept of decentralized system, is beneficial to eliminate the need for central authority. The
thesis shows the benefits of direct interactions between departments. This benefit is achieved
by creating a tamper-proof process for creating and storing data. The thesis describes how the
block-based system in congruence with a smart contract approach with a freely programmable
and decentralized virtual machine allows the execution of individual program codes within the
Blockchain. This combination of two technologies creates a decentralized system, which
executes program scripts in a tamper-proof manner, stores data in a change-resistant and
verifiable manner. This creates the basis for the fraud-proof interaction of unknown individuals,
secure and independent data storage and reliable automation processes without the presence of
an administrative organization. The developed smart contract interface in conjunction with the
Blockchain use cases in data exchange to examine the advantages of Blockchain and smart-
contract technologies.
The coordination theory states that the management of dependencies between activities helps
to achieve collectively objectives and goals. This thesis emphasis the use of smart contract in
conjunction with Blockchain technology to achieve the conditions set by the coordination
theory. Currently, there are critical challenges which exist in maintaining coordination within
the departments. With so many stakeholders involved, the asset flow becomes complex and
37
thereby leads to inadequate sharing of information. Without an efficient method to keep track
of data in real-time, the data exchange is ill equipped to manage risk and respond to disruptions
quickly. In this thesis smart contract interface helps particularly in improving the transparency,
traceability and reduces time delay in decision making and planning across the departments.
Due to the readily available detailed description of asset from its origin in the block, a
transparent system was brought in order. Along with it since information can be back tracked
data traceability became relatively easy. The efficiency of decision making is improved since
the smart contract are executed on a distributed ledger which help in simplifying complex multi-
party systems that are present in typical business to business setting. Due to customized
computer code to perform contract agreements, which prevented the creation and approval of
numerous physical documents, the time delay was significantly reduced. This can be attributed
to efficient planning while setting up the smart contract. By mitigating the lack of transparency,
traceability and time delay due to the usage of smart contract and Blockchain technology the
objectives of coordination theory, depending on decentralization to achieve goals, are met.
Since Blockchain technology is still young, much of the anticipated benefits provided by the
technology will take a difficult path to achieve as the number of departments included in the
Blockchain increases along with their transactions. The huge hype around the Blockchain
technology can lead to misunderstandings and misconceptions on the real benefits and also
potential use-cases. However, Blockchain is not the solution for all sorts of problems in supply
chain. This research shows that some use-cases might have a positive outcome in terms of
process optimization. However, to assess the real advantage the benefits have to be compared
with the costs of Blockchain implementation.
The sustainability gains in the form of better human rights, fair work practises and reducing
environmental impact. In this thesis argues that smart contract interface provides a transparency
and traceability of supply chain. This will help to ensure asset safety, efficient recalls and the
elimination of counterfeits. In case of human rights and fair work, a clear history of transaction
of asset will help customer (assembly department) to be assure that assets are coming from the
specified sources. This have been recognized as being ethically sound. In case of environmental
impact, there is lot more work to be done. But in this thesis one of the scope of smart contract
interface is to assure raw material asset quality in real time, in turn helps reducing recalls and
rework, this will helps in resource savings. With the new technology, avoiding intermediaries
may lead to massive layoffs in the future. Since smart contract technology pushing development
forward in the supply chain and organization should take responsibility and find a new areas to
work.
38
7.0 References Abdinnour-Helm, S., Lengnick-Hall, M. L., and Lengnick-Hall, C. a. (2003). Pre-
implementation attitudes and organizational readiness for implementing an Enterprise Resource
Planning system. European Journal of Operational Research, 146(2), p. 260.
Akerlof, G. A. (1970). Market for lemons - quality uncertainty and market mechanism.
Quarterly Journal of Economics, 84(3), pp. 488-500.
Aung, M. M., and Chang, Y. S. (2014). Traceability in a food supply chain: Safety and quality
perspectives. Food Control, 39, pp 172-184.
Anand, K.S., Mendelson, H. (1997), “Information and organization for horizontal multimarket
coordination”, Management Science, 43, Iss. 12, pp 1609-1627.
Brenig, C., Schwarz, J., and Rückeshäuser, N. (2016). Value of decentralized consensus
systems–evaluation framework.
Buterin, V. (2014). A next-generation smart contract and decentralized application platform.
white paper.
Blomqvist, P and Hallin, A.(2015). Method for engineering students, 1st edition. Lund:
Studentlitteratur AB
Bausch, C. (2004). Lean Product Development: Making Waste Transparent. Canbridge,
Massachusetts Institute of Technology and Technical University of Munich: 140.
Bosona, T., and Gebresenbet, G. (2013). Food traceability as an integral part of logistics
management in food and agricultural supply chain. Food Control, 33(1), pp 32-48.
Bertolini, M., Bevilacqua, M., and Massini, R. (2006). FMECA approach to product traceability
in the food industry. Food Control, 17(2), pp 137-145.
Carter, C.R. (2000), “Ethical issues in international buyer supplier relationships: a dyadic
examination”, Journal of Operations Management, 18(2), pp. 191-208.
Collis, J. and Hussey, R. (2014). Business research – a practical guide for undergraduate and
postgraduate students. 4th ed. Hampshire: Palgrave Macmillan.
Chuen, D. L. (2015). Handbook of Digital Currency. San Diego: Academic Press. ISBN: 978-
0-12-802117-0.
Coy P, Kharif O, This is your company on Blockchain. Available online at: http://www.
bloomberg.com/news/articles/2016-08-25/this-is-your-company-on-Blockchain [Accessed
Mar 2018]
Dannen, C. (2017). Introducing Ethereum and Solidity. Berkeley: Available online at:
https://doi.org/10.1007/978-1-4842-2535-6 [Accessed Mar 2018]
Donnelly, K. A. M., and Olsen, P. (2012). Catch to landing traceability and the effects of
implementation - A case study from the Norwegian white fish sector. Food Control, 27(1), pp
228-233.
Donnelly, K. A. M., Karlsen, K. M., and Dreyer, B. (2012). A simulated recall study in five
major food sectors. British Food Journal, 54(6-7), pp 1016-1031.
Dando, N., and Swift, T. (2003). Transparency and assurance: Minding the credibility gap.
Journal of Business Ethics, 44(2), pp 195-200.
Doorey, D. J. (2011). The Transparent Supply Chain: from Resistance to Implementation at
Nike and Levi-Strauss. Journal of Business Ethics, 103(4), pp 587-603.
39
Disclosure in Ethical Consumption. Journal of Theoretical and Applied Electronic Commerce
Research, 9(2), pp 1-16.
Davenport, T. H. and L. Prusak (2000). Working knowledge: how organizations manage what
they know. Boston, Mass., Harvard Business School Press.
Erik Vesterlund. (2018). Seminar in Smart Contract. The BLOXPO event. Stockholm.
Ethdocs. (2017a). What is Ethereum? from Available at:
http://www.ethdocs.org/en/latest/introduction/what-is-ethereum.html [Accessed Dec 2017]
Ethdocs. (2017b). Choosing a client. Retrieved December 15, 2017, from
http://ethdocs.org/en/latest/ethereum-clients/choosing-a-client.html
Fritz, M. M. C., Schöggl, J.-P., and Baumgartner, R. J. (2017). Selected sustainability aspects
for supply chain data exchange: Towards a supply chain-wide sustainability assessment.
Journal of Cleaner Production, 141, pp. 587-607.
Froystad, P., and Holm, J. (2016). Blockchain: powering the internet of value. EVRY Labs.
Folinas, D., Manikas, I., and Manos, B. (2006). Traceability data management for food chains.
British Food Journal, 108(8), pp 622-633.
Giddens, L., Goutas, L., Leidner, D., and Sutanto, J. (2016). Engaging Consumers in Ethical
Consumption: The Effect of Real-time Environmental Information on Eco-friendly Consumer
Choice. 2016 49th Hawaii International Conference on System Sciences, Los Alamitos.
Graham C. Stevens, Mark Johnson. (2016). "Integrating the Supply Chain … 25 years on",
International Journal of Physical Distribution and Logistics Management, 46(1), pp.19-42.
Available at: https://doi.org/10.1108/IJPDLM-07-2015-0175 [Accessed Feb 2018]
Goel, S. (2016). Blockchain: The next big thing in technology? - The Economic Times.
Retrieved April 16, 2018, from https://economictimes.indiatimes.com/small-biz/security-
tech/technology/blockchain-the-next-big-thing-in-technology/articleshow/54375401.cms
[Accessed Feb 2018]
Hart, O., and Moore, J. (2008). Contracts as reference points. The Quarterly Journal of
Economics, 123(1), 1-48.
Hood, C. (2001). Encyclopedia of democratic thought. J. Foweraker and P. B. Clarke. London,
Routledge: XVI, 748 s.
Heald, D. (2006). Varieties of Transparency. Transparency: the key to better governance. C.
Hood and D. Heald. Oxford, Oxford University Press: XIII, 231 s.
Hu, J. Y., Zhang, X., Moga, L. M., and Neculita, M. (2013). Modeling and implementation of
the vegetable supply chain traceability system. Food Control, 30(1), pp 341-353.
Hong, I. H., Dang, J. F., Tsai, Y. H., Liu, C. S., Lee, W. T., Wang, M. L., and Chen, P. C.
(2011). An RFID application in the food supply chain: A case study of convenience stores in
Taiwan. Journal of Food Engineering, 106(2), pp 119-126.
Interviewee A (Assembly Department). Employee at Scania. Interview 20th of February 2018.
Interviewee B (Machining Department). Employee at Scania. Interview 24th of February 2018.
Interviewee C (Logistic Department). Employee at Scania. Interview 10th of March 2018.
João Dias Ferreira. (2018). Workshop on smart factory and operations management. Scania,
Södertälje.
40
Justyna Trojanowska, Adam Kolinski, Dariusz Galusik, Maria L.R. Varela and Jose Machado.
(2018). A Methodology of Improvement of Manufacturing Productivity Through Increasing
Operational Efficiency of the Production Process. Springer International Publishing AG
Jay Lee, Behrad Bagheri and Hung-An Kao. (2014). A Cyber-Physical Systems architecture for
Industry 4.0-based manufacturing systems. Available online at: www.sciencedirect.com
[Accessed Feb 2018]
Karlsen, K. M., Dreyer, B., Olsen, P., and Elvevoll, E. O. (2013). Literature review: Does a
common theoretical framework to implement food traceability exist? Food Control, 32(2), pp
409-417.
Karlsen, K. M., Olsen, P., and Donnelly, K. A. M. (2010). Implementing traceability: practical
challenges at a mineral water bottling plant. British Food Journal, 112(2-3), pp 187-197.
King S. and Nadal S. (2012). “Ppcoin: Peer-to-peer crypto-currency with proof-of- stake”. Self-
published paper.
Kelepouris, T., Pramatari, K., and Doukidis, G. (2007). RFID-enabled traceability in the food
supply chain. Industrial Management and Data Systems, 107(1-2), pp183-200.
Karlsen, K. M., Olsen, P., and Donnelly, K. A. M. (2010). Implementing traceability: practical
challenges at a mineral water bottling plant. British Food Journal, 112(2-3), pp 187-197.
Karlsen, K. M., Dreyer, B., Olsen, P., and Elvevoll, E. O. (2013). Literature review: Does a
common theoretical framework to implement food traceability exist? Food Control, 32(2), pp
409-417.
Lasi, P. Fettke, H.-G. Kemper, T. Feld, and M. Hoffmann. (2014). “Industry 4.0”, Business and
Information Systems Engineering, 6(4), pp. 239-242.
Lee, H. L. and Tang, C. S.(2000). The Value of information sharing in a two-level supply chain.
Management Science, 146(5), pp. 626-643.
Loch, C. H. and C. Terwiesch (2005). "Rush and Be Wrong or Wait and Be Late? A Model of
Information in Collaborative Processes." Production and Operations Management, 14(3), pp
331-343.
Liao, P. A., Chang, H. H., and Chang, C. Y. (2011). Why is the food traceability system
unsuccessful in Taiwan? Empirical evidence from a national survey of fruit and vegetable
farmers. Food Policy, 36(5), pp 686-693.
Lewis I., Talalayevsky, A. (2004), “Improving the interorganisational supply through
optimization of information flows”, The Journal of Enterprise Information Management, 17,
Iss. 3, pp 229-237.
Lee, H.L. (2000), “Creating value through supply chain integration”, Supply Chain
Management Review, 4, Iss. 4, pp. 30-36.
Li, X., Wang, Q. (2007), “Coordination mechanisms of supply chain systems”, European
Journal of Operational Research, 179, Iss. 1, pp. 1-16.
Meuwissen, M.P.M., Velthuis, A.G.J., Hogeveen, H., Huirne, R.B.M., 2003. Traceability and
Certification in Meat Supply Chains, Journal of Agribusiness 21(2), pp. 167-181.
Maitri Thakur (2010), "Operational techniques for implementing traceability in bulk product
supply chains". Available online at: http://lib.dr.iastate.edu/etd/11527 [Accessed Feb 2018]
Mishra, D. P., Heide, J. B., and Cort, S. G. (1998). Information asymmetry and levels of agency
relationships. Journal of Marketing Research, 35(3), pp. 277-295.
41
Martin Christopher. (2015). Logistic and supply chain management. Fifth edition.
Morabito, V. (2017). Business Innovation through Blockchain. Available online at:
https://doi.org/10.1007/978-3-319-48478-5 [Accessed Mar 2018]
Mattila, J. (2016). The Blockchain phenomenon - Tech. rep.BRIEWorkingPaper 2016-1, UC
Berkeley.
Malone, T. W. and K. Crowston (1993). The Interdisciplinary Study of Coordination, MIT
Center for Coordination Science.
Marshall, D., McCarthy, L., McGrath, P., and Harrigan, F. (2016). What's Your Strategy for
Supply Chain Disclosure? Mit Sloan Management Review, 57(2), pp 37.
Moe, T. (1998). Perspectives on traceability in food manufacture. Trends in Food Science and
Technology, 9(5), pp 211-214.
Nick Szabo. (1996). Smart Contracts: Building Blocks for Digital Markets.
Arvidsson, Niklas. (2017). Lecture in Search and readiness. The Royal Institute of Technology.
Pizzuti, T., and Mirabelli, G. (2015). The Global TrackandTrace System for food: General
framework and functioning principles. Journal of Food Engineering, 159, pp 16-35.
Regattieri, A., Gamberi, M., and Manzini, R. (2007). Traceability of food products: General
framework and experimental evidence. Journal of Food Engineering, 81(2), pp 347-356.
Rahman, N., and Post, C. (2012). Measurement Issues in Environmental Corporate Social
Responsibility (ECSR): Toward a Transparent, Reliable, and Construct Valid Instrument.
Journal of Business Ethics, 105(3), pp 307-319.
Rao, P., and Holt, D. (2005). Do green supply chains lead to competitiveness and economic
performance? International Journal of Operations and Production Management, 25(9-10),pp.
898-916.
Ray Y.Zhong, Xun Xu, Eberhard Klotz and Stephen T.Newman (2017). Intelligent
manufacturing in the context of Industry 4.0: A Review. Available online at:
www.sciencedirect.com [Accessed Feb 2018]
See John Ream, Yang Chu and David Schatsky. (2016). Upgrading Blockchains: Smart
Contract Use Cases in Industry. Prepared by: Smart Contracts Alliance - In collaboration with
Deloitte an industry initiative of the Chamber of Digital Commerce.
Singh, J., Sanchez, M., and del Bosque, I. R. (2008). Understanding corporate social
responsibility and product perceptions in consumer markets: A cross-cultural evaluation.
Journal of Business Ethics, 80(3).
Sarkis, J., Zhu, Q. H., and Lai, K. H. (2011). An organizational theoretic review of green supply
chain management literature. International Journal of Production Economics, 130(1), pp. 1-15.
Swan, M. (2015). Blockchain: Blueprint for a new economy. " O'Reilly Media, Inc.".
Shalloway, A., G. Beaver, et al. (2009). Lean-agile software development: achieving enterprise
agility. Upper Saddle River, N.J., Addison-Wesley.
Sayogo, D. S., Zhang, J., Luna-Reyes, L., Jarman, H., Tayi, G., Andersen, D. L., . . . Andersen,
D. F. (2015). Challenges and requirements for developing data architecture supporting
integration of sustainable supply chains. Information Technology and Management, 16(1), pp
5-18.
42
Senneset, G., Foras, E., and Fremme, K. M. (2007). Challenges regarding implementation of
electronic chain traceability. British Food Journal, 109(10), pp 805-818.
Storoy, J., Thakur, M., and Olsen, P. (2013). The Trace Food Framework - Principles and
guidelines for implementing traceability in food value chains. Journal of Food Engineering,
115(1), pp 41-48.
Sahin, F., Robinson, E. P. (2002), “Flow coordination and information sharing in supply chains:
review, implications, and directions for future research”, Decision Sciences, 33, Iss. 4, pp. 505-
536.
Simatupang, T.M., Wright, A.C., Sridharan, R. (2002), “The knowledge of coordination for
Supply chain integration”, Business Process Management Journal, Vol. 8, Iss. 3, pp. 289-308.
Tan, K.C.(2001).A framework of supply chain management literature. European Journal of
Purchasing and Supply Management, 7, pp. 39–48.
Tapscott, D., and Tapscott, A. (2016). Blockchain Revolution: How the Technology Behind
Bitcoin Is Changing Money, Business, and the World: Penguin Publishing Group.
Vetenskapsrådet (2002). Forskningsetiska principer inom humanistisksamhällsvetenskaplig
forskning.
Womack, J. P. and D. T. Jones (1996). Lean thinking: banish waste and create wealth in your
corporation. New York, Simon and Schuster.
Wognum, P. M., Bremmers, H., Trienekens, J. H., van der Vorst, J., and Bloemhof, J. M.
(2011). Systems for sustainability and transparency of food supply chains - Current status and
challenges. Advanced Engineering Informatics, 25(1), pp 65-76.
Xu, J. J. (2016). Are Blockchains immune to all malicious attacks? Financial Innovation, 2(1),
25. Available online at: https://doi.org/10.1186/s40854-016-0046-5 [Accessed Mar 2018]
Zheng, Z., Xie, S., Dai, H. N., and Wang, H. (2016). Blockchain Challenges and Opportunities:
A Survey.
43
Appendix 1: Assembly Department - Interview A
Interviewee A, works with system analyst for Scania, and is responsible for information
sharing activities.
The discussion started with outlining current asset flow and information flow between
departments. The interviewee tells that they will send an order of required assets with quality
specification and quantity to machining department (manufacturer) and copy of same order will
send to logistic department. The orders are sending via ERP to respective departments.
The interviewee pointed that there is no information sharing system in the machining
department. It is difficult to track and trace where the asset in the machining department. They
are unable to check real time verification and validation on quality specification that they
specified when they placed order. There is no real time information of the assets, this leads to
problem for them to make decision making and planning activities. The interviewee is also
pointed that when they found faulty assets, it is difficult for them to trace back where and which
end the fault was happened. Since there is no real time visibility of asset, it is difficult to
coordinate with other departments.
Machining Department - Interview B
Interviewee B, works with production planner for Scania, and is responsible for production
and planning activities.
The discussion started with outlining current asset flow and information flow in the machining
department. The interviewee pointed that they don’t have internal information system, they only
have ERP system, and this will be used to send and receives an order from assembly department.
Firstly, when they receive an order from assembly department, they will communicate
internally to raw material section in order to take material for the production. In this Raw
material data manually updated in the excel system. And then material is taking to production
section, here once product is finished, quality data is updated manually to the system. Once
product is finished, they will share information via ERP to logistic department and assembly
department. The interviewee pointed that, they have different suppliers in the Raw material
section, if there is any faulty Raw material found, it is difficult for them to track and trace the
supplier data in current system, traceability is the big issue. Since there is no real time visibility
of asset, it is difficult to coordinate with other departments. And also it is difficult to take
decision, this leads in time delay in planning and scheduling.
Logistic Department - Interview C
Interviewee C, works with logistic developer for Scania, and is responsible for logistic and
planning activities.
The discussion started with outlining the current asset flow and information flow. The
interviewee pointed that, firstly, they receives the information from assembly department, when
the order is placed. And, once product is finished in machining department, they will get
information via ERP in order to pick up products. Then will pick up products and stored in our
warehouse. Lastly, deliver same products to assembly department.
The interviewee pointed that currently they are not able to coordinate with the departments,
since they are not getting real time information of asset. Currently, they are facing challenges
in making decisions for forecasting, scheduling and planning. They are facing huge problem in
faulty products, since they are not able to find it out in which end problem was happened. They
are facing big problem in asset identification number, since at each and every finished asset that
they receive from the machining department is different from the assembly department order
numbers.
44
Appendix 2:
pragma solidity ^0.4.18;
contract AssetTracker {
event OrderPlaced(uint256 id ,address owner);
function AssetTracker(address _machiningAddress, address _logisticAddress , address
_assemblyAddress) {
contractCreatorAddress=msg.sender;
machiningAddress=_machiningAddress;
logisticAddress=_logisticAddress;
assemblyAddress =_assemblyAddress;
}
address public contractCreatorAddress;
address public machiningAddress;
address public logisticAddress;
address public assemblyAddress;
modifier onlyContractCreator() {
require(msg.sender == contractCreatorAddress);
_;
}
modifier onlyMachiningAddress() {
require(msg.sender == machiningAddress);
_;
}
modifier onlyLogisticAddress() {
require(msg.sender == logisticAddress);
_;
}
modifier onlyAssemblyAddress() {
require(msg.sender == assemblyAddress);
_;
}
function changeStatus(uint256 _id, uint256 _status) internal {
assetStore[_id].status=_status;
}
function setContractCreator(address newContractCreator) onlyContractCreator{
contractCreatorAddress=newContractCreator;
}
function setMachiningAddress(address newMachiningAddress) onlyContractCreator{
machiningAddress=newMachiningAddress;
}
function setLogisticAddress(address _logisticAddress) onlyContractCreator{
logisticAddress=_logisticAddress;
}
function setAssemblyAddress(address _assemblyAddress) onlyContractCreator{
assemblyAddress=_assemblyAddress;
}
struct macRawMaterial {
45
uint256 macRawMaterialID;
string macRawMaterialOrigin;
uint256 macRawMaterialQuality;
uint256 macRawMaterialQuantity;
}
struct macProduction {
uint256 macMachineNumber;
uint256 macQualityOfProduct;
uint256 macQuantityOfProduct;
}
struct macShipment {
uint256 macLocationIdOnRack;
string macLocationName;
}
struct logDepartment{
uint256 logLocationIdOnRack;
string logLocationName;
}
struct Asset {
string name;
string description;
// possible statuses 00,10,20,21,22,30,11
uint256 status;
uint256 ProductID;
address customerAddress;
// to be set while order placement , to be set 10
uint256 productionQualityLowerLimit;
uint256 rawMaterialQualityLowerLimit;
logDepartment logDepartmentVariable;
macShipment macShipmentVariable;
macProduction macProductionVariable;
macRawMaterial macRawMaterialVariable;
}
mapping(uint256=>Asset) assetStore;
mapping(uint256=>address) public assetIdToOwner;
// not effective as the whole array isnt returned
//mapping(uint256 => uint256[]) public departmentToAssetId;
uint256 public last=0;
// keeps in account the ownershipCount of department
mapping(uint256 => uint256) public ownershipCount;
// asset id to status
mapping(uint256 => uint256) public assetIdToStatus;
function placeOrder(string _name , string _desc, uint256 _productionQualityLowerLimit,
uint256 _rawMaterialQualityLowerLimit){
Asset memory _asset=Asset({
name:_name,
description:_desc,
46
status:20,
ProductID:last,
customerAddress:msg.sender,
productionQualityLowerLimit:_productionQualityLowerLimit,
rawMaterialQualityLowerLimit:_rawMaterialQualityLowerLimit,
logDepartmentVariable:logDepartment(0,"null"),
macShipmentVariable:macShipment(0,"null"),
macProductionVariable:macProduction(0,0,0),
macRawMaterialVariable:macRawMaterial(0,"null",0,0)
// macRawMaterialID:0,
// macRawMaterialOrigin:"null",
// macRawMaterialQuantity:0,
// macRawMaterialQuality:0
//macMachineNumber:0
//macQualityOfProduct:0,
//macQuantityOfProduct:0,
//macLocationIdOnRack:0
//macLocationName:"null",
//logLocationIdOnRack:0
//logLocationName:"null"
});
//assetStore[last].logDepartmentVariable=logDepartment();
assetStore[last]=_asset;
assetIdToStatus[last]=20;
ownershipCount[20]++;
// assembly guy takes order , transferrs order to machinning guy
assetIdToOwner[last]=machiningAddress;
//departmentToAssetId[20].push(last);
last++;
OrderPlaced(last,msg.sender);
}
function addDetailRawMaterialStakeHolder(uint256 _id,uint256 _rawMaterialId,uint256
rawMaterialQuality,uint256 rawMaterialQuantity,string origin) onlyMachiningAddress{
// check ownership and status.
require(assetStore[_id].rawMaterialQualityLowerLimit<=rawMaterialQuality);
require(assetStore[_id].status==20);
require(assetIdToOwner[_id]==machiningAddress);
// write data
assetStore[_id].macRawMaterialVariable.macRawMaterialOrigin=origin;
assetStore[_id].macRawMaterialVariable.macRawMaterialQuality=rawMaterialQuality;
assetStore[_id].macRawMaterialVariable.macRawMaterialQuantity=rawMaterialQuantity;
assetStore[_id].macRawMaterialVariable.macRawMaterialID=_rawMaterialId;
// change status to next stakeholder
changeStatus(_id,21);
assetIdToStatus[_id]=21;
ownershipCount[20]--;
ownershipCount[21]++;
47
}
function addDetailProductionStakeHolder(uint256 _id,uint256 _machineNumber,uint256
_macQualityOfProduct,uint256 _macQuantityOfProduct) onlyMachiningAddress{
require(assetStore[_id].productionQualityLowerLimit<=_macQualityOfProduct);
require(assetStore[_id].status==21);
require(assetIdToOwner[_id]==machiningAddress);
assetStore[_id].macProductionVariable.macMachineNumber=_machineNumber;
assetStore[_id].macProductionVariable.macQuantityOfProduct=_macQuantityOfProduct;
assetStore[_id].macProductionVariable.macQualityOfProduct=_macQualityOfProduct;
changeStatus(_id,22);
assetIdToStatus[_id]=22;
ownershipCount[21]--;
ownershipCount[22]++;
}
function addDetailShipmentStakeHolder(uint256 _id,uint256
_macLocationIdOnRack,string _macLocationName) onlyMachiningAddress{
require(assetStore[_id].status==22);
require(assetIdToOwner[_id]==machiningAddress);
assetStore[_id].macShipmentVariable.macLocationIdOnRack=_macLocationIdOnRack;
assetStore[_id].macShipmentVariable.macLocationName=_macLocationName;
changeStatus(_id,30);
assetIdToStatus[_id]=30;
ownershipCount[22]--;
ownershipCount[30]++;
assetIdToOwner[_id]=logisticAddress;
}
function addDetailLogistic (uint256 _id,uint256 _logLocationIdOnRack,string
_logLocationName) onlyLogisticAddress {
require(assetStore[_id].status==30);
require(assetIdToOwner[_id]==logisticAddress);
assetStore[_id].logDepartmentVariable.logLocationIdOnRack=_logLocationIdOnRack;
assetStore[_id].logDepartmentVariable.logLocationName=_logLocationName;
// order ready to be delivered
changeStatus(_id,11);
assetIdToStatus[_id]=11;
ownershipCount[30]--;
ownershipCount[11]++;
assetIdToOwner[_id]=assetStore[_id].customerAddress;
}
/** getters **/
function getAssetOverview(uint256 _id)constant returns(string,
string,
uint256,
48
uint256,
address,
uint256,
uint256
)
{
return (assetStore[_id].name,
assetStore[_id].description,
assetStore[_id].status,
assetStore[_id].ProductID,
assetStore[_id].customerAddress,
assetStore[_id].productionQualityLowerLimit,
assetStore[_id].rawMaterialQualityLowerLimit
);
}
function getAssetRawMaterialInformation(uint256 _id) constant
returns(string,uint256,uint256,uint256){
return (assetStore[_id].macRawMaterialVariable.macRawMaterialOrigin,
assetStore[_id].macRawMaterialVariable.macRawMaterialQuantity,
assetStore[_id].macRawMaterialVariable.macRawMaterialQuality,
assetStore[_id].macRawMaterialVariable.macRawMaterialID
);
}
function getAssetProductionInformation(uint256 _id) constant
returns(uint256,uint256,uint256){
return (
assetStore[_id].macProductionVariable.macMachineNumber,
assetStore[_id].macProductionVariable.macQualityOfProduct,
assetStore[_id].macProductionVariable.macQuantityOfProduct
);
}
function getAssetShipmentInformation(uint256 _id) constant returns(uint256,string){
return(
assetStore[_id].macShipmentVariable.macLocationIdOnRack,
assetStore[_id].macShipmentVariable.macLocationName
);
}
function getLogisticInformation(uint256 _id) constant returns(uint256,string){
return(
assetStore[_id].logDepartmentVariable.logLocationIdOnRack,
assetStore[_id].logDepartmentVariable.logLocationName
);
}
function tokensOfStakeholder(uint256 stakeHolder) constant returns (uint256[]){
uint256 assetCount = ownershipCount[stakeHolder];
if (assetCount == 0) {
49
// Return an empty array
return new uint256[](0);
} else {
uint256[] memory result = new uint256[](assetCount);
uint256 totalLocks = last-1;
uint256 resultIndex = 0;
// We count on the fact that all cats have IDs starting at 1 and increasing
// sequentially up to the totalCat count.
uint256 lockId;
for (lockId = 1; lockId <= totalLocks; lockId++) {
if (assetIdToStatus[lockId] == stakeHolder) {
result[resultIndex] = lockId;
resultIndex++;
}
}
return result;
}
}
}