You are on page 1of 17

Arabian Journal for Science and Engineering

https://doi.org/10.1007/s13369-018-3537-z

RESEARCH ARTICLE - COMPUTER ENGINEERING AND COMPUTER SCIENCE

Novel Automatic Food Trading System Using Consortium Blockchain


Dianhui Mao1 · Zhihao Hao1 · Fan Wang1 · Haisheng Li1

Received: 13 July 2018 / Accepted: 29 August 2018


© King Fahd University of Petroleum & Minerals 2018

Abstract
Conventional food trading platforms face several issues, such as quickly to find trading objects and protect the reliability of
transaction information. With e-commerce developing rapidly, food trading has also recently shifted to the online domain.
Blockchain has changed many industries owing to its robustness, decentralization and end-to-end credibility. This paper
proposes a novel Food Trading System with COnsortium blockchaiN (FTSCON) to improve trust and security issues in trans-
actions. It uses consortium blockchain technology to set permission and authentication for different roles in food transaction,
which meet the challenge of the privacy protection of multi-stakeholders. The algorithm of optimized transaction combination
is designed for the purpose of helping users find suitable transaction objects. It can choose the optimized trading portfolio
for buyers. The online double auction mechanism is used to eliminate competition. And the improved PBFT (iPBFT) is
used to enhance efficiency of system. Moreover, a smart-contract life- cycle management method is introduced, and security
analysis shows that FTSCON improves transaction security and privacy protection. Experiment results based on a series of
data indicate that the proposed algorithm can achieve profit improvement of merchants.

Keywords Secure food transaction · Consortium blockchain · Consensus process · Smart contracts · Online double auction ·
Combination strategy

1 Introduction late payments for perishable food products, last-minute


order cancellations, and unilateral or retroactive changes
The food supply chain is an important part of food trad- to contracts [1]. These problems will not only harm the
ing. There are many multi-stakeholders in food trading: stability of the food market, but will also lower the effi-
farmers, processors, traders, wholesalers, retailers and con- ciency of the transaction. In addition, due to the complexity
sumers. Many organizations and nations have made provi- of the transaction process, high transaction costs and long
sions to create a fairness trade environment. For instance, transaction times can lead to inefficient transactions either.
the European Commission was proposed in April 12, 2018, Therefore, it is necessary to find solutions that can pro-
to ban the more damaging unfair trading practices in the tect fairness of transaction and improve efficiency in food
food supply chain to ensure fair treatment for small- and transaction.
medium- sized food and farming businesses. These include Academic research which looks at the rise of automated
trading has considered its effects on market liquidity, effi-
B Zhihao Hao ciency, volatility and the costs or benefits to retail and
hao_zhihao@126.com institutional investors, with varied results. The automatic
Dianhui Mao trading thought is to make the computer automatically trade
maodh@th.btbu.edu.cn for users according to the conditions set by users in advance.
Fan Wang It originated from the automatic trading mechanism of
wfan0601@163.com a˛śstock portfolio transfer and tradinga˛ś that appeared in the
Haisheng Li USA in 1975. However, it subjects to the rules of the financial
lihsh@th.btbu.edu.cn market [2] and the principle of ensuring the stability of the
1
financial market, and the portfolio needs to be set by investors
Beijing Key Laboratory of Big Data Technology for Food
Safety, School of Computer and Information Engineering, themselves. Thus, the outcome depends on the quality of the
Beijing Technology and Business University, Beijing 100048, investment plan.
China

123
Arabian Journal for Science and Engineering

Table 1 Comparison among blockchains


Public blockchain Consortium blockchain Private blockchain

Access permission mechanism Permissionless Permissioned Completely isolated


(Anonymous, Could be malicious) (Identified, Trusted) (Identified, Trusted)
Consensus mechanisms Proof of Work (POW), Proof of Voting or multi-party consensus Voting or multi-party consensus
Stake (POS), etc. algorithm algorithm
(Large energy consumption, No (Lighter, Faster, Low energy (Lighter, Faster, Low energy
finality, 51% attack) consumption, Enable finality) consumption, Enable finality)
Transaction approval freq. Long Short Short
Bitcoin: 10 min or more 100 × msec 100 × msec
Advantages 1. Low access threshold, 2. Full 1. Fast transaction, 2. Wide range Low transaction cost
disclosure of application, 3. High security
Disadvantages 1. Low throughput, 2. Slow pace of High node performance 1. Concentration of power, 2. Easy
trading requirements to be manipulated

Unlike financial markets, this provision is unreasonable ferent from the public blockchains, fully private blockchains
for small- and medium-sized food and farming enterprises are the most restrictive. It is the blockchain where write
in the food market because the perishable nature of the food permissions are kept centralized to one organization. Read
causes the value of the food to change with the quality of the permissions may be public or restricted to an arbitrary extent.
food. In addition, due to the centralized storage of informa- This type of blockchains could be deployed in the private net-
tion in the traditional transaction process, the risk of leakage work of a single company; thus, it is mainly used for database
is high. For example, the largest information leakage acci- management, auditing and so on within a single company.
dent in Korean history occurred in 2013 and shocked society Consortium blockchains are often described as more inter-
when it was reported that personal information of around esting than the two other types of blockchains. It is the
104 million individuals was leaked [3]. Besides, the trust cri- blockchain where the consensus process is controlled by a
sis caused by information asymmetry will also damage the preselected set of nodes. The right to read the blockchain
enthusiasm of the business, and it is not conducive to market may be public, or restricted to the participants, and there
stability and economic development. are also hybrid routes such as the root hashes of the blocks
Blockchain technology could be put to use safeguarding being public together with an API that allows members of
automated trading mechanism. It has attracted the interest of the public to make a limited number of queries and get
stakeholders across a wide span of industries: from finance back cryptographic proofs of some parts of the blockchain
[4] and health care [5,6], to utilities [7], real estate [8] and the state. A good example for this kind of blockchain would
government sector [9]. Recently, it has been introduced for be a consortium of financial institutions, who may com-
food trading [10]. The reason for this explosion of interest: pete with one another. To serve such purpose, consortium
with a blockchain in place, applications that could previously blockchains are usually deployed in environments that con-
run only through a trusted intermediary, can now operate sist of multiple organization networks often interconnected
in a decentralized fashion, without the need for a central by the Internet. These blockchains may be considered “par-
authority, and achieve the same functionality with the same tially decentralized.” The detailed comparison of the three
amount of certainty. This was simply not possible before. blockchains is shown in Table 1. According to Table 1, the
The blockchain is a P2P distributed ledger technology, which authors find that the consortium blockchain is better than
enables food trading to be executed in decentralized, trans- the public blockchain and private blockchain in terms of
parent and secure market environments. transaction speed and security and so on. In addition, the
Blockchains are typically deployed in one of three com- consortium blockchain has infinite possibility and a bright
monly known environments depending on their access future in the business field. There are many famous organi-
permissions: public, consortium, and private environments. zations used consortium blockchains to grow their business,
Public blockchains are the most permissive among all three. for instance R3CEV LLC (R3), the largest consortium of
It is the blockchain that anyone in the world can read, send global financial institutions working on developing commer-
transactions to and anyone and participate in the consensus cial applications for the distributed ledger technology. They
process—the process for determining what blocks get added have built their own consortium blockchain, called Corda.
to the chain and what the current state is. These blockchains Since those days, R3 has rapidly grown from the original nine
are generally considered to be “totally decentralized.” Dif- banks to now over 200 banks, financial institutions, regula-

