Table of Contents
Create a DApp that helps businesses deploy a marketplace specifically for loyalty rewards. When a customer buys a product from a shop, they are rewarded with a certain amount of loyalty points which they can redeem in the loyalty shop to purchase specific things from the loyalty shop.
We will make this like an API of sorts where it is effortless to integrate it to their existing website/platform.
We will also be making a website for demonstration purposes. Loyalty points can also be implemented as an ERC-20 token.
The loyalty rewards being on the blockchain can reduce the chances of customers exploiting the system, such as finding an infinite money glitch. As the transactions are easily visible on the blockchain, we can also add bug bounties which will further enforce security.
Contract is deployed on the Mumbai Testnet also 0xE851C8E489eb0ee57A1ba1A219f50Fdee6fed5be
🎨 Front-end: MetaMask, Ethers.js, Next.js (React), HTML5, Tailwind CSS.
👷♂️ Smart Contracts: Hardhat, Ethers.js, TypeChain, OpenZeppelin, Mocha, Chai, Waffle.
This is an example of how to list things you need to use the software and how to install them.
So first of all we use yarn for all the version dependencies
yarn install
The version of node required
>= 16.0.0 && <= 17.0.0
List of all dependencies
ethers
ethereum
react
web3
typescript
hardhat
mocha
ethereum-waffle
chai
solc
axios
next
doenv
ipfs-http-client
For Windows: you MUST start the project by running Git Bash.
After cloning the repository,
Execute the following command in the root directory of the project:
yarn dev
Open another terminal, and execute the following command in the root directory of the project:
yarn deploy
Use the local host url to run the website on a chrome based browser.
Using the metamask extension, import any of the dummy accounts through the private key and then connect to the local host.
After the website is loaded, go to the homepage and add the loyalty points token to your wallet.
You are now ready to freely purchase and redeem items from the business using your metamask wallet!
- Use IPFS, for making system more decentralised and efficient
- Improve Asthetics
- Make an API of our website so could be businesses easily
- Adding more schemes and different loyalty programs to fit need of every business.
Use this space to list resources you find helpful and would like to give credit to. I've included a few of my favorites to kick things off!