MedProof — Web3-Powered Medical Registry Platform


Inspiration

Counterfeit and substandard medicines are a global crisis. According to the WHO, an estimated 1 in 10 medical products in developing countries is substandard or falsified. This not only leads to loss of lives but also damages the reputation of genuine pharmaceutical companies. We realized that the core issue is lack of transparency and traceability in the supply chain.

This inspired us to build MedProof — a Web3-powered medical registry platform. We wanted to leverage the immutability and transparency of blockchain technology to give patients the power to verify the authenticity of their medicines instantly, while allowing genuine manufacturers to protect their brand.


What It Does

MedProof bridges the gap between pharmaceutical manufacturers and end consumers through a decentralized registry:

  • Manufacturer Dashboard — Verified manufacturers connect their Web3 wallets and securely mint/register batches of medicines onto the blockchain.
  • Patient Verification Portal — Patients can use our clean, intuitive UI to verify a medicine's unique ID or batch number. The frontend queries the smart contract to confirm if the medicine was registered by an authorized manufacturer.
  • Role-Based Access Control (RBAC) — Only explicitly authorized wallet addresses can add new medicine records, preventing malicious actors from adding fake data.

How We Built It

We architected MedProof using a modern Web3 stack:

Layer Technology
Smart Contracts Solidity (MedRegistry.sol) + OpenZeppelin AccessControl
Blockchain Network Polygon Amoy Testnet (via Hardhat)
Frontend React.js + Custom CSS / Tailwind
Web3 Integration Ethers.js + MetaMask (WalletConnect.jsx)
Backend & Hosting Node.js Express + Firebase Hosting

Cryptographic Integrity

The integrity of a medicine's record relies on cryptographic hashing. If M is the medicine data, the state is secured such that any tampering invalidates the hash:

Hash(M_original) ≠ Hash(M_tampered)

Any modification to the original medicine data produces a completely different hash — making falsification cryptographically detectable.


Challenges We Ran Into

  • Web3 Wallet Integration — Managing wallet connection states and handling asynchronous transactions securely in React required careful state management.
  • Smart Contract Security — Ensuring that only authorized manufacturers could modify the registry without making the contract overly complex or gas-heavy.
  • Network Deployment — Configuring Hardhat and successfully deploying to the Polygon Amoy Testnet required setting up the right RPC nodes and handling testnet faucets gracefully.

What We Learned

Building MedProof was a massive learning experience. We deepened our understanding of:

  • Writing secure Solidity smart contracts and utilizing OpenZeppelin libraries.
  • Bridging traditional Web2 interfaces (React) with Web3 decentralized networks using Ethers.js.
  • Managing Role-Based Access Control (RBAC) purely on-chain.
  • The nuances of Polygon's testnet architecture.

What's Next for MedProof

  • IoT & QR Code Integration — Allowing patients to simply scan a QR code on the medicine box using their mobile camera for instant one-tap verification.
  • Supply Chain Tracking — Adding roles for Distributors and Pharmacies so the entire journey of the medicine can be tracked from factory to patient.
  • Mainnet Launch — Migrating the contracts from the testnet to the Polygon Mainnet for real-world usage.

Built With

Share this project:

Updates

Submission history