123
Arabian Journal for Science and Engineering

tions and trade associations. The goal of R3 is to cut across helps regulators gather and manage information to a certain
asset classes, geographies and market participants. It also extent, but they mostly target at food traceability, food stan-
presents an opportunity to work together in a collaborative dard, risk assessment and the food inspection. There is also
way in order to build new financial technology platforms a existing gap. To remedy this issue, a concept using radio
based on cryptocurrencies and distributed ledger techniques. frequency identification (RFID) has been proposed [13,14].
It may to shape the new rails upon which many industries This solution uses RFID tags to track products along the dis-
will operate in the future. tribution chain. This extends the traceability of the product
Motivated by these developments, in this paper, we exploit to the entire supply chain instead of being confined to the
the consortium blockchain technology to develop a secure production stage. It also digitizes the recording of data and
automatic food trading system. The consortium blockchain changes the method of identification to individual products
is a specific blockchain with multiple authorized nodes to instead of batches. IoT has a promising future in improving
establish the distributed shared ledger with moderate cost. A existing systems and tools [15]. Li et al. [16] formulated a
consortium blockchain is established on authorized nodes to tracking method for prepackaged food based on the internet
publicly audit and share transaction records without relying of things (IoT), and it tracks prepackaged food products to
on a trusted third party. Food transaction records among user monitor the entire supply chain. Besides, Pang et al. [17]
nodes are uploaded to the authorized nodes after encryption. used the internet of things designing the solution for food
The authorized nodes will audit the transactions and record supply. These technologies suffer from some obvious draw-
them into the shared ledger. This ledger is publicly accessed backs: centralization of data storage increases susceptibility
by nodes connected to the consortium blockchain. Moreover, to leaks and tampering, and the opaqueness of the transaction
since the trading portfolios of merchants need to be opti- introduces doubt. However, blockchain technology not only
mized, an iterative optimization of the transaction matches can be a key enabler to solve many IoT security problems
algorithm which is designed to maximize demand of buyers [18], but also perfectly overcome these defects.
in the system. The contribution of this paper is summarized Blockchain technology has proven to be a highly rev-
as follows. olutionary technology with applications in many fields. It
has seen wide use in financial applications since the begin-
– For the purpose of helping users find suitable transac- ning. Omran et al. [19] devised a supply chain finance
tions. We have designed an algorithm that can choose the framework based on blockchain technology, and Benos et
optimized transaction combination for buyers, and we al. [20] researched securities settlement using distributed
have used online double auction mechanism to eliminate ledger technology. The conclusion was that blockchain tech-
competition. nology can lower cost and enhance efficiency. Blockchain
– A smart-contract life-cycle management method is intro- is used not only in financial fields but also in other fields
duced in the system to reduce the risk of system attack as well, like the multimedia blockchain use for media trans-
possibility and improve the security of the system. action [21], and Sikorski et al. made an implementation of
– The authors have improved PBFT (iPbFT) and made blockchain technology facilitating a M2M electricity market
i- PBFT to be more efficient than traditional consensus [22]. Hasan et al. presented a blockchain-based proof-of-
algorithm. delivery (POD) solution which facilitates the trading and
tracking of sold items between two parties in a decentralized
The rest of this paper is organized as follows. Section 2 way [23]. Using blockchain technology in the food indus-
details related work. Core system components are illustrated try is a new area of research. For instance, a system based on
in Sect. 3. Implementation details are discussed in Sect. 4. hazard analysis and critical control points (HACCP) for food
Section 5 presents experiment platform, security analysis and supply chain traceability uses blockchain and the IoT [24].
numerical results, and the paper is concluded in Sect. 6. Smart contracts are supposed to herald the era of
blockchain 2.0. Karajovic et al. [25] applied smart contracts
to automate taxation and optimize accounting processes .
2 Related Work Smart contracts can also be used as automatic custodians of
digital assets or executing contractual obligations in a safe,
Reductions in transport and transaction costs are expected to verifiable, and deterministic manner [26]. An effective mech-
have a major effect on the functioning of food transaction. For anism of using smart contracts to automate transactions does
many developing countries, this is a relevant issue as it may not exist yet and is the subject of this paper. This research
have important consequences for the food markets in urban topic has in fact gained a lot of attention recently.
and rural deficit areas [11]. At present, most of the solutions Several existing applications combine blockchain and
to food trade problems are from the perspective of the food food technology. The primary idea is to solve food safety
supply chain such as electron spin resonance (ESR) [12]. It issues using blockchain. Major corporations have supported

123
Arabian Journal for Science and Engineering

this issue. Wal-Mart, Nestlé and IBM have formed a global in turn require large amounts of computing power. Fur-
food safety blockchain alliance. The main responsibilities thermore, the restriction on the number of transactions the
are monitoring the supply chain, which involves storing sup- network could process was small; thus, they were piling up
ply chain data in the blockchain [27] and leveraging RFID which created congestion and prompted users who were in
technology to manage the supply chain using blockchain a hurry to pay hefty charges so that nodes pick up their
[28]. The technologies will authenticate, verify, record and transactions and include them in a block. In addition, the
provide an open report on the transfer of ownership and pro- problems like scalability, security flaws, governance, legal-
vision of products and goods. For food producers, the use ity, human error, transaction costs, imperfect competition
of blockchain could assist in stopping the use of fake ingre- between blockchains seem to be piling up. All of these prob-
dients by detecting it much faster. The platform is based on lems increasing cost and ruining efficiency. The system is
the consortium blockchain. Extensively tested and piloted, it designed and can solve these problems. The architectures for
addresses a wide range of business pain points, including both FTSCON includes the following entities as shown in Fig. 1.
business and technical requirements around privacy, collab-
oration, performance and security that no other blockchain (1) User Node User nodes can play two roles in the system:
platform delivers today. The integrated platform allows mul- buyer node or seller node. The role is chosen according
tiple parties to jointly govern, develop, secure and operate its current state and planning. In this paper, the buying
blockchain networks to help companies accelerate consor- node is denoted by u 1 and the selling node is u 2 ,
tium blockchain adoption. (2) Scheduling Node The scheduling node has the authority
Preparatory research and analysis make it clear that it is to verify transaction data and calculate optimal trading
necessary and feasible to incorporate blockchain technology objects for the users of the system, and the scheduling
to automated food trading systems. The initial approach of nodes are represented as si (i = 1, 2, …, n).
this study was introducing a public blockchain since it is
readable by any party: Any user can initiate a transaction The consortium blockchain is made up of three parts:
and it can be verified, and any user can participate in this
consensus process. Such an automated trading system takes (1) Block containing the transaction data The scheduling
advantage of all the benefits provided by public blockchains. nodes contain the bulk of the raw data. Computational
Further research, however, shows that for an excessive num- and storage limits make it necessary for the user nodes to
ber of nodes, the processing speed of the background system store an index of the metadata containing the metadata
will diminish when all nodes are required to run a consensus location to bring down system cost. The scheduling node
algorithm, possibly causing harm to the underlying system. manages local transaction records, which are encrypted
Furthermore, for transactions with a high volume of data, and assembled after the scheduling nodes have reached a
efficiency is reduced since each node stores the same data. consensus. A cryptographic hash in each block points to
From a thorough analysis of the benefits and drawbacks the previous block, enabling validation and traceability.
of several blockchain mechanisms, the authors decided to Blocks are added to the chain chronologically. Because
utilize consortium blockchain technology for the study’s of this, both scheduling and user nodes can access the
automatic trading system. data freely.
(2) Consensus mechanism This is a mechanism that enables
consensus to be achieved among blockchain nodes
3 The Core Components of the Food Trading across the entire network, based on block information.
System It can be used to ensure that the newest block has been
added to the chain properly, and the chain data stored in
3.1 Consortium Blockchain for FTSCON the nodes have not been maliciously forked or altered.
(3) Smart contract Within the blockchain context, smart
Blockchain technology is a modern P2P technology with contracts are scripts stored on the blockchain. (They can
applications in distributed computing and decentralized data be thought of as roughly analogous to stored procedures
sharing and storage. Prior to recording a transaction in a in relational database management systems.) Since they
blockchain, a process called consensus processing is applied reside on the chain, they have a unique address. We trig-
to verify the data. This process is traditionally carried out ger a smart contract by addressing a transaction to it. It
by all nodes of the system, and traditional transaction pro- then executes independently and automatically in a pre-
cess contains multi-stakeholders. This essentially means that, scribed manner on every node in the network, according
in order to prove that a node has permission to write to to the data that were included in the triggering transac-
the blockchain, complicated algorithms must be run, which tion.

