Security Enhancement in Smart Logistics with Blockchain Technology: A Home Delivery Use Case
Abstract
:1. Introductions
- Framework design of the distributed application to prevent the nonrepudiation problem, tracing the activity.
- A smart contract for monitoring the B2C logistics.
- The performance analysis of the blockchain-based application in terms of transaction fee (gas use analysis) and response time.
2. Background and Related Work
2.1. Smart Logistics and Home Delivery
2.2. Blockchain Technology
2.3. Ethereum Network
2.4. Transaction Fee
- Users define gasLimit and gasPrice in creating transactions. The gasPrice is the cost for each step of the execution, and gasLimit is the maximum gas in the transaction.
- Ethereum calls the feeMax (gasPrice x gasLimit) from a sender and broadcasts an execution required to all nodes when a transaction is sent. The transaction will be waiting in the transaction pool.
- The miner node gets the transaction from the transaction pool and runs it. The node prioritizes the requirements by feeMax and gets the highest reward.
- The gasUsed is computed and accumulated at each stage of processing. Simultaneously, the EVM verifies that gasUsed is less than feeMax. If this is the case, execution continues until completion, and the excess gas (feeMax–gasUsed) is returned to the sender. If not, the execution is stopped, and a gasLimit exceeded exception is thrown.
2.5. Related Work
- Business: Comparing business-to-business (B2B) and business-to-customer (B2C). The characteristics of each business are different: the size of the business, the complexity of the process, or the requirements. Home delivery, our use case, is business-to-customer.
- Requirement: The key requirements of smart logistics are traceability and reliability.
- Security: These are the objectives the framework needs to protect, such as confidentiality, integrity, and nonrepudiation.
- Approach: The security mechanism and other techniques that support the main requirements of smart logistics. Some previous studies have applied the Internet of Things and machine learning to increase reliability.
- Platform: The blockchain network that is the private blockchain (Hyperledger Fabric) and public blockchain (Ethereum).
- Performance: The performance metrics. Some related studies are evaluated in terms of the function and quality of the product. Most previous studies discuss the response time and latency. However, the transaction fee is an important issue that needs to be discussed.
3. The Home Delivery Use Case and Its Security Issues
3.1. The Home Delivery Use Case
3.2. The Security Flaws
- Fake location: The customer sets a fake location to reduce the service charge because the service charge depends on the distance between the customer and the shop. If the customer then changes their location to the other point, it increases the rider’s costs. The platform should set a new service charge policy for real-time service charge calculation.
- Mistaken items: When the customer receives the product, it is found that there is a mistake in the number or type of food items. The issue has several vulnerabilities, such as the restaurant arranging food that does not match the items that have been ordered. If they change some options, the customer should be informed directly or through the system. The shipper should verify the quantity and food items before shipping. This process ensures transparency between the store and the shipper.
- Fake orders: The no-show of the recipient may have been caused by a fake order. The system allows the order to be for another recipient. This problem often occurs with cash-on-delivery orders. All responsibility falls on delivery because the sender has paid in advance. In other cases, the employee cannot contact the recipient, resulting in the inability to send the item.
- Lost package: Some buildings have a mechanism that allows items to be placed in a common area to allow for social distancing, resulting in the loss of packages because the recipient did not receive the package, or the package was not actually delivered to the recipient. The status in the system states that the delivery is complete. However, the items did not actually reach the recipient due to this phenomenon.
- Fraud fee: The system is centralized and closed to the platform owner. The store and delivery staff are not authorized to access or inspect the contents. Only the owner of the platform can manage the data. The transport staff and the restaurant were skeptical of the controversies in the news and the social networks in Thailand.
4. The Proposed Framework
4.1. Secured Home Delivery Model
- -
- iσis a unique and readable identifier forσ.
- -
- ωσ ∈ Ψ is a unique wallet represented by 40 hexadecimals.
- -
- desc is a stakeholder’s information, represented in textual or binary encoding with varying data length.
- -
- roles ( = {α, β, χ}) is any person in the stakeholder set. For the food delivery platform, the stakeholders are restaurant (α) as a producer, customer (β), and rider (χ) as a distributor.
- -
- Ψο is the set of three stakeholders’ wallets involved in an order. Let Ψο = {ωα, ωβ, ωχ} represent the stakeholders of the order ο. Thus, ωα, ωβ and ωχ represent the wallet of the producer, customer, and distributor, respectively.
- -
- τ is a set of timestamps indicating the response time and order list for each method in SCM. τ = {tm, m ∈ ς}.
- -
- desc is the description of the product or parcel and its status, such as the menu and drink items for the food delivery system, or the details of the parcel.
- -
- status indicates whether an order was successful or what state it is in.
4.2. System Architecture
- Customer: The customer starts the transaction by selecting the order retrieved from the home delivery platform. After that, they confirm the order and specify the payment method (cash or credit card). Finally, the customer confirms the order when they meet and receive the product from the distributor.
- Producer or Restaurant: The role of the restaurant is to accept the order and wait for the rider to accept the order. On the other hand, the restaurant can reject the order if they cannot cook the order to meet the contract. Moreover, they need to confirm the order and submit the product to the rider when it is ready.
- Distributor: Firstly, the rider accepts the order. Then, they pick up the product and send it to the customer. In addition, the rider terminates the transaction when the product is delivered to the customer.
4.3. Software Functions
Algorithm 1 Add new order to blockchain |
Let Ψ and Ψο be the wallet address of the stakeholder |
τ is the set of state’s timestamps |
Θ is the order list in blockchain |
Input: |
ωα, ωβ, desc |
Step: |
Ψο ← ∅ |
ωχ, status = 0x0 |
∀t∈τ [τ (t) ← 0] |
if ωα ∉ Ψ ∨ ωβ ∉ Ψ then |
return |
Ψο = Ψο ∪ {ωα, ωβ, ωχ } |
push <Ψο, τ, desc, status> to Θ |
Algorithm 2. Update status and timestamp by ID |
Let Ψ be the wallet address of the stakeholder
τ is the set of state’s timestamps ς is the set of contract methods Input: id: the order id m ∈ ς ω ∈ Ψ is any stakeholder newStatus Step: <Ψο, τ, desc, status> = findOrderByID(id) if ω ∉ Ψ ∧ ω ∉ Ψο then return status = status | newStatus τ(m) = getTimestamp() |
5. The Experimental Setup
5.1. Testbed and Scenarios
5.2. Performance Metrics
- -
- Transaction cost: The transaction fee or gasUsed was the cost of a blockchain transaction. Each function consumes a different cost depending on the coding style and data length. The actual cost was the gasPrice multiplied by the gasUsed. For this experiment, the gasPrice was 3 GWei. Thus, the actual cost was 3 GWei multiplied by the gasUsed in Table 3.
- -
- Response Time (RT): We focused on the response time of each function. The overall response time was the sum of latency in the calling function (tf) and the processing time in the smart contract method. Algorithms 1 and 2 consist of three parts: time_of_validate (tv), time_of_set (ts), time_of_add (ta), and other_time (to). The time_of_validate is in the parameter’s validation state. Then, the status or any parameters are updated in the time_of_set state and closed with the time_of_add state that updates the new transaction in the Order List. Moreover, the other_time is the additional time when the smart contract method needs to execute the helping method. Hence, .
6. Results and Discussion
6.1. Performance Issues: Gas Used
6.2. Performance Issues: Response Time
6.3. Security Issues and Policy
- The mistaken item problem is eliminated because the producer declares the items to the distributor. Then, the distributor confirms the type and number of items via our framework and notifies the customer as an alert message. This includes the details of the order to double-check the correctness.
- The package loss problem is prevented because the distributor confirms the item’s correctness in the face of the producer. In addition, the customer verifies the items after receiving the order and confirming it with the distributor. The additional technique is taking a photo as evidence in case an item is lost. The IPFS technology is a tool for securing media files.
- The problem of fake orders or locations will be eliminated when cashless payment is used in this service. Payment with a credit card guarantees that fake order and location events are prevented. Moreover, blockchain technology introduces the coins or coupons of the business. The service creates a secured coin or coupon to reduce the cash for the promotion or campaign. Moreover, the coin will support the transaction fee payment between the producer, distributor, and platform. Moreover, the cashless method will reduce the fraud fee because nobody touches money in the system. In addition, all the transactions are recorded and monitored by the miner nodes in the blockchain network.
6.4. Limitations
6.5. Open Issues
7. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Issaoui, Y.; Khiat, A.; Bahnasse, A.; Ouajji, H. Smart logistics: Study of the application of blockchain technology. Procedia Comput. Sci. 2019, 160, 266–271. [Google Scholar] [CrossRef]
- Bodkhe, U.; Tanwar, S.; Parekh, K.; Khanpara, P.; Tyagi, S.; Kumar, N.; Alazab, M. Blockchain for Industry 4.0: A Comprehensive Review. IEEE Access 2020, 8, 79764–79800. [Google Scholar] [CrossRef]
- Tijan, E.; Aksentijević, S.; Ivanić, K.; Jardas, M. Blockchain Technology Implementation in Logistics. Sustainability 2019, 11, 1185. [Google Scholar] [CrossRef]
- Casado-Vara, R.; González-Briones, A.; Prieto, J.; Corchado, J.M. Smart Contract for Monitoring and Control of Logistics Activities. Pharm. Util. Case Study 2018, 771, 509–517. [Google Scholar] [CrossRef]
- Hackius, N.; Petersen, M. Blockchain in logistics and supply chain: Trick or treat? Reinf. Plast. 2017, 23, 3–18. [Google Scholar] [CrossRef]
- Chen, Y.; Chen, H.; Zhang, Y.; Han, M.; Siddula, M.; Cai, Z. A survey on blockchain systems: Attacks, defenses, and privacy preservation. High-Confid. Comput. 2022, 2, 100048. [Google Scholar] [CrossRef]
- Balamurugan, S.; Ayyasamy, A.; Joseph, K.S. IoT-Blockchain driven traceability techniques for improved safety measures in food supply chain. Int. J. Inf. Technol. 2022, 14, 1087–1098. [Google Scholar] [CrossRef]
- Helo, P.; Hao, Y. Blockchains in operations and supply chains: A model and reference implementation. Comput. Ind. Eng. 2019, 136, 242–251. [Google Scholar] [CrossRef]
- George, R.V.; Harsh, H.O.; Ray, P.; Babu, A.K. Food quality traceability prototype for restaurants using blockchain and food quality data index. J. Clean. Prod. 2019, 240, 118021. [Google Scholar] [CrossRef]
- Wang, L.; He, Y.; Wu, Z. Design of a Blockchain-Enabled Traceability System Framework for Food Supply Chains. Foods 2022, 11, 744. [Google Scholar] [CrossRef]
- van Duin, R.; de Goffau, W.; Wiegmans, B.; Tavasszy, L.; Saes, M. Improving Home Delivery Efficiency by Using Principles of Address Intelligence for B2C Deliveries. Transp. Res. Procedia 2016, 12, 14–25. [Google Scholar] [CrossRef]
- Nakamoto, S. Bitcoin: A Peer-to-Peer Electronic Cash System. 2009, pp. 1–9. Available online: https://www.researchgate.net/publication/228640975_Bitcoin_A_Peer-to-Peer_Electronic_Cash_System (accessed on 16 April 2022).
- Sousa, J.E.D.A.; Oliveira, V.; Valadares, J.; Gonçalves, G.D.; Villela, S.M.; Bernardino, H.S.; Vieira, A.B. An analysis of the fees and pending time correlation in Ethereum. Int. J. Netw. Manag. 2021, 31, e2113. [Google Scholar] [CrossRef]
- Hewa, T.; Ylianttila, M.; Liyanage, M. Survey on blockchain based smart contracts: Applications, opportunities, and challenges. J. Netw. Comput. Appl. 2021, 177, 102857. [Google Scholar] [CrossRef]
- Li, X.; Lv, F.; Xiang, F.; Sun, Z.; Sun, Z. Research on Key Technologies of Logistics Information Traceability Model Based on Consortium Chain. IEEE Access 2020, 8, 69754–69762. [Google Scholar] [CrossRef]
- Daniel, D.; Speranza, C.I. The Role of Blockchain in Documenting Land Users’ Rights: The Canonical Case of Farmers in the Vernacular Land Market. Front. Blockchain 2020, 3, 19. [Google Scholar] [CrossRef]
- César, H.; García, E. Blockchain Innovation Technology for Corruption Decrease in Mexico. Asian J. Innov. Policy 2021, 10, 177–194. [Google Scholar] [CrossRef]
- Gatteschi, V.; Lamberti, F.; Demartini, C.; Pranteda, C.; Santamaría, V. Blockchain and Smart Contracts for Insurance: Is the Technology Mature Enough? Futur. Internet 2018, 10, 20. [Google Scholar] [CrossRef]
- Dehghani, M.; Mashatan, A.; Kennedy, R.W. Innovation within networks–patent strategies for blockchain technology. J. Bus. Ind. Mark. 2021, 36, 2113–2125. [Google Scholar] [CrossRef]
- Hu, B.; Zhang, Z.; Liu, J.; Liu, Y.; Yin, J.; Lu, R.; Lin, X. A comprehensive survey on smart contract construction and execution: Paradigms, tools, and systems. Patterns 2021, 2, 100179. [Google Scholar] [CrossRef]
- Karode, T.; Werapun, W. Performance Analysis of Trustworthy Online Review System using Blockchain. In Proceedings of the 17th International Conference on Electrical Engineering/Electronics, Computer, Telecommunications and Information Technology, ECTI-CON, Phuket, Thailand, 24–27 June 2020; pp. 510–513. [Google Scholar] [CrossRef]
- Wood, G. Ethereum: A Secure Decentralized Generalized Transaction Ledger. Ethereum Proj. Yellow Paper 2014, 151, 1–32. [Google Scholar]
- Donmez, A.; Karaivanov, A. Transaction fee economics in the Ethereum blockchain. Econ. Inq. 2022, 60, 265–292. [Google Scholar] [CrossRef]
- Zhang, L.; Kim, D. A Peer-to-Peer Smart Food Delivery Platform Based on Smart Contract. Electronics 2022, 11, 1806. [Google Scholar] [CrossRef]
- Markovic, M.; Jacobs, N.; Dryja, K.; Edwards, P.; Strachan, N.J.C. Integrating Internet of Things, Provenance, and Blockchain to Enhance Trust in Last Mile Food Deliveries. Front. Sustain. Food Syst. 2020, 4, 226. [Google Scholar] [CrossRef]
- Casino, F.; Kanakaris, V.; Dasaklis, T.K.; Moschuris, S.; Stachtiaris, S.; Pagoni, M.; Rachaniotis, N.P. Blockchain-based food supply chain traceability: A case study in the dairy sector. Int. J. Prod. Res. 2020, 59, 5758–5770. [Google Scholar] [CrossRef]
- Pierro, G.A.; Rocha, H. The Influence Factors on Ethereum Transaction Fees. In Proceedings of the 2019 IEEE/ACM 2nd International Workshop on Emerging Trends in Software Engineering for Blockchain, WETSEB, Montreal, QC, Canada, 27 May 2019; pp. 24–31. [Google Scholar] [CrossRef]
- Li, J.; Yuan, Y.; Wang, F.-Y. Analyzing Bitcoin transaction fees using a queueing game model. Electron. Commer. Res. 2020, 22, 135–155. [Google Scholar] [CrossRef]
- Roughgarden, T. Transaction Fee Mechanism Design. ACM SIGecom Exch. 2021, 19, 52–55. [Google Scholar] [CrossRef]
- Laurent, A.; Brotcorne, L.; Fortz, B. Transaction fees optimization in the Ethereum blockchain. Blockchain Res. Appl. 2022, 3, 100074. [Google Scholar] [CrossRef]
- Aldweesh, A.; Alharby, M.; Mehrnezhad, M.; van Moorsel, A. The OpBench Ethereum opcode benchmark framework: Design, implementation, validation and experiments. Perform. Eval. 2021, 146, 102168. [Google Scholar] [CrossRef]
- Arslan, S.S.; Goker, T. Compress-store on blockchain: A decentralized data processing and immutable storage for multimedia streaming. Clust. Comput. 2019, 25, 1957–1968. [Google Scholar] [CrossRef]
- Jayasankar, U.; Thirumal, V.; Ponnurangam, D. A survey on data compression techniques: From the perspective of data quality, coding schemes, data type and applications. J. King Saud Univ.–Comput. Inf. Sci. 2021, 33, 119–140. [Google Scholar] [CrossRef]
Key Feature | [7] | [10] | [24] | [25] | [26] | Our Approach | |
---|---|---|---|---|---|---|---|
Business | B2B | B2B | B2C | B2B | B2B | B2C | |
Requirement | Reliability | ✓ | ✓ | ✓ | ✓ | ||
Traceability | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
Security | Confidentiality | ✓ | ✓ | ✓ | ✓ | ||
Integrity | ✓ | ✓ | ✓ | ✓ | |||
Nonrepudiation | ✓ | ✓ | ✓ | ✓ | |||
Approach | Private Blockchain | ✓ | ✓ | ||||
Public Blockchain | ✓ | ✓ | |||||
IoT Based | ✓ | ✓ | ✓ | ✓ | |||
AI/Machine Leaning | ✓ | ||||||
Platform | Ethereum | ✓ | ✓ | ||||
Hyperledger Fabric | ✓ | ✓ | |||||
N/A | ✓ | ✓ | |||||
Performance | Functionality | ✓ | ✓ | ||||
Transaction Fee | ✓ | ||||||
Time | ✓ | ✓ | ✓ | ✓ | |||
Quality of Product | ✓ | ✓ |
Method/Short Name | Parameters | Caller | Description |
---|---|---|---|
addOrder()/ao | ωα, ωβ, desc, tao | Customer | This method adds the transaction to the blockchain network. All parameters are initiated with 0 except ωα, ωβ, desc, and tao as the parameters. The transaction will be created in a secured block and linked with the other blocks in the blockchain. |
acceptByDistibutor()/ad, | ωχ, tad | Distributor | When the distributor receives the new notification message from the application, the distributor calls the function to accept this task. The ωχ, tad, and status are updated in the smart contract. |
acceptByProducer()/ap | tab | Producer | The producer accepts the order when there is a distributor accepting the order. The timestamp, tap, and status of the transaction will be updated. |
ItemsReady()/ir | tir | Producer | This method sends a message to the distributor that the items are ready to pick up. This function updates the value of tir. |
pickupByDistributor()/pd | tpd | Distributor | After the distributor checks the order is correct, s/he picks up the product and confirms the order. The tpd is updated as evidence to guarantee the order. |
acceptByCustomer()/ac | tac | Customer | When the customer has checked and accepted the order, this method sets the tod and changes the status to accept. |
closeOrder()/co | tco | Distributor | The distributor is the last person who closes the order when all operations are completed. The tcd is stamped to log the transaction. |
Function | Gas Used (Unit) | Response Time (ms) | ||
---|---|---|---|---|
Average | s.d. | Average | s.d. | |
addOrder() | 760,081.47 | 235,824.27 | 2431.66 | 759.93 |
acceptByProducer() | 194,401.32 | 73,442.89 | 406.97 | 44.40 |
acceptByDistributor() | 194,687.32 | 73,442.89 | 387.42 | 51.63 |
ItemReady() | 173,463.32 | 73,442.89 | 319.71 | 47.85 |
pickupByDistributor() | 173,486.32 | 73,442.89 | 325.93 | 45.14 |
acceptByCustomer() | 173,487.32 | 73,442.89 | 381.32 | 45.55 |
closeOrder() | 194,733.32 | 73,442.89 | 328.98 | 60.25 |
Overall | 1,864,340.41 | 447,259.27 | 4582.00 | 758.43 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Chukleang, T.; Jandaeng, C. Security Enhancement in Smart Logistics with Blockchain Technology: A Home Delivery Use Case. Informatics 2022, 9, 70. https://doi.org/10.3390/informatics9030070
Chukleang T, Jandaeng C. Security Enhancement in Smart Logistics with Blockchain Technology: A Home Delivery Use Case. Informatics. 2022; 9(3):70. https://doi.org/10.3390/informatics9030070
Chicago/Turabian StyleChukleang, Tirajet, and Chanankorn Jandaeng. 2022. "Security Enhancement in Smart Logistics with Blockchain Technology: A Home Delivery Use Case" Informatics 9, no. 3: 70. https://doi.org/10.3390/informatics9030070
APA StyleChukleang, T., & Jandaeng, C. (2022). Security Enhancement in Smart Logistics with Blockchain Technology: A Home Delivery Use Case. Informatics, 9(3), 70. https://doi.org/10.3390/informatics9030070