Fake Product Detection On Blockchain
Fake Product Detection On Blockchain
Abstract: From past couple of years, Counterfeit products are having a massive impact in manufacturing industries. This
is affecting companies name, sales, and profit. Innovation in blockchain have acquired interest in the course recently. The
most important issue about this is currency exchange, but its application is not restricted to only Digital currency. This
technology has the potential to influence different business sectors. Blockchain has brought high transparency and ease
in the way transaction are dealt. Blockchain technology identifies real product from fake ones. Blockchain is a distributed,
decentralized, and digital ledger that stores transaction related information in the form of blocks in the databases which
is connected in chains. Blockchain technology is secure and the blocks cannot be changed or easily hacked. By using this
technology, customers or users need not rely on third party services for the safety of the product.
In proposed system, we will be using Quick Response (QR) code to provide robust technique to try and stop the practice
of counterfeiting the products. Fake products can be detected using a Quick Response scanner, where a QR code attached
to the product is linked to the Blockchain network. Now, this concept might be used to store the data like product details
and generated unique code for that product as blocks to the database of Blockchain. When the user uploads the unique
code and the code is compared to the Blockchain database. If the code matches the code that was generated during the
manufacturer, it will notify the customer saying the QR code is matched otherwise it will notify the customer that QR
code is not matched and the product is fake.
Keywords: — Blockchain, Smart Contracts, Quick Response Code, SHA 256 algorithm.
I. INTRODUCTION
The development of a product or any technology involves risk factors like counterfeiting of that product, this could well
lead to affecting company’s name, fame and the overall growth. In today’s market, the challenging thing is to identify
fake product from real ones. It could be life threatening if the counterfeiting takes place in medicinal field. Counterfeiting
the products in the industries like clothing, electronic equipment’s can have a negative impact on company’s brand value.
E-commerce is expected to grow from $40 billion in 2017 to $220 billion by 2026. Launching applications of these E-
commerce websites in cell phones lead to the rise. Rise in counterfeit product could affect the economic growth. After
conducting few surveys, the data reveals the increase in counterfeit product. Because of this many companies are getting
negative remarks and losing their status from the brand list. Counterfeit products are similar to the real ones in the E-
commerce market. In supply chain many products exist. Counterfeiting leads to huge loss to the manufacturers as well as
the customers. We can use the Blockchain technology to find genuineness of the product.
It is very difficult to change or alter the framework where the information is recorded. A blockchain is a computerized
record of all the transactions that is distributed across the entire network of systems on the blockchain. Every participant’s
record will have the information about all the transactions and if a new transaction occurs every time the details about
that transaction is added to the blockchain network. Distributed Ledger Technology (DLT) is where the decentralized
database is managed by the system in the blockchain. Hash address is a type of cryptographic signature that are generated
when the transactions are taking place.
Counterfeiting of a product can be stopped using Blockchain technology. This system is very secure. The system contains
four important things i.e., Record of the transaction, owner of the product, public and modification chances of the records.
As the product information is updated in the network, hash address is generated for the product where it is possible to
keep track of transactional information of the product and about the current ownership. Blocks are created as the products
keeps transferred from manufacturer to distributer, then distributor to the customer. When the QR code is generated from
the hash address, it is attached to the product. When the customer scans the QR code, he gets the information of the
© IJARCCE This work is licensed under a Creative Commons Attribution 4.0 International License 420
IJARCCE ISSN (O) 2278-1021, ISSN (P) 2319-5940
II. BACKGROUND
B. Problem Statement
Authentication of product is very crucial for to stop counterfeiting. Unfortunately, duplicate products are sold in markets,
other product distribution points and shopping malls. Retailors sometimes willingly sell fake goods to earn high profit.
The tricky part here is to detect whether the product is fake or real. It is very scary to hear this happening with medicines
and kid’s toys. This problem is becoming more serious as the products value will be questioned. The product is not only
assessed based on its physical property but it can even be traded in virtual world and its history can analysed. This can
affect the relationship between the customer and retailer or company and customer. This could impact the trade in local
region.
We plan to implement a Blockchain system architecture to record ownership of the product in the Blockchain
network. Two very important properties of blockchain are untracability and the transparency. This gives assurity to the
customers and they can trust the services rather than trusting the third party for its service. Small or Medium sized
enterprises can invoke this technology to stop counterfeiting. The companies need not spend more money to secure the
data of the product. Quick Response codes which are generated makes this system safe and even more speedy. The fast
system also makes the data error free.
C. Motivation
In the existing supply chain technology, many fake products exist. In order to decide whether the product is genuine or
not, it is essential for the user to have a system in place where the user gets all the data related to the product. Based on
the data he can decide whether the product is real or fake. The companies around the world are getting affected by the
presence of fake products as it spoils companies name, fame and the revenue. In Supply Chain management anti-
counterfeiting of the product is really important. Companies that want to flourish in E-commerce market should facilitate
buyers with information about the product and also provide the platform to enquire about the product. The consumer
needs to trust the entire structure of the system and also understand about how exactly the product reaches the customer
after the entire cycle. All this needs to be facilitated to the customers via a web platform.
Few companies i.e., both small and medium scale might be burdened whereas large companies will be financially stable.
Traditional methods to stop counterfeiting have failed and continue to do so as the consumers didn’t trust the system.
Counterfeiting of products can be completely stopped by paying low transactional fees and trusting the system. Man-in-
the-middle attack is what the customers and the companies are worried about. Counterfeiting still couldn’t be stopped
even after making use of RFID, other mobile technologies. To stop various attacks and counterfeiting of products,
encrypted QR code techniques will have to be implemented. This can be accessed only by the authorized person which
will be regulated by the authorities of supply chain system. Secure handling of system will lead to successful Blockchain
system management in any organization.
© IJARCCE This work is licensed under a Creative Commons Attribution 4.0 International License 421
IJARCCE ISSN (O) 2278-1021, ISSN (P) 2319-5940
[1] G. Vidhya Lakshmi, Subbarao Gogulamudi, Bodapati Nagaeswari, Shaik Reehana, “Blockchain Based Inventory
Management by QR Code Using Open CV”, International Conference on Computer Communication and Informatics
(ICCCI -2021) Coimbatore, INDIA, Jan. 27 – 29, 2021.
Here, they are using blockchain technology and Python to generate QR codes. They then used this technology to create a
website that will allow users to manage their inventory. They are using the features of blockchain and QR code to create
a reliable and transparent inventory management system. Through the use of Python, they can create QR codes that are
customized for different products. The details of the sold products are then broadcasted through the P2P network[1].
A manufacturer can quickly compute inventory by retrieving product details from the blockchain database-EVM
is a Python-based implementation of the Ethereum protocol. It includes low-level primitives for the present Ethereum 1.0
chain, as well as support for the future Ethereum 2.0 specification. They used Py-EVM to construct the Ethereum
blockchain for storing details of sold-out products[1].
This is a base paper we referred to develop this system. Here they are using Ethereum blockchain technology and using
python to generate QR code which can be improvised by using algorithm in blockchain technology. Here, they used this
technology for inventory management and we used this information and improvising this by creating a website and
using for the purpose of fake product[1].
[2] Abhinav Sanghi, Aayush, Ashutosh Katakwar, Anshul Arora, Aditya Kaushik, “Detecting Fake Drugs using
Blockchain”, International Journal of Recent Technology and Engineering (IJRTE) ISSN: 2277-3878, Volume-10 Issue-
1, May 2021
This paper helps in tracking the movement of drugs from the industry to the patient. Mainly the Hyperledger fabric is
used for implementing the entire model. In this model, the manufacturer has to upload the details of a drug in a website
which is sent further to the government for approval. Once the government approval is done, the pharmacies can request
the approved drugs with the help of blockchain technology. Further, if any patient needs to get some medicine or drugs,
then a request is made into the blockchain network. After that a medical officer or doctor will approve or reject the request.
Because the entire model is implemented in a blockchain network, it can help in preventing the counterfeiting of drugs
and we can track the movement of drugs from the manufacturer up to the patient.
This paper gives us information mainly about the Hyperledger which can be implemented in our proposed system and the
details of different genres to approve the product in this area [2].
[3] Steven Sandi, Sanja Radonjic, Jovana Drobnjak, Marko Simeunovic, Biljana Stamatovic and Tomo Popovic “Smart
Tags for Brand Protection and Anti-counterfeiting in wine Industry” 23rd International Scientific-Professional
Conference on Information Technology (IT), 2018.
They describe a brand protection and anticounterfeiting solution based on smart tags and Cloud enabled technologies for
the wine sector in this article. One of the key concepts behind smart tags is to use functional inks and quick response
codes, which consist of Cloud system and allow for two-way communication between end user and the winemaker[13].
© IJARCCE This work is licensed under a Creative Commons Attribution 4.0 International License 422
IJARCCE ISSN (O) 2278-1021, ISSN (P) 2319-5940
This section presents Blockchain based Decentralized system describing, the tools that were used, the methodology that
guided its development and it also explains the platforms architecture.
A. Methodology
The Methodology used to develop this system includes a high-end development tool to run our own local blockchain for
Ethereum called Ganache, to interact with Ethereum blockchain we make use of cryptocurrency wallet called Metamask,
Remix IDE tool to run the Smart Contract Program, XAMPP server provides interface for SQL (phpMyAdmin) which
makes handling database easy, Blockchain proof-of-work implemented using PHP.
• First, we need to create a Metamask account and run Ganache.
• In Ganache, open accounts tab and then copy the private key of any account present there.
• Paste the copied private key in the import section of the account. Here, we are setting up a node and use this
private key to sign and approve the transactions.
• Now, we write the Smart contract code in the Remix IDE code section. We need to save this code and compile
it. Then, we deploy it by choosing Injected Web3 as the environment.
• We need to copy the contract address and contract ABI to app.js file.
• Next, we need to go to the XAMP server and activate Apache and MySQL.
• We need to make sure that our project folder is placed in the htdocs folder of the root directory.
• We then open PhpMyAdmin and write the SQL queries and execute it. The database is set up.
• Lastly, we need to open the localhost URL to run this Decentralized Shopping platform that we have created.
B. Tool Requirements
Ganache is a local blockchain simulator through which we can run blockchain on our system. We can develop, deploy
and test our decentralized application without buying Ether. Ganache interface includes various addresses and balance
which is fake ether. Using this fake ether we can develop, deploy and test our smart contract. We get other information
about Blocks, Transactions, Contracts, Events and Logs. This is shown in Fig. 2.
Metamask is piece of software that makes interacting with any blockchain much easier. Metamask essentially does all the
code that we had to do automatically. Metamask acts as a security layer as well as an accessibility layer. Nothing can go
from our Metamask wallet to that website without the permission. The account created in Metamask is shown in Fig. 3.
We can deploy Smart contracts in solidity using Remix IDE. Remix IDE is a web application where we have to write our
smart contract in solidity. We can easily deploy our smart contracts to the test nets or the main nets and then we can just
test and verify the smart contracts within this environment. Smart contract code written for Decentralized E-commerce
website is shown in Fig. 4.
© IJARCCE This work is licensed under a Creative Commons Attribution 4.0 International License 423
IJARCCE ISSN (O) 2278-1021, ISSN (P) 2319-5940
Web3.js is the main JavaScript library for interacting with the Ethereum blockchain. When we are developing a website
or a client of some kind that can actually talk to the blockchain and that’s where the web3.js library comes into play.
Website talks to the blockchain with web3 with something called JSON RPC. RPC stands for remote procedure call
protocol; this is the method that allows us to talk to Ethereum blockchain. A block diagram of working of web3js is shown
in Fig. 5.
If we want to create an environment for PHP which includes XAMPP. We must make sure MySQL is running. We can
then run the MySQL queries and setup the database. The database setup for decentralized website is shown in Fig. 6.
© IJARCCE This work is licensed under a Creative Commons Attribution 4.0 International License 424
IJARCCE ISSN (O) 2278-1021, ISSN (P) 2319-5940
Fig. 6: PhpMyAdmin
© IJARCCE This work is licensed under a Creative Commons Attribution 4.0 International License 425
IJARCCE ISSN (O) 2278-1021, ISSN (P) 2319-5940
The proposed approach ensures that fake products are detected in everyday life via a website. Customer or user android
application, Manufacturer or firm android application, and Cloud/ Database are the three important components of the
proposed system. The block diagram of the Blockchain network is shown in Fig. 7. The Manufacturers or corporate side
application is the first section of the website, where we must first register. After logging into the website and completing
the registration process, we can choose from a variety of possibilities one alternative is to add a product and let the maker
fill in the data. Another alternative is to display the order so that they may see the details of the clients' orders before
deciding whether to accept or reject the order. The manufacturer can also see whether or not the goods has been delivered.
We may use a QR code scanner on this website to scan the QR code of a product and determine whether it is false or
authentic. Another alternative is a blockchain, which shows the name of the generated block product quantity, generated
Hash Value, and whether or not the product is corrupted. In our proposed system, the customer logs in and fills out the
necessary information to order and book the product. The maker might be shown the product's order. The manufacturer
determines whether or not the product request is acceptable. After a product's order is accepted, the manufacturer
generates the product's unique QR code. Once a product order is saved on the network, a hash code for that product is
generated, making it easy to keep track of the transaction. A QR code is created for a specific product in the proposed
system. Customers can use their smartphone's QR code reader application or a QR code scanner on the customer's website
to scan the QR code on the product or packaging. After scanning we can determine whether the merchandise is genuine.
Finally, the Blockchain system stores these product characteristics as well as a transaction history, allowing for product
tracking along the distribution chain. The firebase cloud database stores all product details, block names, and hash values.
The hash function is the SHA-256 ALGORITHM. The Secure Hashing Method (SHA)-256 is the Bitcoin protocol's hash
function and mining algorithm, referring to a cryptographic hash function that returns a 256-bit number. The
establishment and management of address is controlled and transactions are being verified as well. It's also used for
password verification because it eliminates the need to save precise passwords because the hash values may be stored and
compared to the user entry to see if it's correct. To use the SHA256 algorithm with JavaScript, we'll need to install the
cryptoJS npm package.
VI. CONCLUSION
Using Blockchain technology to stop counterfeiting of the product could benefit the e-commerce companies as well as
the customers. The manufacturer, distributor and customer will have the information of the product all the way from the
time it gets manufactured to the time it reaches the customer and it is almost impossible for a third party or a hacker to
change the information of the product between any of the links in blockchain. Smart contracts codes govern the system
in blockchain. A QR code generated for a product is being verified as the product reaches the customer and QR code is
matched. The customer can trust that this Blockchain based application because of the simplicity of the code. Future
works could be to simplify the code. Customers will not be aware of Blockchain based E-Commerce websites, so to make
© IJARCCE This work is licensed under a Creative Commons Attribution 4.0 International License 426
IJARCCE ISSN (O) 2278-1021, ISSN (P) 2319-5940
REFERENCES
[1]. G. Vidhya Lakshmi, Subbarao Gogulamudi, Bodapati Nagaeswari, Shaik Reehana, “Blockchain Based Inventory
Management by QR Code Using Open CV”, International Conference on Computer Communication and Informatics
(ICCCI -2021) Coimbatore, INDIA, Jan. 27 – 29, 2021.
[2]. Abhinav Sanghi, Aayush, Ashutosh Katakwar, Anshul Arora, Aditya Kaushik, “Detecting Fake Drugs using
Blockchain”, International Journal of Recent Technology and Engineering (IJRTE) ISSN: 2277-3878, Volume-10
Issue-1, May 2021.
[3]. Miguel A. Prada-Delgado, Gero Dittmann, Ilie Circiumaru, Jens Jelitto “A blockchain- based crypto-anchor platform
for interoperable product authentication”, EEE International Symposium on Circuits and Systems (ISCAS),2021.
[4]. Mrs S. Thejaswini, Ranjitha K R, “Blockchain in Agriculture by using Decentralized Peer to Peer Networks”,
Proceedings of the Fourth International Conference on Inventive Systems and Control (ICISC 2020),2020.
[5]. Jinhua Ma, Shih-Ya Lin, Xin Chen, Hung-Min Sun, Yeh-Cheng Chen, and Huaxiong Wang, “A Blockchain-Based
Application System for Product Anti- Counterfeiting”, IEEE Access,2020.
[6]. Veneta Aleksieva, Hristo Valchanov and Anton Huliyan, “Implementation of Smart- Contract, Based on Hyperledger
Fabric Blockchain”, International Symposium on Electrical Apparatus & Technologies (SIELA) - Bourgas,
Bulgaria,2020.
[7]. Ajay Kumar Shrestha, Julita Vassileva “Bitcoin Blockchain Transactions Visualization” University of Saskatchewan
Saskatoon, Canada, 2020.
[8]. Vinayak Singla, Indra Kumar Malav, Jaspreet Kaur and Sumit Kalra, “Develop Leave Application using Blockchain
Smart Contract”, 11th international conference on Communication Systems and Networks,2019.
[9]. Jesus Maximo Montes, Cecilia E. Ramirez, Manuel Coronado Gutierrez, Victor M. Larios, “Smart Contracts for
supply chain applicable to Smart Cities daily operations”5th IEEE International Smart Cities Conference (ISC2
2019), 2019.
[10]. Sanjay K. S, Dr. Ajit Danti “Detection of fake opinions on online products using Decision Tree and Information
Gain” Third International Conference on Computing Methodologies and Communication (ICCMC 2019),2019.
[11]. Mario Tomisa, Marin Milkovic, Marko Cacic, “Performance Evaluation of Dynamic and Static WordPress-based
Websites”, IEEE Access 2019.
[12]. Sidra Malik, Volkan Dedeoglu, Salil S. Kanhere, and Raja Jurdak, “TrustChain: Trust Management in Blockchain
and IoT supported Supply Chains”, 9 IEEE International Conference on Blockchain (Blockchain),2019.
[13]. Steven Sandi, Sanja Radonjic, Jovana Drobnjak, Marko Simeunovic, Biljana Stamatovic and Tomo Popovic “Smart
Tags for Brand Protection and Anti-counterfeiting in wine Industry” 23rd International Scientific-Professional
Conference on Information Technology (IT), 2018.
[14]. Abhijeet Mendh, Mr. Deepak Kumar Gupta, Dr. Krishna Pal Sharma, “Secure QR-Code Based Message Sharing
System Using Cryptography and Steganography”, First International Conference on Secure Cyber Computing and
Communication (ICSCCC),2018.
[15]. Mayur M Patil “A qualitative analysis of the performance of MongoDB vs MySQL Database based on insertion and
retrieval operations using a web/android application to explore Load Balancing – Sharding in MongoDB and its
advantages” International conference on I-SMAC (IoT in Social, Mobile, Analytics and Cloud) (I-SMAC
2017),2017.
[16]. Ningning Yi, Xin Feng, Chunfang Li, “The Design and Implementation of the Front End of the Art Play Library
System”, 7th International Conference on Communication Systems and Network Technologies,2017.
[17]. G. Sri Harsha Vardhan, Naveen Sivadasan, Ashudeb Dutta, “QR-Code based Chipless RFID System for Unique
Identification”, IEEE International Conference on RFID Technology and Applications, 2016.
[18]. Bo Ya, Guangwen Huang, “Application of RFID and Internet of Things in Monitoring and Anti-counterfeiting for
Products”, International Seminar on Business and Information Management,2016.
[19]. Mark A. Holliday and Andrew S. Scott “A Software Development Course Based on Server-Side JavaScript” Dept.
of Mathematics and Computer Science Western Carolina University,2016.
[20]. Leeladevi B, Pinku Hazarika and Hemadri Pavan Kumar Nanyam “Transforming a website from desktop to mobile:
A cross platform viewpoint” Siemens Technology and Services Bangalore, India,2015[21] Saksham Aggarwal “A
Blocks-Based Editor for HTML Code” International Institute of Information Technology Hyderabad, India,2015.
[21]. Saksham Aggarwal “A Blocks-Based Editor for HTML Code” International Institute of Information Technology
Hyderabad, India,2015.
© IJARCCE This work is licensed under a Creative Commons Attribution 4.0 International License 427