Skip to content

nctu-dcs-lab/Blockchain-based-Collaborative-Loyalty-Program-for-Business-Consortium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BCLP


Blockchain-based Collaborative Loyalty Program for Business Consortium
Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contact

About The Project

Ecosystem

rp_and_money_flow

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.

System Architecture

system_architecture

Built With

Getting Started

Before getting started, you should build the blockchain environment (e.g., Ethereum nodes).

Prerequisites

For Ubuntu

  • node

    apt install nodejs
  • npm

    apt install npm
  • truffle

    npm install -g truffle

For macOS

  • 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.

Installation

  1. Clone the repo

    git clone https://github.com/HC-TW/BCLP.git
  2. Install NPM packages

    npm install
  3. 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');
  4. 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',
    }
  5. Compile smart contract code

    truffle migrate --reset
  6. Launch backend server

    node src/server.js
  7. Launch Dapp

    npm run start

Usage

The following figure demonstrates the system use case.

system_use_case

Contact

Han Chin - [email protected]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published