123
Arabian Journal for Science and Engineering

Fig. 1 The automatic food trading system

The portion of Fig. 1 containing set s denotes a group of 3.2 Operation Details of FTSCON
scheduling nodes, while the portion containing u 1 , u 2 and
si is a schematic of the transaction process. The bottom left In essence, the consortium blockchain is a P2P model. The
contains the block with transaction information, while on the rights and obligations of all peers in the P2P network are the
right is the transaction data module. same. In this paper, the authors consider that each buyer and
seller as a node of a P2P network, and their trading rights are
equal.

123
Arabian Journal for Science and Engineering

To ensure the integrity and consistency of the supply and is the unit freight shipped to each place, xi j is the quantity
demand data across all nodes, a specific area in the system of food transported to various places and i, j represent the
is separated and designated as the trading pit. Before the origin label and the place of sale label, respectively. Here,λ is
transaction data are uploaded to the trading pit, it is grouped the loss value of the unit shipping volume, and ω represents
by scheduling node after taking into account demand, supply the total shipping volume [29].
and food type. The proposed algorithm is derived from dynamic pro-
Demand or supply data are send directly by u 1 and u 2 to the gramming. Dynamic programming (DP) is a very useful
nearest scheduling node si , which records this information tool in solving optimal control problems. It is an algorithm
in the cache table. The transaction data are then uploaded to attributed largely to Bellman, which is developed for opti-
the transaction pit. The scheduling nodes will mutually agree mizing a multistage (the term stage represents time step
upon a time t, at which they will download all information throughout the paper) decision process. If the return or cost at
in transaction pit and run an algorithm to analyze the data each stage is independent and satisfies the monotonicity and
to select the optimal trading portfolio for u 1 . The algorithm separability conditions, the original multistage problem can
will be detailed in Sect. 4. The uniformity of the supply and be decomposed into stages with decisions required at each
demand data across all nodes means that the result of the stage. The decomposed problem then can be solved recur-
algorithm will be identical for time t. The algorithm com- sively, two stages at a time, using the recursive equation of
putes, in this case, that the most optimal transaction object DP. DP is particularly suited for optimizing reservoir man-
for u 1 is u 2 , which is relayed to u 1 by si . u 1 then finds u 2 with agement and operation as the structure of the optimization
its public address, and a smart contract is automatically gen- problem conforms to a multistage decision process. Over the
erated by the system. Both parties sign the contract and agree past half decade, DP had been used extensively in the opti-
to the automatic execution of the transaction. If u 1 is unsat- mization of reservoir management [30] and operation [31].
isfied the transaction objects calculated by si , it can send the For some buyers’ part, the general understanding is that a
demand information to si again, and the calculation process single supplier cannot meet the entire demand. To calculate
is repeated until u 1 is satisfied. the correct number of suppliers to meet the demand, core
issues need to be addressed. That is, the transaction combi-
nation with the smallest loss of food value is selected under
4 Details of the Food Trading System the condition that the demand of the buyer is greatly satisfied.
In the course of the research, the author found that the idea
4.1 The Method of Optimal Transaction Combination of solving the 0–1 knapsack problem can solve this problem
perfectly. Here, the value loss of each buyer is v and supply
The section explains a scheduling node how to reach a volume of each seller is n, and under the condition of the total
consensus; it needs to find the usera˛ŕs optimal transaction demand of the buyer is N , the equation is defined as follows:
combination, automatically conducts the transaction through ⎧

⎨0
the FTSCON and verifies the transaction information.
f [i][n] = f [i − 1, n]


i) Transaction Objects Selection max{ f [i − 1][n], f [i − 1][n − n[i]] + v[i]}
(2)
To ensure market fairness and stability, we prescribe that
The 2D array f [i][n] represents the minimal value loss
the right and obligation both of buyers and sellers are the
of food i to the buyer. The current demand of buyer is n.,
same. Let v be a measure of buyer’s loss in transit; multiple
which is the addition of these batches of food supplies and
factors can change this value in the real world, but there are
can greatly satisfy current buyer demand. It is assumed that
two factors having a higher bearing on the final v value. Under
the previous i − 1 pieces of food have all been selected, and
the premise that freight and other expenses are born by the
the current value loss is f [i − 1, n].
buyer, the value loss of buyer will be calculated according to
The previous formula makes it clear that the selection
the formula shown below (Eq. (1)). The algorithm is based
results in the user being matched with the best possible
on the formula.
merchant. To arrive at this formula, Algorithm 1 has been
⎛ ⎞
 m  n designed.
ν = −⎝ ci j xi j + λ ∗ ω⎠ (1)
i=1 j=1 ii) Bargaining Process

The two terms of the formula are the transport cost and the After the scheduling nodes selects the transaction combina-
loss value of the food caused by the transport time, where ci j tion for the buyer, the buyer and the seller objects need to

123
Arabian Journal for Science and Engineering

