Skip to content

(1st prize winner in hackathon) Trustful yet anonymous cashback system using zero-knowledge.

License

Notifications You must be signed in to change notification settings

ahmetson/malpie

Repository files navigation

Malpie

Proof of Concept of the trustful yet anonymous cashback system using zero-knowledge proof.

It's a mobile app for the users to collect the casbacks and coupons. For the shops Malpie provides the zero-knowledge proof of the user data.

For more information, check this out:

https://www.youtube.com/embed/8gTu-eRWgV8?si=f8DaIqN79GjbH-Ed

1st prize winner: The best use of Polygon ID at Chainlink Constellation

Installation

  1. Create .env from .env.example.

  2. Deploy the smartcontracts on the network.

cd smartcontracts/
npx hardhat run --network sepolia scripts/deploy.ts
  1. Upon success, the script will show todo. Follow them up.

The second todo item requires setting of the smartcontract address. Set it in the scripts/set_js_in_loyalty.ts.

  1. Whitelist the shop. The shop is registered in the loyalty system.

The whitelisted shop is able to announce loyalty points for the user.

Edit the scripts/add_shop.ts, then call:

npx hardhat run --network sepolia scripts/add_shop.ts
  1. Add the credential types.

Edit the scripts/add_credential.ts, then call:

npx hardhat run --network sepolia scripts/add_credential.ts
  1. Announce User's loyalty points.

Edit the scripts/announce_loyalty_points.ts, then call:

npx hardhat run --network sepolia scripts/announce_loyalty_points.ts
  1. Submit user data

Copy the receipt_id from the first announce_loyalty_points.

About

(1st prize winner in hackathon) Trustful yet anonymous cashback system using zero-knowledge.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published