Blockchain-based Collaborative Loyalty Program for Business Consortium
Report Bug
·
Request Feature
Table of Contents
More and more brands or companies have implemented loyalty programs in recent years. However, there are too many types of reward points to circulate, and most may have expired before they can be redeemed. In addition, small merchants cannot develop robust loyalty pro- grams on their own like large corporations, and if they join a consortium loyalty program, they will be limited to a certain extent.
To address these issues, we propose a blockchain-based collaborative loyalty program for a business consortium (BCLP). The system allows enterprises to integrate into the business alliance independently, without the need for the central party to dominate, and customers can exchange one point for various items at any time, without worrying about the point expiration. Ethereum smart contracts can record our core information: reward points (RP) in a decentralized way, and provide antitampering, auditing events, and other functions to avoid attacks. The main contributions of this paper are as follows:
- Bank Point Liabilities
- Banks recognize funds deposited by issuers as accounts payable, allowing funds to be used more freely
- ERC-20 token standard
- RP in our system are derived from the ERC-20 token standard
- P2P transaction
- Thanks to blockchain technology, every role can conduct peer-to-peer transactions securely in real time
- User Point Exchange
- Users can exchange reward points on our platform for other points issued by other loyalty program issuers and vice versa
- Regulatory Authority
- Regulatory authorities are required to monitor abnormal behavior in the system.
- Node v14.15.4
- Web3.js v1.6.0
- Express v4.17.1
- React v17.0.2
- Sqlite3 v5.0.2
- IPFS HTTP Client v33.1.1
- Truffle v5.4.17 or Remix - Ethereum IDE
- Solidity v0.8.0
Before getting started, you should build the blockchain environment (e.g., Ethereum nodes).
-
node
apt install nodejs
-
npm
apt install npm
-
truffle
npm install -g truffle
-
node & npm
brew install node
-
truffle
npm install -g truffle
(optional) If you don't have truffle
toolkit, you also can compile your contract code by online IDE, e.g., Remix.
-
Clone the repo
git clone https://github.com/HC-TW/BCLP.git
-
Install NPM packages
npm install
-
Set up some predefined roles (2_deploy_contracts.js)
// Pre-defined role instance.addBank('You can change to your own public address'); instance.addBank('You can change to your own public address'); instance.addIssuer('You can change to your own public address'); instance.addUser('You can change to your own public address'); instance.addMerchant('You can change to your own public address');
-
Set up Admin & Regulator (config.js)
exports.Adminconfig = { address: 'You can change to your own public address', key: 'You must change to the corresponding private key' } exports.Regulatorconfig = { address: 'You can change to your own public address', }
-
Compile smart contract code
truffle migrate --reset
-
Launch backend server
node src/server.js
-
Launch Dapp
npm run start
The following figure demonstrates the system use case.
Han Chin - jimmy12282@gmail.com