Algorithm 1 The Algorithm For Choose Optimal Objects after refusal. Otherwise, both parties will be bargaining for
Input: The array of values loss v[m], the demand array n[m]; countless times to obtain the lowest price.
Output: The minimal value loss of the buyer receives and the corre-
sponding merchant number i;
1: for n ← 1 to N do iii) Online Double Auction Mechanism
2: if n i  n then
3: if vi + f [i − 1, n − n i ] > f [i − 1, n] then
4: f [i, n] ← vi + f [i − 1, n − n i ]; In the actual transaction process, there are transaction
5: return i; objects combination results that may satisfy the requirements
6: else of multiple buyers. There will be competition among differ-
7: f [i, n] ← f [i − 1, n]; ent buyers. At this time, the online double auction mechanism
8: end if
9: else is used. The double auction mechanism can solve problems
10: f [i, n] ← f [i − 1, n]; like how to effectively use network resources and lighten the
11: end if network load. Different from unilateral auction, double auc-
12: end for tion is a˛śmany-to-manya˛ś market structure. That means, there
13: return f [m, N ];
is more than one buyer and seller. It is an inter-networking
information exchange model where auctioneers and bidders
are equal.
negotiated price. The sellers quotation directly affects their
The process is as follows: The scheduling node opens the
own profits and whether it can be accepted by the buyer. Sell-
market, buyer nodes and proxies (here, proxy is chosen by
ers must weigh the bidding strategy to maximize its profit.
seller nodes in transaction combination) will have the highest
The seller only knows exactly its own cost function, pay-
willing price in each round of auction according to their own
ment function, the buyers decision-making type space, etc.,
conditions, and the scheduling node collects quoted price
and vice versa. Obviously, the game between the seller and
and picks the current highest price of buyer and lowest of
the buyer is a dynamic game process. In the actual price
proxy. As soon as the highest quoted price of buyer is higher
negotiation, the bid price of the negotiating parties is not
than or equal to the lowest proxy quote, the trade executes
simultaneous, usually one party gives a price, and the other
immediately and proceeds in sequence until all transactions
party chooses to accept or reject. If it is refused, he can give
were completed and the market was closed. In this paper, we
his own price, and they continue to negotiate this price until
found that loopholes such as serious asymmetry in informa-
the conclusion of the negotiations. For the bargaining game
tion between buyers and sellers in the auction process [32]
between the seller and the buyer, it is clear that the seller first
are perfectly fixed. And based on the work of Fu [33], the
quotes, and the buyer starts from his own profit maximiza-
formula for the maximum auction efficiency is as follows:
tion goal based on this price to decide whether to accept the
quotation. If the buyer accepts the price, they will use the 2 1 1
smart contract to execute the transaction, otherwise it enters ai = vi + Vmin + Vmax ,
3 4 12
the next round of bargaining game, so this is a dynamic pro- 2 1 1
cess of rotating bidding. The profit function of buyers and bi = m j + Vmin + Vmax . (5)
3 12 4
sellers is as follows:
Assuming that the number of bargaining round is N , in the The ai denotes the quotation of the i buyer, vi denotes
N round, the buyer’s bid price is Wn/2 b , and seller’s accept the estimate price of the i buyer, Vmin denotes the lowest bid
price is Wn/2 s . We use Ws and Wb to indicate the seller’s and announced by the market, Vmax denotes the highest quotation,
buyer’s expectations for the price of the food. The transaction b j denotes the quotation of the j seller, and m j denotes the
may executed when Ws  Wb . Here, when N is odd: j seller cost.
After the auction is finished, the transaction price is deter-
r1 = δ n−1 (W(n+1)/2 s − Ws ) mined and smart contracts are generate by system.
r2 = δ n−1 (Wb − W(n+1)/2 s ) (3)
4.2 Smart Contract
and when N is an even number:
Smart contracts can be considered as a set of digital promises.
For a user, a smart contract is effectively an automatic guar-
r1 = δ n−1 (Wn/2 b − Ws ) antee by which, for instance, information is shared when
r2 = δ n−1 (Wb − Wn/2 b ) (4) specific conditions are satisfied. It is a programmable con-
tract between two parties that is stored in the blockchain
r1 and r2 are profit of seller and buyer, respectively, and δ n−1 and tagged with a bespoke blockchain address. The contract
is a coefficient of convergence, that is, the coefficient of return is executed when its conditions are met. This mechanism

123
Arabian Journal for Science and Engineering

improves trust between users due to the credibility of the to carry on attacks. Therefore, in order to improve the secu-
blockchain. rity of the system, we adopted life-cycle management for
Using the above information, a smart contract will be smart contract [35].
defined to satisfy the aforementioned process. The contract Figure 2 shows a smart-contract life cycle of agri-
shows u 1 and u 2 engaging in a trade, with both parties food transaction. It requires cross-organizational information
depositing the same amount of money initially. The parties logistics automation. FTSCON can act as a collaboration
are meant to execute the contract before the deadline, failing hub that serves as a preparation platform for the inception
which the respective funds are returned. We assume that the of smart contracts, and a designer creates a template for
price is Wn/2 . Additionally, the contract defines functions a FTSCON into which service types are inserted together
that calculate the outcome and which either party can call with roles. Since the transaction process involves other roles
upon. These functions are detailed in Algorithm 2. besides buyer and seller, these service roles are called service
roles here. These roles are considered to be potential part-
ners which match the service offer into the service type roles
Algorithm 2 Smart Contracts. are affiliated with organizations that cooperate in the smart
1: address public u 1 , u 2 ;
2: State public state ;
contract. Users as service consumers can decide whether
3: data deadline, threshold a service offer is acceptable. As all nodes are in position
4: // extract the public key and status information of u 1 , u 2 , and define and service types match with acceptable service offers, the
deadline and conditions of the swap contract smart-contract negotiation starts. The process of negotia-
5: def determine.outcome();
6: if state != .state then
tion is essentially the process of bargaining for agri-food.
7: if block.timestamp < deadline then The general consultation in this process has two results:
8: price = Wn/2 ; agreement or disagreement. If the negotiation results in dis-
9: if price > =threshold then agreement, then the transaction is terminated. The bargain
10: send(u 2 , self.balance);
11: purchaseConfirmed();
is accepted by all nodes and the consensus occurs, which
12: else is the prerequisite for a contract establishment. Smart con-
13: send(u 1 , self.balance); tracts enable distributed management. Therefore, each nodes
14: purchaseConfirmed(); of the running case receive a local contract copy from which
15: end if
16: else
a set of respective obligations are deduced. Next, all col-
17: The transaction failed and the funds return to both sides. laborating nodes could do their own job, and this process
18: end if is called the private processes. For enabling information
19: else exchanges among nodes, the communication endpoints must
20: Both sides are offline, the transaction cannot be carried out for
now.
be established. That way, the management of transaction is
21: end if automated. If there is a quality change caused by violation,
an assigned agent will escalate the event and the buyer will
check the breach severity. Assuming the agri-food is seri-
The research shows that the smart contract has many ous deterioration and can not be sold, the buyer triggers
security problems [34]. Smart contracts present a new tar- a disruptive rollback that collapses the transaction. How-
get to attackers beyond the sophisticated attacks required ever, if the agricultural product is only of reduced quality,
to attack blockchain. The security problems surrounding it can still be successfully sold at a lower price that the
smart contracts have challenged its development, destroy- buyer tolerates. At this point, the goods are reassigned for
ing many promising projects and lowering the public trust transportation.
in smart contracts. Unlike Web applications, smart contracts The life-cycle management is important for vetting col-
are directly linked with money and exploit typically result- laborating parties to reduce security breaches such as those
ing in immediate financial loss. In reality, there are many Ethereum recently experienced. But there are many prob-
instances of attackers exploiting the logic of smart contracts lems with system efficiency. Therefore, we propose a new
to perform attacks with effects such as draining of funds, consensus process based on FTSCON to improve efficiency.
gaining an advantage over other users of the smart contract,
and rendering the smart contract unusable. These attacks
are often truculency because of the huge amounts of value 4.3 Consensus Process
placed in these smart contracts by their users. In this sec-
tion, the security vulnerabilities of Ethereum smart contracts It is well known that a challenge for blockchain as the
were systematized. The vulnerabilities were grouped in three blockchain network is distributed. In blockchain, there is no
classes, according to the level where they are introduced (as central node that ensures ledgers on distributed nodes are all
shown in Table 2). All these vulnerabilities can be exploited the same. Some protocols needed to ensure ledgers in dif-

