Inspiration
Our inspiration for creating this project stems from a pressing global issue - the proliferation of counterfeit products in the market. Counterfeit goods not only harm consumers by delivering subpar quality but also pose significant risks to businesses, eroding trust in brands, and potentially causing health and safety hazards (in terms of fake medical products). We were actually aware of the dire consequences of this issue through the experiences of a mutual friend who hails from a third-world country. Our friend shared how his grandmother fell seriously ill and the family, facing limited healthcare options, purchased what they believed to be life-saving medication. Tragically, the medication turned out to be fake. The counterfeit product not only failed to alleviate her condition but also worsened it. This demonstrated the life-and-death implications of counterfeit products and grappled our minds, inspiring us to find a solution for it.
What it does
We set out to create a system that could provide instantaneous verification by utilizing blockchain's data storage capabilities to securely store QR code data and product information. Companies can create products by simply entering the product name, number of products going into production and a product description. A new block will be made in the blockchain for each product. For each block/product, there will be a QR code generated. The extracted data of this QR code will be saved into the block of that product.
When a QR code is scanned, our system cross-references the extracted data from the scanned QR code with the QR code information stored in the blockchain. A match signifies authenticity, while a mismatch immediately alerts the user to the presence of a counterfeit product.
In essence, our project marries the potential of blockchain technology with the concept of QR codes to offer a strong and user-friendly solution to the counterfeit problem. Our aim is to provide consumers with a reliable tool to make informed purchasing decisions and assist businesses in protecting their brand integrity.
By participating in Hack the North, we hope to not only showcase our innovative solution but also inspire others to explore the intersection of technology and social impact. We believe that by leveraging blockchain in this manner, we can contribute to a safer, more trustworthy marketplace, benefiting both consumers and businesses on a global scale.
How we built it
With a core focus on safeguarding product authenticity, our system leverages blockchain technology in conjunction with QR code scanning to provide a comprehensive means of verifying product legitimacy. This project includes frontend with React and Tailwind CSS, while the backend includes Python.
Blockchain Technology:
- At the heart of our system is the blockchain structure, an immutable ledger renowned for its security and trustworthiness.
- The blockchain consists of a series of blocks, each containing vital information about a product, such as its index, previous block's hash, timestamp, product name, product ID, nonce, and hash. Each block represents a product.
- The blockchain is secured using the SHA-256 hashing algorithm, ensuring the integrity of stored data.
Block Creation and QR Code Generation:
- Every legitimate product is associated with a unique block in the blockchain.
- A QR code is generated for each authentic product, which encodes critical product information, including its authenticity status, product name, and product ID.
- The QR code image is created using the qrcode library, and it is saved as an image file (e.g., static/block_{product_id}_qr.png).
Additionally, the binary data of the QR code is stored within the block as qr_code_data through: qr_byte_io = io.BytesIO()
img.save(qr_byte_io) qr_byte_data = qr_byte_io.getvalue()
Verification Process:
- When a QR code is scanned using our dedicated web application, the verification process begins.
- The application extracts the data encoded within the scanned QR code.
- The extracted data is then compared with the QR code data information stored in the blocks of the blockchain, seeking an exact match.
- If the extracted data corresponds precisely to the information saved in the blockchain, the product is confirmed as genuine.
- In cases where there is no match, the system immediately alerts the user, unequivocally identifying the - product as counterfeit.
User Interface:
- Users interact with our system via a web interface.
- he system's user interface provides login/sign up opportunities to companies trying to make a fake product identifier for their product. To make these identifiers, users can input the product's name, the quantity of items, and a product description (which can be automatically generated by AI). The system will create a corresponding number of blocks, each representing a product. Within each block or product, a QR code will be generated and the data from the QR code will be stored along with additional security measures such as hashing.
- When a match is found, users are directed to a page confirming the product's legitimacy, assuring them of their purchase's authenticity.
- In instances of mismatch, users are directed to a page clearly stating that the product is counterfeit, empowering them to make informed decisions.
Challenges we ran into
We encountered several challenges during the development of our project, including:
Data Extraction from QR Codes: Extracting data from QR codes proved to be a complex task, requiring precise process of decoding the data into a byte file to ensure accuracy and reliability in the verification process.
Cross-Checking with the Blockchain: Integrating the QR code scanner with the blockchain posed another challenge. It necessitated creating a seamless communication system to cross-check QR code data with the information stored within the blockchain. Cross-checking results were different on VS Code compared to the MacOS Terminal. It took a while, but with perseverance, we were able to pass this error.
ICP Decentralized Platform Setup: Setting up the ICP (Internet Computer Protocol) decentralized platform for our blockchain was a crucial step. However, it turned out to be time-consuming and challenging due to compatibility issues with our laptops. We faced difficulties during the initial setup, leading to an unexpected delay.
Despite these challenges, our team persevered and successfully overcame them. We dedicated considerable effort to refining data extraction processes, enhancing communication between components, and eventually finding a workaround to set up the ICP decentralized platform. These obstacles, while demanding, ultimately contributed to the validity of our project and the expertise of our team in addressing complex technical issues.
Accomplishments that we're proud of
Blockchain Implementation: Successfully implementing a blockchain structure and security system is a remarkable accomplishment in itself. Our team was able to create a secure and tamper-resistant ledger that stores product data, ensuring data integrity and authenticity verification.
QR Code Integration: Integrating QR code technology into our project was a pivotal achievement. We devised a method to generate QR codes for each product, enhancing user-friendliness and enabling quick and accurate verification.
Global Impact: Our project's potential for addressing the global issue of counterfeit products is an accomplishment we hold in high regard. By providing a reliable solution, we aim to make a substantial impact on consumer safety and brand protection worldwide.
What we learned
Our journey with the ICP (Internet Computer Protocol) Decentralized Platform provided us with valuable insights and expertise. We learned to navigate the platform's architecture and manage data securely in a decentralized environment. One of our most significant lessons was overcoming compatibility challenges with our laptops, which led us to explore alternative solutions and adapt our setup process. We also honed our skills in optimizing resource usage, engaging with the ICP community, and applying our knowledge to create a secure and efficient blockchain system for counterfeit product detection. This project required more than just our programming skills, helping us learn new concepts, such as blockchain. This experience not only enhanced our technical abilities but also reinforced our problem-solving and adaptability in real-world blockchain development scenarios.
What's next for Unfake
Our project's future involves several key strategies:
- Global Reach: We plan to expand internationally, collaborating with organizations and regulatory bodies.
- Team Expansion: We'll grow our developer team to accelerate development and explore new features.
- Use Case Diversification: We'll adapt our system for various industries beyond counterfeit detection.
- Verification Team: A dedicated team will vet and verify companies, ensuring platform credibility.
- Improved User Interface: We'll enhance user-friendliness for easier onboarding.
- Education and Outreach: Initiatives will promote awareness about counterfeit risks and our technology's role.
- Feedback Integration: User feedback will guide continuous improvements.
- Security and Compliance: Strengthening security measures and compliance will remain paramount.
Log in or sign up for Devpost to join the conversation.