Inspiration
It was unheard of for vaccines or any other medicines for that matter to go from a factory in one corner of the world to your local pharmacy in less than 2 years. But because of the covid pandemic over the past 36 months, this is exactly what occurred.
Unfortunately, the rush to deliver vaccines and medicines around the world has also created plentiful opportunities for counterfeit drug manufacturers to make a quick buck.
On a broader scale, The World Health Organization estimates that up to 1% of medicines available in the developed world are likely to be counterfeit. 1% of the medicine market is a lot, and potentially affects hundreds of thousands of lives. In the developing world though, this number can go upto 50%! Imagine having to bet on your life-saving medicine to be authentic and not fake!
Problems with the current system
Consider a simple transaction between Bruin Pharmacy and a supplier.
The Pharmacy places an order with the supplier, which the supplier accepts.
The supplier requests for a loan from the bank, which the bank approves.
The supplier produces and ships the required medicine to the Pharmacy.
The Pharmacy acknowledges the receival and pays the supplier.
The supplier repays the loan.
The above transactions involve information flows, inventory flows and financial flows. Owing to the sheer number of stakeholders involved in existing pharmaceutical supply chains, it becomes near impossible to connect these three flows together. This disconnect allows bad actors to infiltrate the chain with their counterfeit drugs.
Blockchain: our solution
In our model, each step (be it informational, inventorial or financial) of each transaction is tokenized and secured cryptographically. It is then recorded on a block which is then pushed to the blockchain. Thus, the blockchain is nothing but a chronological linking of blocks, with each block containing a public record of all sorts of transactions.
![]()
Each node has their own private copy of the ledger. This enables them to cross check a transaction at any time, and call out the guilty parties if any discrepancy is found. Data once written to the chain is immutable; meaning no one can overwrite already published data with their own fudged up data.
How we’re preventing counterfeiting
As each consignment moves from one node to the other, it is recorded on the blockchain. Thus, a history of the box is created and made available publicly. This allows anyone on the network to to trace the product all the way to its origin.
At every node, the weight and quantity of the consignment is independently verified. If any discrepancy is found, it notifies all nodes in the network that the ledger has been tampered with.
How we built it
We started with setting up a backend server using the node/express framework. This set up the bare bones for our backend. We then used MongoDB to store hashed user data with npm libraries like bcrypt JS. We then started working on creating smart contracts with solidity.
We initially used a local network in the form of ganache and truffle, but soon migrated to a public and more robust network using Ankr. Our team simultaneously worked on the front end of the website where we used AdobeXD to create the designs and then write up the HTML/CSS to match those designs.
We faced some challenges in properly integrating the front end and the backend, such as making sure that the date is parsed in properly from Node to the EJS files that we made, and functionality like looping within an HTML document worked well.
We then came back to Node JS, and defining any routes we might have left as well as connected our solidity smart contracts together for the checks for 'weight' and 'units' which are core to our application.
Next all 3 of us worked together to scrape real time data for the coordinates and then used the 'Request' library in JS to pass the coordinates through to our Maps API.
Challenges we ran into
We ran into challenges with our idea: we know that we’re not completely robust. For example: you might be thinking, what if someone replaces the medicine with the same weights and units and passes it along the supply chain. However, we realized that the purpose of a decentralized server in itself is tracking the flow of information, and even if one node doesn’t agree then they can void the blockchain altogether. However, we’re looking to constantly improve and one such application might be using sensors on shipment containers.
Integrating more than 14 stacks, frameworks, and APIs was a major challenge. However with a little help from the mentors and stackoverflow, we were able to build a robust MVP of our first web3 app. As it was our first time building a web3 app, we had to read the official documentation multiple times and go through (a seemingly infinite) amount of errors to get everything working.
Accomplishments that we're proud of
In 36 hours, we were able to build a whole suite of features to prevent counterfeits in the pharmaceutical supply chain. This involved learning several new technologies (Solidity, web3js) plus combining them with our frontend and backend. We worked for 24 hours plus at a stretch, debugging, drinking Dasani water, debugging some more and drinking some more Dasani water. We’re particularly proud of drinking a healthy amount of water per day.
What we learned
This was our first time building a web3 app, and thus we had to learn the theoretical plus the practical implementations of blockchain. We learnt how to use the Ankr API and use its endpoint to connect to the Ethereum Blockchain. Coding the smart contracts was essential to our logic and thus we had to learn Solidity too. We also had to learn to use the Google Maps API to track the consignment as it moves through the supply chain.
What's next
We want to integrate all our functionality into a single QR code: all of the weight, quantity, location checking should be done by a single scan. We also hope to add more parameters and cover a larger percentage of counterfeit goods.


Log in or sign up for Devpost to join the conversation.