123
Arabian Journal for Science and Engineering

Table 2 The security


Number Level Vulnerability Cause
vulnerabilities of smart contracts
1 Contract source code Call to the unknown The called function does not exist
(Solidity)
2 Gasless send Fallback of the callee is executed
3 Exception disorders Irregularity in exception handling
4 Type casts Type-check error in contract
execution
5 Reentrancy vulnerability Function is reentered before
termination
6 Keeping secrets Private value is published by the
miner
7 EVM bytecode Immutable bug Alter a contract after deployment
8 Ether lost Send Ether to an orphan address
9 Stack overflow Because of stack size limit, the
number of values in stack
exceeds 1024
10 Blockchain Unpredictable state State of the contract is changed
before invoking
11 Generating randomness Seed is biased by malicious miner
12 Timestamp dependence Timestamp of block is changed by
malicious miner

Fig. 2 Life-cycle management

123
Arabian Journal for Science and Engineering

Table 3 Typical consensus


Property POW POS PBFT
algorithms comparison
Node identity management Open Open Permissioned
Energy saving No Partial Yes
Tolerated power of adversary < 25% computing power < 52% stake < 33.3% faulty replicas

ferent nodes are consistent. We next present three common Algorithm 3 iPBFT
approaches to reach a consensus in blockchain. Input: Both parties’ transaction information. It contains the identity
Proof of work (POW) is a consensus strategy used in the information of the two parties are key1 , key2 , the type of transaction
commodity denote c, the number of signed nodes is n, the number
Bitcoin network. In PoW, each node of the network is cal- of transactions abbreviated as num, and the transaction time is t;
culating a hash value of the block header. The block header Output: Approval of transaction information or not;
containing a nonce and miners would change the nonce fre- 1: n ← 0
quently to get different hash values. The consensus requires 2: if key1 =key1bu f f er then
3: if key2 =key2bu f f er then
that the calculated value must be equal to or smaller than a 4: if c = cbu f f er && num = num bu f f er && t = tbu f f er then
certain given value. When one node reaches the target value, 5: The transaction information is signed and time stamped by
it would broadcast the block to other nodes and all other the scheduling node.
nodes must mutually confirm the correctness of the hash 6: n ←n+1
7: else
value. If the block is validated, other nodes would append 8: The trading information is not approved and send the trans-
this new block to their own blockchains. This process needs action information and n to the next scheduling nodes.
all nodes involved in; therefore, these works waste too much 9: end if
resources. Proof of stake (POS) is an energy-saving alterna- 10: else
11: The trading information is not approved and send the trans-
tive to PoW. Nodes in PoS have to prove the ownership of action information and n to the next scheduling nodes.
the amount of currency. PoS saves more energy and is more 12: end if
effective compared to PoW. Unfortunately, as the mining cost 13: else
is nearly zero, attacks might come as a consequence. Practical 14: The trading information is not approved either and send the trans-
action information and n to the next scheduling nodes.
byzantine fault tolerance (PBFT) is a replication algorithm 15: end if
to tolerate byzantine faults. A new block is determined in a 16: if n is bigger than or equal to fifty-one percent of the total number
round. In each round, a primary would be selected according of scheduled nodes. then
to some rules. And it is responsible for ordering the transac- 17: The transaction information is recorded into the block and put
the block into blockchain.
tion. The whole process could be divided into three phase: 18: else
pre-prepared, prepared and commit. In each phase, a node 19: The transaction information is considered false.
would enter next phase if it has received votes from over 2/3 20: end if
of all nodes. So PBFT requires that every node is known to
the network. Influenced by the work of Zheng et al. [36], the
comparison of the three consensus algorithms is shown in total nodes (such as 51%), consensus is said to be reached,
Table 3. after which the transaction is recorded in the block and the
It is clear that PBFT is better than POW and POS on block is appended to the blockchain. iPBFT is detailed in
resource-saved and security. However, the number of blocks Algorithm 3, which starts with the submission of the trans-
generated by running the current consensus algorithm cannot action data to scheduling node si .
meet the transaction volume in reality. Therefore, we choose
PBFT for improvement to enhance efficiency.
This paper proposes an improved PBFT (iPBFT) algo- 5 Experiment Platform, Security Analysis
rithm whose underlying principle is using the automatic and Numerical Results
transaction mechanism of the system to verify transaction
information. It can be seen from Fig. 1 that the transaction 5.1 Experiment Platform
is verified by u 1 and u 2 after completion, after which both
of them encrypt and upload the transaction data to the near- The FTSCON, including consortium blockchain, Web server
est scheduling node si , which verifies the information based and client browser, is built by Ethereum architecture. The
on its cache table, signs and timestamps it if the verification Web server is developed by PHP; the client browser page is
is successful, and then sends these data to other scheduling written using HTML/CSS/JavaScript. Consortium blockchain
nodes. If the number of signed nodes is more than half of the is designed to record transaction information, nodes data,
transportation process and time. The optimization of trans-

123
Arabian Journal for Science and Engineering

Fig. 3 Screenshots of FTSCON interface. a Transaction objects. b Block information. c Market page. d Post information

action combinations is made in the consortium blockchain. A Table 4 Experiment environment


Web server is responsible for collecting supply/demand data, Language Solidity and Javascript
block data, real-time in-auction data and nodes feedback data.
The client browser is responsible for friendly display, inter- Sandbox EVM
acting with nodes and collecting nodes transaction intentions Containerization Docker 17.10.0
(see Fig. 3). Hash function SHA-256
Ethereum is a blockchain with built-in Turing-complete
programming language, giving users power to write smart
contracts, decentralized applications where users define their
delays to emulate high latency in mobile networks and con-
own arbitrary rules for ownership, transaction formats and
figure the Linux kernel firewall with Iptables 9 to emulate
state transition functions. Ethereum also has provided tools
churns. We have used Geth v1.6.4 10 for all of our empiri-
for building consortium blockchains [37]. Thus, we have
cal evaluations. Before the actual experimentation, we let the
deployed a Ethereum consortium blockchain residing on
system stabilize for a few hours to obtain appropriate param-
multiple virtual machines running Ubuntu Linux v14.04 in
eters in later runs. To form a fully connected P2P blockchain
an Openstack environment. Each virtual machine is given 1
network, we disabled the auto-discovery feature supported
virtual CPU core, 2 GB of memory and 10 GB of persis-
by Geth and configured the overlay network manually. Other
tent storage to meet the minimum hardware requirement for
implementation environment and cryptographic algorithms
running Ethereum. Elastic search was used to store block-
are shown in Table 4.
related information. The network behavior was monitored
using the Python Web3 Library. All virtual machines are
linked together in a low-latency local network that can be 5.2 Security Analysis of Blockchain
customized on demand. Our setup peers every node using a
single Gigabit Ethernet switch. With this setup, a communi- In order to analyze the security of the system after obtaining
cation round-trip time between every two nodes is less than 1 the consent of the merchant, we collected the transaction data
ms on average. We employ Linux traffic control to introduce of this merchant for the whole month of August 2017. SQL

