We will be undergoing planned maintenance on Oct 7th 6:00AM UTC / Oct 7th 2:00AM ET

Inspiration

PharmaLedger was inspired by a harsh reality, and that is counterfeit drugs quietly kill millions every year. The WHO estimates that 1 in 10 medicines in developing countries is fake or substandard, fueling a $200B black market.

Imagine a patient in Nigeria buying malaria medicine that looks real, but contains no active ingredients. Treatment fails and the patient suffers, paying the full price of the drug.

At the core is a trust problem. Consumers can't verify authenticity, manufacturers can’t prove integrity, and regulators can’t track drugs across borders. By using XRPL's high speed and low fees, we realised we could create a solution that utilises blockchain to provide something the industry lacks, which is the tamper-proof proof of authenticity. This idea bred PharmaLedger.

What it does

PharmaLedger gives every pharmaceutical batch a digital identity on the XRP Ledger.

Manufacturers mint an NFT for each batch containing verified details like batch number, expiry date, and a cryptographic signature. The NFT ID is embedded into an NFC chip on the packaging.

At purchase, consumers simply tap their phone. In seconds, they see whether the drug is authentic or counterfeit. This is directly verified on the blockchain.

Once created, the record cannot be altered, duplicated and tampered with, giving buyers the peace of mind when they purchase the drugs.

  1. Drug Manufacturing
  2. Each pharmaceutical batch is produced by an authorized manufacturer
  3. An NFC chip is attached to the drug packaging
  4. The NFC chip stores:

    • Public key
    • NFT Token ID
  5. NFT Minting (XRP Ledger)

  6. The manufacturer mints an NFT on the XRP Ledger representing the drug batch

  7. The NFT contains metadata:

    • Product name
    • Batch number
    • Manufacturing & expiry dates
    • Chip Public Key
  8. The NFT is minted from the manufacturer’s verified XRPL wallet

  9. Off-Chain Registration (PharmaLedger)

  10. PharmaLedger records the following for fast verification:

    • NFT Token ID
    • Associated public key
    • Manufacturer’s verified wallet address
  11. This database improves performance but does not replace blockchain trust

  12. Consumer Verification (NFC Scan)

  13. The customer taps their phone on the NFC chip

  14. The app retrieves:

    • NFT Token ID
    • Public key
  15. The system queries the XRP Ledger to:

    • Confirm the NFT exists
    • Check the NFT is owned by the correct manufacturer wallet
  16. Authenticity Validation

  17. AUTHENTIC

    • Token ID exists on XRPL
    • NFT belongs to the verified manufacturer wallet
  18. COUNTERFEIT

    • Token ID not found
    • NFT ownership does not match manufacturer
  19. Security Guarantees

  20. XRPL NFTs are immutable and non-duplicable

  21. Counterfeiters cannot mint valid NFTs without the manufacturer’s private key

  22. NFC data tampering breaks cryptographic verification

  23. Provides a permanent, global audit trail

How we built it

There are two main features of our product:

  1. The tokenization of batches of drugs (Minting of NFTs)
  2. The verification of authenticity of a batch of drugs (Verify whether it is counterfeit or authentic)

We divided our work with one person working on the minting, and the other working on the verification process. Finally, we merged our progress together to form the final product.

Challenges we ran into

  1. Difficulty navigating the use of our product due to no polished UI to test on.
  2. Difficulty syncing up account details of XRPL
  3. Lack of understanding of the XRPL relevant libraries, have to learn and read the documentations from scratch

Accomplishments that we're proud of

We are able to successfully tokenize the drugs and mint it on testnet. We are also able to retrieve information from XRPL and firebase, compare it with each other to verify the authenticity of the drugs in question.

What we learned

  1. Technical understanding of XRPL relevant libraries
  2. Ability to link XRPL API to our own API

What's next for PharmaLedger

Right now, there is no polished UI for users (either buyers/manufacturers) to use. So there exists big potential to create a polished UI for users to easily navigate, without the need for command line commands.

Another thing is that our NFC logic is very simplified and hardcoded due to the lack of time and resources. Perhaps, it could be emulated better with other pre-existing libraries/softwares.

Built With

Share this project:

Updates

Submission history