123
Arabian Journal for Science and Engineering

Fig. 4 Transaction information in blockchain

Sever 2017 was used to combine transaction data in and do


further analysis (Fig. 4).
As shown in the figure, FTSCON can meet the follow-
ing security requirements: 1) Privacy Protection: The use of
scheduling nodes to run the optimal user transaction algo-
rithm requires the user to insert only their public address
when it is broadcast (like f r om and to columns). Private
information is never released, enhancing security. 2) No
reliance on a single external party: The system uses a P2P
system without a central third party to provide a robust and
scalable system. 3) Transaction authentication: With the
iPBFT, transaction data are publicly verified by scheduling
nodes. This eliminates the need for high-powered hardware.
4) Data integrity After the transaction information is put
into the block, it will correspond to a specific block num-
ber (block − N umber ), and the block will be encrypted by a
hash function to generate a unique hash value (blockhash).
The consortium blockchain is decentralized and digitally
Fig. 5 Parameters in smart contract
signed, so malicious nodes cannot corrupt networks using
forged digital signatures or by hijacking system resources.
5) Transaction security and no duplicate transaction: Dig- on the blockchain, which is a distributed digital ledger. The
ital currencies use digital signatures to certify ownership, sequence of transaction information on the blockchain deter-
and transaction information encrypted using a hash function mines the state of each contract and the balance of each
(as transaction H ash column) by scheduling nodes. More- user. Because contracts have an economic value, it is vital
over, the public history prevents duplicate transactions. This to guarantee that their execution is performed correctly. It
secures transactions to a certain extent. also features exceptions, but with a peculiar behavior. When
an exception is thrown, it cannot be caught like the execution
5.3 Security Analysis of Smart Contract stops, the cost is lost, and all the side effects including trans-
fers of ether are reverted. Contracts are made up by fields and
Ethereum is a decentralized virtual machine, which runs functions. A user can invoke a function by sending a suitable
programs (contracts) according to request of users. The transaction to the Ethereum nodes.
Turing-complete bytecode language can write contracts, Contracts can be illustrated through a few examples (see
called EVM bytecode. Roughly, a contract can be seen as Figs. 5, 6 and 7), which implements an open auction. Here, a
a set of functions, each one defined by a sequence of byte- programming language like Javascript called Solidity can be
code instructions. One significant feature of contracts is that used rather than programming it directly as EVM bytecode.
they can transfer ether (a kind of cryptocurrency) from (or Generally, the idea of the auction contract is that everyone
to) users and to other contracts. Users send transaction infor- in bidding process can send their bids during the bidding
mation to the Ethereum network for create new contracts, stage. The bids already include sending money (or ether) for
invoke functions of a contract and transfer ether to contracts binding the bidders to their bid. If the highest bid is raised,
or to other users. All the transaction information is recorded the previously highest bidder gets her money back. After the

123
Arabian Journal for Science and Engineering

withdraw() means withdrawing a bid that was overbid. It is


important to set pending Retur ns[ms − g.sender ] to zero
because the recipient can call this function again as part of
the receiving call before send returns. The auction End() on
behalf of end of the auction and send the highest bid to the
beneficiary. It is a good guideline to structure functions that
interact with other contracts (i.e., they call functions or send
Ether) into three phases as checking conditions, perform-
ing actions (potentially changing conditions) and interacting
with other contracts. If these phases are mixed up, the other
contract could call back into the current contract and mod-
ify the state or cause effects (ether payout) to be performed
multiple times. If functions called internally including inter-
Fig. 6 The bidding function action with external contracts, they also have to be considered
interaction with external contracts.
Since FTSCON introduced the life-cycle management
of smart contracts, it is considered to have significantly
improved in defending against attacks. In order to quan-
tify the risk of being attacked after using the system, the
authors deployed a testnet of 7 VMs: one malicious node
and two groups of victims with similar power of 3 VMs
each. All VMs run go-Ethereum or geth version 1.8.13 and
are connected through a network similar to the above exper-
iment configured with different message latencies to mimic
multiple realistic geographical scales: from almost no delay
(< 1ms) to 250 ms delay. Ethereum was setted overlay so
that each node is connected to one another through a fully
mesh logical topology by manually configured. Each router
employs a daemon that advertises reachability to the adja-
cent networks to its neighbors. By repeating this process,
each router is eventually informed about the location of any
Fig. 7 The withdraw function and the end function
destination network of some nodes. To start the attack, the
malicious node first configures a router under its control to
end of the stage, the contract has to be called manually for the maliciously advertise, to the neighbor routers, nonexisting
beneficiary to receive his (or her) money because contracts direct routes to those two nodes. In this way, the adversary
cannot activate themselves. can launch an attack to blockchain network to steal money
Figure 5 represents a series of parameters used in this or make double payments. Here, the authors compared the
contract. The constr uctor creates a simple auction with probability of successful Ethereum attack with the probabil-
_bid − dingT ime seconds bidding time on behalf of the ity of successful attack after using FTSCON, as shown in
beneficiary address _bene f iciar y. The bid() in Fig. 6 Fig. 8.
is an example which bids on the auction with the value As mentioned in Fig. 8, the two pictures represent the
sent together with this transaction. The value will only be situation of network delay of less than 1 ms and 250 ms,
refunded if the auction is not won. No arguments are nec- respectively, and present the average probability from 70
essary, and all information is already part of the transaction. trials for each attack duration, respectively. In Fig. 8a, the
The keyword payable is required for the function to be able probability of success in attacking Ethereum was slightly
to receive Ether. Revert the call if the bidding stage is over. higher than that of success in attacking FTSCON, with a
The first parameter require represent revert the call if the bid- average percentage of 2.3%. In Fig. 8b, the probability of
ding stage is over, and the second parameter means if the bid success of attacking FTSCON is still higher than that of suc-
is not higher then send the money back, simply calling the cess of attacking Ethereum, with an average percentage of
highest Bidder. Sending (highest Bid) function directly to 2.1%. As a result, FTSCON has significantly improved in
sending back the money is a security risk because it is possi- safety.
ble to execute an untrusted contract. It is always safer to let
the recipients to withdraw their money themselves. In Fig. 7,

123
Arabian Journal for Science and Engineering

Fig. 8 Attack success rate with hijacking in two different systems

5.4 Experiment Results and Discussion

1) Efficiency of Algorithm

To validate our model, we emulated a transaction process-


ing scenario by issuing transactions at 1 tps (overall rate)
from multiple clients to randomly selected addresses. We
sort information timestamps in ascending order. To obtain
optimizing time of transaction objects, we record the times-
tamp upon initiation of a algorithm and extract the inclusion
timestamp from the transaction receipt. Here, four algorithms
were used for the comparison of execution time: the proposed
algorithm and the backtracking algorithm, branch-and-bound
algorithm and genetic algorithm, the last of which is the most
commonly used. Large-scale real information of transaction
is not readily available, and small-scale data cannot provide Fig. 9 Time analysis of algorithms with increasing datasets
satisfactory results. Here, we also used dataset that derived
from user-shared data [38,39] (about 10,000 test cases) and
that used by Kulkarni et al. in their study [40] (twenty distinct
test cases). These experimental datasets include the volume times. The average value will be finally calculated (Fig. 10a).
of each item and its corresponding value, and the capacity of The results of the proposed algorithm are processed as piece-
the backpack also can be used for experiment. wise functions for better analysis. Other results are processed
The running time of the algorithm can reflect the effi- as points of different shapes (Fig. 10b).
ciency of the algorithm. Here, each algorithm was ran in 50, Figure 9 makes it clear that the proposed algorithm is
100, 150 , 250 and 500 groups of data, respectively, and each faster than the branch-and-bound algorithm and backtrack-
algorithm ran 1000 times using every set of data. Due to the ing algorithm. However, the genetic algorithm is still faster
large amount of data, the difference between the results of than the proposed one. From Fig. 10a, b, it is clear that the
the algorithms is too large to better analyze. Therefore, we backtracking algorithm performs similarly to the proposed
have reduced the amount of data to 10 numbers based on the algorithm, only slightly lower (0.137%), and the branch-
original image (Fig. 9). Comparing the value after the algo- and-bound algorithm has results identical to the proposed
rithms, run is another criterion for efficiency measurement. algorithm. When it comes to the genetic algorithm, the dif-
And here, we run each algorithm using the same dataset as ference is small for a small dataset like 50, 100, 150 (1.358%,
the experiment of running time and run the same number of still significant), but for large datasets as 250, 500, the per-

123
Arabian Journal for Science and Engineering

Fig. 10 Value results from running algorithms

formance is significantly lower (up to 4.764% compared to


the proposed algorithm).
After the comprehensive analysis of the above results,
although the first experiment shows that the time of the
genetic algorithm is faster than the proposed algorithm, but
in the second experiment, the difference between the genetic
algorithm and the proposed algorithm in the selection of value
become larger and larger with the increase in the dataset. In
the actual situation, the criteria for measuring system are not
limited to time, and the most important factor is the value.
Therefore, it is more reasonable to use the proposed algo-
rithm.

2) Efficiency of the System

After the development of the system, a small case study was Fig. 11 Quarter-wise profits with and without FTSCON
performed on data that were obtained from one of the partners
that collaborated within the project FTSCON. Our case study
was performed on profits data, collected by Web servers. results that were able to provide reliable data from the Web
FTSCON functionalities illustrate the systems use and pro- server.
vide examples of the obtained results, thus, to serve as a It can be seen that January losses were higher using the
proof of concept. The data include profits on 300 enterprises existing trading model, and the February profit was lower
in Shandong province between January 2014 and Decem- as well. March onwards, the profit curve using the proposed
ber 2017. Each data include a description of the location system rose, with a higher monthly profit than the traditional
(region, spatial coordinates and location type), a description system. Even in months with a declining trend, such as July,
of the device (model and device id), the timestamp of the September, October and December, the proposed method
transaction, the count of transaction products and the type of provided better profits than the existing one. Thus, we draw
transaction products species. Additionally, the project ana- a conclusion that site selection is one of the most impor-
lysts also calculated the profit outcomes due to the use of tant decisions for the establishment of a enterprise operation.
FTSCON functionalities. Within the analyses, the data from The production location influences the competitiveness of
the first years of the FTSCON use (2017) were compared the farm and enterprise by conditioning environmental and
to the average data of 3 years with preceding the integration economic factors. The influence of environmental factors on
FTSCON (2014–2016). Figure 11 displays the comparison crop growth has implications for the time required to reach

123
Arabian Journal for Science and Engineering

the desired commercial size and therefore for the costs asso- 4. Treleaven, P.; Brown, R.G.; Yang, D.: Blockchain technology in
ciated with the cultivation process. The most investigated finance. Computer 50, 14–17 (2017)
5. Zhang, J.; Xue, N.; Huang, X.: A secure system for pervasive social
factor is transaction strategies, which is the characteristics network-based healthcare. IEEE Access 4, 9239–9250 (2016)
that have the greatest influence on food trade rate. In addition 6. Zhang P.; Schmidt D.C.; White J.; Lenz G. : Blockchain Technol-
to these factors, food transactions are also affected by sea- ogy Use Cases in Healthcare (2018). https://www.dre.vanderbilt.
sonal factors. Moreover, FTSCON can also help merchants edu/~schmidt/PDF/blockchain-bookchapter-2018.pdf
7. Basden, J.; Cottrell, M.: How utilities are using blockchain to mod-
to destock and eliminate deficits. ernize the grid. Harv. Bus. Rev. 3, 1–3 (2017)
Based on these experiments, FTSCON outperforms tradi- 8. Spielman, A.: Blockchain: digitally rebuilding the real estate indus-
tional ones in terms of runtime, value selection and merchant try. Mass. Inst. Technol. (2016). https://dspace.mit.edu/bitstream/
profits. handle/1721.1/106753/969450770-MIT.pdf?sequence=1
9. Ølnes, S.: Beyond bitcoin enabling smart government using
blockchain technology. In: International Conference on Electronic
Government and the Information Systems Perspective, pp. 253–
264. Springer, Cham (2016)
6 Conclusion 10. Lai, K.: DEAL: first agricultural commodity blockchain transac-
tion. Int. Financ. Law Rev. (2018)
This paper proposed an automatic merchant transaction 11. Ruijs, A.; Schweigman, C.; Lutz, C.: The impact of transport-and
mechanism. The consortium blockchain model was lever- transaction-cost reductions on food markets in developing coun-
tries: evidence for tempered expectations for Burkina Faso. Agric.
aged to design an automated transaction system, where food Econ. 31(2–3), 219–228 (2004)
can be traded independent of a trusted third party. FTSCON 12. Yu, L.L.; Cheng, Z.: Application of electron spin resonance (ESR)
maximizes merchant profits. A security analysis revealed that spectrometry in nutraceutical and food research. Mol. Nutr. Food
the proposed method improves the security and privacy of Res. 52(1), 62–78 (2008)
13. Bibi, F.; Guillaume, C.; Gontard, N.; Sorli, B.: A review: RFID
the transaction. A numerical analysis confirmed the efficacy technology having sensing aptitudes for food industry and their
of the system in maximizing merchant profit quickly and at contribution to tracking and monitoring of food products. Trends
low computational cost. Of note is that the underlying con- Food Sci. Technol. 62, 91–103 (2017)
cept of blockchain technology still presents problems with 14. Kumari, L.; Narsaiah, K.; Grewal, M.K.; Anurag, R.K.: Application
of RFID in agri-food sector. Trends Food Sci. Technol. 43, 144–161
respect to computational resources, transaction cost, block (2015)
speed and scalability. Furthermore, different merchants with 15. Da Xu, L.; He, W.; Li, S.: Internet of things in industries: a survey.
the same type of supply may be in competition, and we use IEEE Trans. Ind. Inform. 10, 2233–2243 (2014)
the online double auction mechanism to eliminate it. The 16. Li, Z.; Liu, G.; Liu, L.; Lai, X.; Xu, G.: IoT-based tracking and
tracing platform for prepackaged food supply chain. Ind. Manag.
technological evaluation of the blockchain still needs to be Data Syst. 117, 1906–1916 (2017)
conducted in terms of computational resources, transaction 17. Pang, Z.; Chen, Q.; Han, W.; Zheng, L.: Value-centric design of the
costs, block speeds and scalability. This will be the next internet-of-things solution for food supply chain: value creation,
step of our work. Additionally, as computational costs of sensor portfolio and information fusion. Inf. Syst. Front. 17, 289–
319 (2015)
the on-chain matching algorithm depend on the number of 18. Khan, M.; Salah, K.: IoT security: review. blockchain solutions,
supply and demand information and cannot be determined and open challenges. J. Future Gener. Comput. Syst. Elsevier 82,
in advance, a fair mechanism for the allocation of these cost 395–411 (2018)
has to be determined. 19. Omran, Y.; Henke, M.; Heines, R.; Hofmann, E.: Blockchain-
driven supply chain finance: towards a conceptual framework
from a buyer perspective (2017). https://www.alexandria.unisg.
Acknowledgements We warmly thank for the support and funding by
ch/251095/1/WP29-Blockchain-driven%20supply%20chain
the research projects of The Social Science and Humanity on Young
%20finance%20Towards%20a%20conceptual%20framework
Fund of the ministry of Education (17YJCZH127) and the Fund of the
%20from%20a%20buyer%20perspective.pdf
social science and Nature Science of Beijing Technology and Business
20. Benos, E.; Garratt, R.; Gurrola-Perez, P.: The economics of dis-
University (LKJJ2017-13).
tributed ledger technology for securities settlement (2017). https://
doi.org/10.2139/ssrn.3023272
21. Bhowmik, D.; Feng, T.: The multimedia blockchain: a distributed
and tamper-proof media transaction framework. In: 2017 22nd
References International Conference on Digital Signal Processing (DSP), pp.
1–5. IEEE (2017)
1. Falkowski, J.; Menard, C.; Sexton, R.J.; Swinnen, J.; Vandevelde, 22. Sikorski, J.J.; Haughton, J.; Kraft, M.: Blockchain technology in the
S.: Unfair Trading Practices in the Food Supply Chain: A Literature chemical industry: machine-to-machine electricity market. Appl.
Review on Methodologies, Impacts and Regulatory Aspects (No. Energy 195, 234–246 (2017)
JRC108394). Joint Research Centre, Seville (2017) 23. Hasan, H.R.; Salah, K.: Blockchain-based solution for proof
2. Rommerskirchen, C.: Fiscal rules, fiscal outcomes and financial of delivery of physical assets. In: International Conference on
market behaviour. Eur. J. Polit. Res. 54, 836–847 (2015) Blockchain, pp. 139–152. Springer, Cham (2018)
3. Song, D.H.; Son, C.Y.: Mismanagement of personally identifiable 24. Tian, F.: A supply chain traceability system for food safety based
information and the reaction of interested parties to safeguarding on HACCP, blockchain & internet of things. In: 2017 Interna-
privacy in South Korea. Inf. Res. 22, 1–16 (2017)

123
Arabian Journal for Science and Engineering

tional Conference on Service Systems and Service Management 33. Jing, F.; Peiji, S.; Xiaoping, Y.: Incomplete information game simu-
(ICSSSM), pp. 1–6. IEEE (2017) lation research in online dual auction. J. Manag. 3, 673–676 (2006)
25. Karajovic, M.; Kim, H.M.; Laskowski, M.: Thinking Outside the 34. Atzei, N.; Bartoletti, M.; Cimoli, T.: A survey of attacks on
Block: Projected Phases of Blockchain Integration in the Account- ethereum smart contracts (sok). In: Maffei, M., Ryan, M. (eds.)
ing Industry (2017). https://doi.org/10.2139/ssrn.2984126 Principles of Security and Trust, pp. 164–186. Springer, Berlin
26. Ibáñez, L.D.; Simperl, E.; Gandon, F.; Story, H.: Redecentraliz- (2017)
ing the web with distributed ledgers. IEEE Intell. Syst. 32, 92–95 35. Dai, P.; Mahi, N.; Earls, J.; Norta, A.: Smart-contract
(2017) value-transfer protocols on a distributed mobile applica-
27. Tse, D.; Zhang, B.; Yang, Y.; Cheng, C.; Mu, H.: Blockchain tion platform. https://cryptorating.eu/whitepapers/Qtum/
application in food supply information security. In: 2017 IEEE a2772efe4dc8ed1100319c6480195fb1.pdf (2017)
International Conference on Industrial Engineering and Engineer- 36. Zheng, Z.; Xie, S.; Dai, H.; Chen, X.; Wang, H.: An overview of
ing Management (IEEM), pp. 1357–1361. IEEE (2017) blockchain technology: architecture, consensus, and future trends.
28. Tian, F.: An agri-food supply chain traceability system for China In: 2017 IEEE International Congress on Big Data (BigData
based on RFID & blockchain technology. In: 2016 13th Interna- Congress), pp. 557–564. IEEE (2017)
tional Conference on Service Systems and Service Management 37. Consortium chain development. https://github.com/ethereum/
(ICSSSM), pp. 1–6. IEEE (2016) wiki/wiki/Consortium-Chain-Development. Accessed 19 Jul 2016
29. Xiaokun, W.: Study on the method of calculating the time value of 38. Data for the 01 Knapsack Problem. https://people.sc.fsu.edu/
freight transport. Traffic Stand. 11, 138–141 (2008) ~jburkardt/datasets/knapsack_01/knapsack_01 (2014)
30. Delipetrev, B.; Jonoski, A.; Solomatine, D.P.: A novel nested 39. The test data of 0-1 knapsack problem. https://wenku.baidu.com/
dynamic programming (nDP) algorithm for multipurpose reservoir view/7042b877a8956bec0975e3f4.html?from=search (2013)
optimization. J. Hydroinformatics 17, 570–583 (2015) 40. Kulkarni, A.J.; Shabir, H.: Solving 0C1 knapsack problem using
31. Facci, A.L.; Andreassi, L.; Ubertini, S.: Optimization of CHCP cohort intelligence algorithm. Int. J. Mach. Learn. Cybern. 7, 427–
(combined heat power and cooling) systems operation strategy 441 (2016)
using dynamic programming. Energy 66, 387–400 (2014)
32. Shen, C.C.; Chiou, J.S.; Kuo, B.S.: Remedies for information asym-
metry in online transaction: an investigation into the impact of web
page signals on auction outcome. Internet Res. 21, 154–170 (2011)

123

You might also like