A Loyalty System Incorporated with Blockchain and Call Auction

: A loyalty program is a type of incentive to reward customers’ perceived value and enhance their purchasing behavior. The key to the success of a loyalty program is to allow customers to more actively participate in the program. One possible solution is to allow customers to sell out idle loyalty points and buy in the points that they need. On the basis of a call auction, this study designs a peer-to-peer exchange mechanism for customers to realize the above trade. In addition, a blockchain-based system is developed to support the issuance, redemption, and exchange of loyalty points. In this study, Hyperledger Fabric is adopted as the underlying blockchain technology because it has some features that are beneﬁcial to a cross-organizational coalition loyalty program. This study also proposes a feasible multi-host deployment scheme for the Hyperledger Fabric blockchain network that is suitable for our application scenario. Finally, some implementation results are given to demonstrate the system process from the perspective of the application layer. The mechanism proposed in this study is helpful to improve the likelihood of successfully exchanging points, thus accelerating the circulation and use of loyalty points.


Introduction
Customer relationship management (CRM) appeared in the 1970s and, since then, CRM has become a popular tool to enhance customer interaction and knowledge management. CRM can help enterprises to better understand customers and has important positive impacts on performance [1,2]. A loyalty program (LP) is an important component of customer relationship management, which can be used to identify, reward, and retain profitable customers [3]. Most LPs reward customers in the form of points, which can be exchanged for goods or services. As an incentive, the LP generates perceived value and guides customers to continue to purchase or use enterprise services related to the program. Therefore, an LP is an effective way to strengthen customers' purchasing behavior and their relationship with the enterprise [4]. An LP not only brings benefits to customers, but also creates additional revenue for enterprises [5]. Let us take the frequent-guest program, which is a loyalty program widely adopted in the hotel industry, as an example. Extra expenses include tangible costs, such as affiliation fees, rigid membership benefits, and advertising fees, and intangible costs, such as management, administration, communication efforts, and alternative uses of money [6,7]. The control of operating costs is a challenge when designing loyalty programs. Moreover, the effectiveness of loyalty programs has recently been questioned [8]. According to the Bond Brand Loyalty Report, the total global loyalty programs expenditure in 2019 was approximately USD 323 billion. On average, consumers belong to 14.8 loyalty programs, but only 6.7 of them are actively involved. In other words, although the number of members continues to rise, only half of them are active [9]. Therefore, improving the effectiveness of loyalty programs by increasing customers' participation is also an important issue.
Many industry experts and researchers have suggested that modern Information and Communication Technology (ICT) can help to improve the effectiveness and attractiveness of loyalty programs [8,[10][11][12]. Recently, an emerging information technology called blockchain has attracted more and more attention to alleviate the issues of LPs [13]. Blockchain is a distributed ledger governed by a peer-to-peer network. Data stored in the blockchain are immutable and traceable, so it is suitable for managing intangible assets, such as loyalty points [14,15]. In addition to reducing the operating costs of LPs, blockchainenabled LP schemes can also affect customers' LP participation behaviors through three characteristics: near-real-time transactions, a coalition loyalty program of multiple brands, and peer-to-peer point exchange. These characteristics can cultivate customers' motivation to participate in LPs by delivering various values within LPs, and thus improve customer participation [16]. There have been studies that propose blockchain-based LP systems achieving these features. Some researchers designed a unified platform for companies to form an alliance to issue electronic reward points and support cross-organizational redemption. Moreover, the value of loyalty points is set by tokens and hence determines the peer-to-peer point exchange rates [5,[17][18][19]. Since the LP is not a new concept, most companies may have their own LP systems, and the migration of the legacy system may be very laborious and time-consuming, resulting in companies resisting change. Chen et al. [20] designed a three-layer architecture for a blockchain-enabled LP system to make minimal modifications to legacy systems. Customers can use points from company 'A' to redeem goods or services from company B based on the pre-set exchange rate between the points of the two companies. However, the rule to determine the exchange rate is not specified in their paper. In addition, Chen et al.'s architecture does not seem to take into account the exchange of points between customers. Pramanik et al. [21] proposed a blockchain-based reward point exchange system that allowed users to directly exchange points issued by different companies. A customer who owns points for company 'B' but wants to redeem them on the goods and services of company 'A' can propose an exchange of point 'A' for point 'B'. The quantity of point 'A' and point 'B' to be exchanged is specified by the person proposing the exchange. If they are satisfied with the quantity and accept the proposal, the exchange is executed. Companies can benefit from such a system because their respective redemption rules can be retained, and there is little change to their original LP system. In addition, the exchange rate of points does not need to be priced in tokens, so tokens can be eliminated. However, there must be one person who has a sufficient quantity of point 'B' and is satisfied with the exchange rate, otherwise the exchange will not be executed. It is reasonably foreseeable that some proposals may be pending for a long time.
If companies wish to form a consortium to offer a coalition loyalty program but do not want to be hindered by legacy system mitigation, a blockchain-based platform supporting peer-to-peer loyalty point exchange is a good solution. The aim of this paper is to propose a blockchain-based platform enabling customers to exchange their own loyalty points. Different from Pramanik et al. [21], we designed a fair trading mechanism to automatically match the two sides of the exchange. Moreover, even if there is no single person possessing a sufficient quantity of points, the exchange can still be performed because our mechanism can gather the same points to fulfill the exchange order. The concept of the proposed mechanism is borrowed from the call auction mechanism of the stock exchange market. In addition, this study adopts Hyperledger Fabric as the underlying blockchain platform because it has some features suitable for business applications. The remainder of this paper is organized as follows: in Section 2, Hyperledger Fabric and the call auction mechanism are briefly introduced, and research related to blockchain-based loyalty point systems is reviewed; in Section 3, the proposed trading mechanism and the proposed blockchainbased LP system are described in detail; in Section 4, the experimental results are presented; and, finally, the discussion and conclusions are provided in Section 5.

Blockchain and Hyperledger Fabric
Initially, blockchain was used as the underlying technology of Bitcoin, proposed by Satoshi Nakamoto [22]. Each transaction is recorded as a block, and these blocks are linked securely to prevent any block from being changed or a block from being inserted between two existing blocks. This makes the blockchain tamper-proof and provides the key advantage of immutability. Moreover, blockchain is decentralized and maintained by the collective, which makes the data stored on the blockchain more reliable [23]. According to the mechanism of participation and access, blockchain can be divided into public, consortium, and private [24,25]. Therefore, a public blockchain is open to everyone. Anyone can participate in the maintenance and data reading of the blockchain. It is completely decentralized and not controlled by any organization. Bitcoin is a typical example of a public blockchain. Because it is completely open and transparent, maintenance requires huge computing power and lacks transactional privacy. Contrary to a public blockchain, a private blockchain is open to an individual or entity. There is an organization that controls who can participate in and maintain the shared ledger. Although limited decentralization makes transactions faster and more efficient, a private blockchain fails to make full use of the decentralized trust foundation, which limits its application. A consortium blockchain is open to specific organizations and groups, and these pre-selected organizations decide who can perform transactions or access data. In other words, a consortium blockchain platform is governed by multiple organizations. No organization can engage in any illegal activities because every other organization on the platform carries out monitoring and checking. Therefore, a consortium blockchain can help enterprises to trust and collaborate with each other. Such a blockchain can adopt a consensus algorithm that is more efficient than the public blockchain. A consortium blockchain is very suitable for enterprises that require all participants to obtain permission and share the responsibility of maintaining the blockchain.
Hyperledger Fabric, founded by the Linux Foundation, is a consortium blockchain especially designed for large-scale enterprises [26]. Compared with other common distributed ledger or blockchain platforms, Hyperledger Fabric offers some important differentiated functions. First of all, Fabric has a highly modular and configurable structure, which can provide versatility and optimization for various industries. Second, Fabric supports the writing of smart contracts in general programming languages, such as Java, Go, and Node.js, rather than domain-specific languages (DSL) [27]. This means that most companies already have the skills needed to develop smart contracts and no extra training is needed to learn a new language. Third, Fabric uses permissioned access, and participants know each other and are not anonymous. In addition, one of the most important differences between Fabric and other blockchain technologies is that it supports a hot-swappable consensus mechanism, enabling the platform to more effectively adapt to specific use cases and trust models. Finally, Fabric does not need a cryptocurrency consensus protocol to deal with expensive mining or promote the execution of smart contracts, which means that it only needs to deploy the platform at approximately the same operating costs as other decentralized systems. Moreover, compared with R3 Corda, which is also an enterprise-grade platform and does not require cryptocurrency, Hyperledger Fabric achieves better throughput [28]. In view of these unique design features, Hyperledger Fabric is used as the underlying blockchain platform in this study.

Blockchain-Based Loyalty Point Systems
Due to the features of immutability and traceability, blockchain has attracted attention in managing intangible assets, such as loyalty points. According to [29], the inherent properties of blockchain, such as immutability and distributed data storage, have significant positive impacts on institution-based trust, which is helpful in implementing loyalty programs that can maintain long-lasting relationships between service providers and their customers. The key reasons that customers may continue accumulating or using loyalty points are the diversity of redeemable goods or services and the convenience of using loyalty points [20]. Therefore, some researchers began to propose loyalty point systems based on blockchain to support cross-company or cross-industry alliance.
Liao et al. [18] put forward a blockchain-based LP platform to promote the cooperative issuance of electronic reward points and support cross-organizational redemption. In Liao et al.'s system, the transactions involving point issuance and redemption were recorded on the blockchain platform 'Ethereum'. Technically, a company can launch an Ethereum node on its own, or seek out an Ethereum node service provider to join the platform. These Ethereum nodes are dedicated to mining to make the system more credible. Relying on other mining nodes is also an option for the security of the network. Sönmeztürk et al. [19] also developed a loyalty system based on the Ethereum platform. Sönmeztürk et al.'s system allowed companies to issue ERC20-compliant tokens, called TECH, as loyalty points. Since TECH is an ERC20-compatible token, it cannot only be used to pay any company within the alliance for services or goods, but can also be traded in the exchange market. Moreover, customers can exchange TECH with cryptocurrencies. Customers can check their wallet and check their balance of Ether and TECH tokens. Because Ethereum is susceptible to low transactions with high fees, some researchers adopted other blockchain platforms. Agrawal et al. also proposed a unified blockchainbased LP platform and adopted two different blockchain technologies: one is Stellar [30], and the other is Hyperledger Fabric. Stellar is used to manage the loyalty points of the companies and customers. Stellar is similar to Ethereum, but it sacrifices decentralization and security to gain better transaction speed and cost. Hyperledger Fabric provides confidentiality and transaction privacy between different groups of companies. Since Stellar was originally a decentralized payment platform that supports cross-border transactions, Agrawal et al.'s system allows customers to exchange loyalty points by making a trade offer. An example of a trade offer is to "Buy company A's loyalty coins with company B's 20 loyalty coins". If there is an offer, e.g., "Sell company A's loyalty coins for company B's 20 loyalty coin", then the two offers match, and the exchange is executed. In other words, only one-to-one matching is possible, and trading part of the volume is not allowed. Dominguez Perez et al. [5] proposed a loyalty program based on Waves blockchain, and, similar to Sönmeztürk et al. [19], they used Waves tokens as loyalty points. Different from Ethereum, using PoW (Proof of Work), Waves adopts lease PoS (Proof of Stake) as its consensus mechanism. Thus, the authors stated that Waves provides more flexibility than Ethereum [31].
Chen et al. [20] have conducted research on initiating a cross-industry horizontal alliance with the operators with a blockchain-based loyalty points system. They found that replacing the legacy system with a brand-new system is very costly, so it was not accepted by the operators because the legacy system already existed. Their research concluded that minimum modification of the legacy system is a basic design principle for a blockchainbased loyalty point system. Chen et al. mentioned that one of the tasks related to the design principle is to keep the original settlement rules of their respective companies. To achieve the cooperation of a loyalty program and consistent settlement rules, Chen et al. devised a method to set the exchange rate between different types of points. Assuming that the exchange rate between point 'A' and point 'B' is 2:1 and that the redemption cost of an item from company 'B' is 500 points 'B', then customers can exchange 1000 points 'A' for this item. In this way, the legacy system and the exchange rate of each company can remain stable. Pramanik et al. [21] proposed a blockchain-based loyalty point system that enables customers to exchange points with each other. A customer can make an offer to specify the details of the exchange transaction-for example, "buy 2000 points of company 'A' and sell 3000 points of company 'B'". If a customer wants to buy a certain number of points and another wants to sell the same number of points, their orders match, thus completing the exchange. Therefore, if a customer wants to redeem goods from company 'A' but only owns points for company 'B', they can exchange the points from company 'B' for points from company 'A'. As a result, the system of Pramanik et al. can achieve the purpose of keeping the original settlement rules. Furthermore, it is no longer necessary to pre-set the exchange rate. However, as with the system of Agrawal et al., Pramanik et al. 's system only provides one-to-one matching. In other words, the offer is either entirely transacted or not transacted at all. Therefore, the probability of successfully matching offers may not be satisfactory. It is reasonable to state that the probability would be improved if many-to-many matching was allowable or the points of an offer could be partially traded.

Call Auction Mechanism
In the stock market, investors place their orders to buy or sell at a certain price. Orders are periodically processed and executed using a price-time priority precedence hierarchy. Call auction is a matching method to determine the final execution price of these orders. During a call auction, buy and sell orders are put together in batches, and bids and offers are aggregated and matched with each other. Call auctions typically match many buy orders and many sell orders at one trade price. The trade price of a call auction is determined by the following principles [32]:

1.
Achieving the maximum trade volume such that buy orders with bid prices higher than the determined price and sell orders with an offer price lower than the determined price shall be all satisfied; 2.
If there are buy and sell orders with prices equal to the determined price, at least one type of order shall be fully satisfied; 3.
When more than two prices meet the above two principles, the price closest to the latest traded price in the current trading period shall be used. If there is not yet any traded price in the current period, the price closest to the auction reference price at market opening shall be used.
According to the above principles, all the buy orders whose bid prices are higher than the determined price, and all the sell orders whose offer prices are lower than the determined price, are traded at the determined price. Orders with the same prices as the determined price are traded according to the principle of time first. In addition, many-tomany matching is allowable. In other words, one or more buy orders may be matched with one or more sell orders. If some orders cannot be matched at the end of the current auction, they enter the next auction. Moreover, in a call auction, it is possible that only a part of the trade volume of an order is matched. The rest of the unmatched volume also enters the next auction. In summary, call auction leads to the maximum trading volume, and the trade price is fair to both buy and sell orders.
Similar to a stock exchange, a point exchange also pairs buy and sell orders to make a trade. Therefore, this study proposes a point trading platform that simulates the stock exchange market and uses call auction as the matching method. As mentioned earlier, call auction can bring benefits to our system. First of all, exchange orders are not limited to one-to-one matching. A buy order can be matched with multiple sell orders, and vice versa. Second, even if the total quantity in the market cannot meet the exchange order, partial matching can be obtained. For example, if there is one order to give point 'B' for point 'A' and three orders to give point 'A' for point 'B', the quantity of the former order is 20 'B's for 30 'A's, and the accumulated quantity of the latter three orders is 20 'A's for 20 'B's. In this case, the exchange of these four orders can still be executed, and only 20 'A's of the former order can be satisfied. Third, neither the buyer nor the seller suffers losses with the trade price determined by the call auction. If a buy order is traded, the trade price will be equal to or less than the bid price. Similarly, if a sell order is traded, the trade price will be equal to or greater than the offer price. Nevertheless, it remains unknown whether call auction can be successfully employed as a matching method for point exchange. The content of a point exchange order is not entirely the same as the content of a stock exchange order. Therefore, every point exchange order needs to be converted into a buy or sell order before entering a call auction. The detailed conversion method will be explained in Section 3.1.

The Proposed Method
This section is divided by subheadings and provide a concise and precise description of the experimental results, their interpretation, and the experimental conclusions that can be drawn.

The Trading Mechanism
In the stock exchange market, a trade order is an instruction given by an investor to indicate how many shares of a stock to buy or sell at a specific price. As regards the peer-to-peer point exchange, a trade order indicates that a quantity of one point is given to receive a quantity of another point in return. Obviously, the information provided by an order in stock exchange is different from the information provided by an order in point exchange. Therefore, a point exchange order requires pre-processing before entering the auction phase, and post-processing after the call auction is completed. We will explain in detail the items included in a stock exchange order and point exchange order and the pre-processing and post-processing.

A. Stock Exchange Order
The items in a trade order of stock exchange include stock code, trade type, trade quantity, price, and order time. The trade type is either buy or sell, so the price is a bid price for a buy order and an ask price for a sell order. Using a matching method, a buy order in the stock exchange market is matched with one or more sell orders, or vice versa. For cash trading, the investor who places a buy order needs to deposit cash at the trade price. Alternatively, the investor who places a sell order receives cash at the trade price. In the domestic stock exchange market, the price is in domestic currency.

B. Point Exchange Order
The behavior of peer-to-peer point exchange involves taking one point in return for another point. It can be seen as selling one point and buying another point at one time. Suppose that each type of point is coded: the items in a trade order of point exchange include the code of the points to buy, quantity of points to buy, code of points to sell, quantity of points to sell, and order time. If one customer wants to obtain a certain number of points and another customer wants to obtain the same number of points, their orders can be matched, and both parties will receive the points that they need. Since point exchange is similar to stock exchange to a certain extent, this study aims to apply call auction as the matching method. However, the items of a point exchange order need to be pre-processed to correspond to the items of a stock exchange order.

C. Pre-Processing
Let X and Y denote the codes of two different points, and X is lexicographically less than Y. Let Qty_X and Qty_Y denote the order quantities of X and Y, respectively. A point exchange order submitted at time T is pre-processed according to the following two cases.  In other words, the price of the point X is derived from the exchange rate against the point Y, and in this way we can obtain a point exchange order corresponding to a buy or sell order of stock exchange. All the buy and sell orders with the same trade target and currency unit are collected for call auction. For example, a customer wants to give 30 points coded as 1200 in exchange for 20 points coded as 1100. Suppose that the customer places the order at 10:10:10 on 15 September 2021; the order is then converted into a buy order containing the following information:

D. Post-processing
If a buy or sell order is successfully matched, the order will be traded at the price determined by call auction. Then, post-processing is used to restore the order to the original exchange information. The post-processing of a matched order can be divided into the following two cases.

Blockchain-Based Loyalty Point System
The main function of the proposed system includes registration, issuance, redemption, and exchange. Before explaining the system process in detail, we define the following symbols:  Figure 1 illustrates the whole system process from the point of view of system users. Users of the proposed system are mainly companies and customers. The issuance and redemption occur between a company and a customer, but in order to express the peer-topeer point exchange, we add two companies and two customers in Figure 1. The following is a detailed description of Figure 1. The functions of registration, issuance, and redemption are only described for company X and customer A. Figure 1 illustrates the whole system process from the point of view of system users. Users of the proposed system are mainly companies and customers. The issuance and redemption occur between a company and a customer, but in order to express the peerto-peer point exchange, we add two companies and two customers in Figure 1. The following is a detailed description of Figure 1. The functions of registration, issuance, and redemption are only described for company X and customer A. (1) Registration In this stage, a pair of ECC public and private keys is generated for company X and customer A, respectively. The secret keys, ecc_skX and ecc_skA, are kept secretly, and the public keys, ecc_pkX and ecc_pkA, are recorded in the blockchain. The key pairs are used for a digital signature in a later phase.
(2) Issuance After customer A interacts with company X, point X and its quantity QX associated with customer A's identity idA are recorded in the blockchain. The quantity QX is determined according to the issuance rule set by company X.

(3) Redemption
When customer A wants to purchase the products of company X, customer A withdraws the required quantity QX of point X from the blockchain. Customer A generates digital signature DSA by calculating Enc(H(X|QX), ecc_skA), where '|' represents a concatenation operator. Then, customer A submits X, QX, DSA to company X, and company X queries ecc_pkA from the blockchain and checks the authenticity of X and QX by comparing Dec(DSA, ecc_pkA) with H(X|QX). If they match, customer A will successfully obtain products from company X.
(4) Exchange (1) Registration In this stage, a pair of ECC public and private keys is generated for company X and customer A, respectively. The secret keys, ecc_sk X and ecc_sk A , are kept secretly, and the public keys, ecc_pk X and ecc_pk A , are recorded in the blockchain. The key pairs are used for a digital signature in a later phase.
(2) Issuance After customer A interacts with company X, point X and its quantity Q X associated with customer A's identity id A are recorded in the blockchain. The quantity Q X is determined according to the issuance rule set by company X.

(3) Redemption
When customer A wants to purchase the products of company X, customer A withdraws the required quantity Q X of point X from the blockchain. Customer A generates digital signature DS A by calculating Enc(H(X|Q X ), ecc_sk A ), where '|' represents a concatenation operator. Then, customer A submits X, Q X , DS A to company X, and company X queries ecc_pk A from the blockchain and checks the authenticity of X and Q X by comparing Dec(DS A , ecc_pk A ) with H(X|Q X ). If they match, customer A will successfully obtain products from company X. In this study, Hyperledger Fabric is used as the underlying blockchain platform, and system users interact with Hyperledger Fabric through the applications, as shown in Figure 2. Hyperledger Fabric provides a number of SDKs (Software Development Kits) for several common programming languages. The Hyperledger Fabric Client SDK provides various APIs (Application Programming Interfaces), enabling applications to send requests to, and receive responds from, the Hyperledger Fabric blockchain network. The deployment of the Hyperledger Fabric blockchain network includes an orderer cluster and a consortium composed of two or more organizations, as shown in Figure 3. At present, some implementations of the ordering service are available. In this study, Raft, officially recommended by Hyperledger Fabric, was adopted. The organizations refer to the companies that participate in the collaborative loyalty program. The nodes in the Hyperledger Fabric architecture play a variety of roles, including endorser, committer, orderer, and CA (Certificate Authority). An orderer provides services to arrange and package transactions into blocks and also provides a service of crash fault tolerance (CFT). The Hyperledger Fabric CA is responsible for the registration of identities and certificate renewal and revocation. The client application signs and submits a transaction proposal to the endorsement peer. The endorsement peer is responsible for verifying the identity and authority of the submitting client, approving the execution results of the chaincode, and returning the verification output to the client. Committer is the default role of each peer in the Hyperledger Fabric architecture and is responsible for committing transactions and maintaining the ledger and state. The services of the endorser and committer are provided by the organizations in the consortium. In addition to the various roles of nodes mentioned above, the Hyperledger Fabric architecture includes a communications mechanism, called a channel, which is used to define access control between organizations in the consortium. The system channel is created at the beginning to define the set of ordering nodes and store the consortium configuration. Whenever a new organization joins or an organization exits a consortium, the consortium configuration in the system channel needs to be updated to reflect these changes. Application channels are used to define the private communication among consortium members, in which members share the same ledger and chaincode for a specific business purpose. comparisons show no difference, then point Y and quantity QY associated with idA and point X and quantity QX associated with idB are recorded in the blockchain.
In this study, Hyperledger Fabric is used as the underlying blockchain platform, and system users interact with Hyperledger Fabric through the applications, as shown in Figure 2. Hyperledger Fabric provides a number of SDKs (Software Development Kits) for several common programming languages. The Hyperledger Fabric Client SDK provides various APIs (Application Programming Interfaces), enabling applications to send requests to, and receive responds from, the Hyperledger Fabric blockchain network. The deployment of the Hyperledger Fabric blockchain network includes an orderer cluster and a consortium composed of two or more organizations, as shown in Figure 3. At present, some implementations of the ordering service are available. In this study, Raft, officially recommended by Hyperledger Fabric, was adopted. The organizations refer to the companies that participate in the collaborative loyalty program. The nodes in the Hyperledger Fabric architecture play a variety of roles, including endorser, committer, orderer, and CA (Certificate Authority). An orderer provides services to arrange and package transactions into blocks and also provides a service of crash fault tolerance (CFT). The Hyperledger Fabric CA is responsible for the registration of identities and certificate renewal and revocation. The client application signs and submits a transaction proposal to the endorsement peer. The endorsement peer is responsible for verifying the identity and authority of the submitting client, approving the execution results of the chaincode, and returning the verification output to the client. Committer is the default role of each peer in the Hyperledger Fabric architecture and is responsible for committing transactions and maintaining the ledger and state. The services of the endorser and committer are provided by the organizations in the consortium. In addition to the various roles of nodes mentioned above, the Hyperledger Fabric architecture includes a communications mechanism, called a channel, which is used to define access control between organizations in the consortium. The system channel is created at the beginning to define the set of ordering nodes and store the consortium configuration. Whenever a new organization joins or an organization exits a consortium, the consortium configuration in the system channel needs to be updated to reflect these changes. Application channels are used to define the private communication among consortium members, in which members share the same ledger and chaincode for a specific business purpose.

System Interface
As mentioned in Section 3.1, the proposed system includes four functions: registra-

System Interface
As mentioned in Section 3.1, the proposed system includes four functions: registration, issuance, redemption, and exchange. Below, we introduce some interfaces of these four functions. In addition, the blockchain keeps the entire history of transactions and customers' loyalty points in full detail. Therefore, the proposed system also provides a function for customers to examine the transaction history and the balance of points in their accounts.

A. Registration
Initially, customers need to fill in their identity number, name, and password to register in the system (see Figure 4a). After this, the proposed system generates a pair of ECC private and public keys for the customer, and the public key is recorded in the blockchain. Members of the consortium are assigned identities and passwords by default, and they can log in to the administrative platform using the identities and passwords, as shown in Figure 4b.

System Interface
As mentioned in Section 3.1, the proposed system includes four functions: registration, issuance, redemption, and exchange. Below, we introduce some interfaces of these four functions. In addition, the blockchain keeps the entire history of transactions and customers' loyalty points in full detail. Therefore, the proposed system also provides a function for customers to examine the transaction history and the balance of points in their accounts.

A. Registration
Initially, customers need to fill in their identity number, name, and password to register in the system (see Figure 4a). After this, the proposed system generates a pair of ECC private and public keys for the customer, and the public key is recorded in the blockchain. Members of the consortium are assigned identities and passwords by default, and they can log in to the administrative platform using the identities and passwords, as shown in Figure 4b.

B. Issuance
After logging into the system, the issuer can set the consumption amount corresponding to one loyalty point (see Figure 5a). Given the consumer's ID number and consumption amount (see Figure 5b), the system converts the points that should be issued to the consumer according to the issuance rule, and writes the issuance record in the blockchain.
JTAER 2022, 17, FOR PEER REVIEW 11 After logging into the system, the issuer can set the consumption amount corresponding to one loyalty point (see Figure 5a). Given the consumer's ID number and consumption amount (see Figure 5b), the system converts the points that should be issued to the consumer according to the issuance rule, and writes the issuance record in the blockchain.

C. Redemption
Customers can view the redeemable products of each company and the points that they need to spend on each product, as shown in Figure 6a. Recall the system process of

C. Redemption
Customers can view the redeemable products of each company and the points that they need to spend on each product, as shown in Figure 6a. Recall the system process of redemption described in Section 3.2. The customer needs to read points from the blockchain and generate a digital signature and then submit these to the company. The company then uses the customer's public key to verify the submitted information. Corresponding to the above system process of redemption, the overall operations of system users are described as follows. The customer presses the redemption button of the product to be redeemed, and then a QR code is generated, as shown in Figure 6b. Next, the customer presents the QR code to the company, and the company scans the QR code to complete the verification. If the verification is passed, the system provides a message, as shown in Figure 6c, and the company can provide the product to the customer.

C. Redemption
Customers can view the redeemable products of each company and the points that they need to spend on each product, as shown in Figure 6a. Recall the system process of redemption described in Section 3.2. The customer needs to read points from the blockchain and generate a digital signature and then submit these to the company. The company then uses the customer's public key to verify the submitted information. Corresponding to the above system process of redemption, the overall operations of system users are described as follows. The customer presses the redemption button of the product to be redeemed, and then a QR code is generated, as shown in Figure 6b. Next, the customer presents the QR code to the company, and the company scans the QR code to complete the verification. If the verification is passed, the system provides a message, as shown in Figure 6c, and the company can provide the product to the customer.

D. Exchange
A customer can make an exchange order using the procedure shown in Figure 7a and check the transaction status, as shown in Figure 7b. Figure 7b lists two transactions, in which the first one has succeeded and been completed, and the second one is waiting for matching. By pressing the cancel button, the customer can cancel a transaction that is waiting for matching.

E. List
The entire history of all transactions is kept on the blockchain, so the proposed system provides an interface for customers to inquire about the list of loyalty point transactions, as shown in Figure 8a. In addition, a customer can also check the balance of each type of point, as shown in Figure 8b.

D. Exchange
A customer can make an exchange order using the procedure shown in Figure 7a and check the transaction status, as shown in Figure 7b. Figure 7b lists two transactions, in which the first one has succeeded and been completed, and the second one is waiting for matching. By pressing the cancel button, the customer can cancel a transaction that is waiting for matching. ing for matching.

E. List
The entire history of all transactions is kept on the blockchain, so the proposed system provides an interface for customers to inquire about the list of loyalty point transactions, as shown in Figure 8a. In addition, a customer can also check the balance of each type of point, as shown in Figure 8b.

E. List
The entire history of all transactions is kept on the blockchain, so the proposed system provides an interface for customers to inquire about the list of loyalty point transactions, as shown in Figure 8a. In addition, a customer can also check the balance of each type of point, as shown in Figure 8b.

Performance Evaluation
Our Raft-based multi-host blockchain network comprised five orderers and four peers and adopted Hyperledger Fabric 2.1.1 with parameters BatchTimeout = 100 ms and MaxMessageCount = 10. The parameter BatchTimeout is the amount of time to wait after the first transaction arrives for additional transactions before cutting a block, and Max-MessageCount is the maximum number of messages permitted in a batch [33]. For the blockchain, there are two operations in a proposal transaction: one is query, and the other is invoke. The former means reading data from the ledger, and the latter means writing data into the ledger. In this research, we carried out a system test by sending multiple requests of query or invoke to the blockchain at the same time to demonstrate the performance of our system.

A. Query
We wrote automatic scripts to perform three different tests with 10, 30, and 50 query operations, respectively. Each test was repeated 30 times, and the required time from receiving the query to returning the result was recorded. The bar charts and statistics of the three tests are shown in Figure 9.
B. Invoke

Performance Evaluation
Our Raft-based multi-host blockchain network comprised five orderers and four peers and adopted Hyperledger Fabric 2.1.1 with parameters BatchTimeout = 100 ms and MaxMessageCount = 10. The parameter BatchTimeout is the amount of time to wait after the first transaction arrives for additional transactions before cutting a block, and MaxMessageCount is the maximum number of messages permitted in a batch [33]. For the blockchain, there are two operations in a proposal transaction: one is query, and the other is invoke. The former means reading data from the ledger, and the latter means writing data into the ledger. In this research, we carried out a system test by sending multiple requests of query or invoke to the blockchain at the same time to demonstrate the performance of our system.

A. Query
We wrote automatic scripts to perform three different tests with 10, 30, and 50 query operations, respectively. Each test was repeated 30 times, and the required time from receiving the query to returning the result was recorded. The bar charts and statistics of the three tests are shown in Figure 9.

B. Invoke
Similar to the above test, we also performed three different tests with 10, 30, and 50 invoke operations, respectively. Each test was repeated 30 times, and the required time from receiving the request of invoking to finishing the writing was recorded. The bar charts and statistics of the three tests are shown in Figure 10.

Discussion and Conclusions
This research proposed a loyalty point management system based on blockchain. Having the features of decentralization and immutability, blockchain is very suitable for managing intangible assets, such as loyalty points. The key for customers to accumulate loyalty points and actively participate in loyalty program is to provide a large variety of

Discussion and Conclusions
This research proposed a loyalty point management system based on blockchain. Having the features of decentralization and immutability, blockchain is very suitable for managing intangible assets, such as loyalty points. The key for customers to accumulate loyalty points and actively participate in loyalty program is to provide a large variety of items on which to redeem points. Therefore, the coalition loyalty program has become a trend. As a consortium blockchain platform, Hyperledger Fabric provides various frameworks, tools, and libraries for enterprise-grade and cross-industry blockchain deployments. In view of these designs, suitable for enterprise alliances, the proposed system adopted Hyperledger Fabric as the underlying blockchain platform. According to Chen et al.'s research, a blockchain-enabled loyalty points system should induce minimum modifications to legacy systems. Chen et al. suggested setting an exchange rate between points of different companies so that customers could exchange the points of one company for the goods of another company as long as they gave the equivalent points according to the exchange rate. By setting the exchange rate, companies do not need to change their original settlement rules. However, it may take some time to reach an agreement on the exchange rate because companies may have different opinions on the value of points [20]. Therefore, this paper proposed a blockchain-based system that enables customers to exchange the points that they obtain from different companies. With the help of peer-to-peer exchange, customers can purchase the items of a company with the points issued by this company. As a result, companies need not change their original settlement rules, nor do they need to set the exchange rate in advance.
Although a few studies also propose peer-to-peer point exchange, they all use one-toone matching. In other words, two orders can only be traded when the type and quantity of points to be exchanged exactly match, which means that the probability that one order can be traded may not be high. The most important contribution of this study is to employ the call auction method of the stock exchange market to realize many-to-many matching. However, the content of a point exchange order is not exactly the same as that of a stock exchange order, so it is not practicable to directly apply call auction to match point exchange orders. In this study, an innovative technique to convert a point exchange order is proposed, which ensures that the converted point exchange order corresponds to a buy or sell order in the stock exchange market. After this, it becomes practicable to use call auction to match orders in a loyalty point exchange. In addition to many-to-many matching, call auctions can also allow the partial trading of orders. In other words, if the total amount on the market only satisfies a part of an order, then the satisfied part can be traded, and the remaining part remains not traded. Consequently, the introduction of call auction in this study can increase the probability of orders being traded.
The matching method proposed in this study can bring benefits to our system. First of all, we do not need tokens or coins to value loyalty points, so it is not necessary to use a blockchain platform with built-in cryptocurrency. For this reason, we can adopt Hyperledger Fabric and take advantage of its enterprise-level functions. Secondly, companies can eliminate the negotiation process regarding exchange rates between different types of points. In fact, our method implies that it is actually the customers who decide on the exchange rate of points. In addition to these benefits brought by the matching method, the point exchange platform also has some advantages. From the customers' point of view, the platform can prevent their loyalty points from becoming idle and speed up the circulation of points. It is also reasonable to state that the platform can increase customers' willingness to accrue points. From the companies' point of view, companies may have complementary advantages and form a cooperative alliance to share common benefits. Over time, the opportunity for the growth of users within each company may increase through cross-company promotion. It is foreseeable that the point exchange platform will become a market mechanism under which the power of demand and supply determines the value of points.
Peer-to-peer point exchange is the reciprocal transfer of an asset. In the future, the nonreciprocal transfer of a loyalty point is worth considering -that is, loyalty point donation. In addition, there are other means to increase the activation of loyalty points. For example, multiple customers can gather loyalty points together, so that the number of loyalty points can reach the redemption threshold as soon as possible. These customers can agree in advance how to share the products after redemption. When multiple customers cooperate, trust and transparency become the keys to successful cooperation. Some important information, such as the number of points collected by each person, needs to be accessible by everyone within the group. In this case, blockchain is also very suitable for storing such information. Therefore, efforts will be made in future studies to develop a blockchain-based platform to support the joint collection of loyalty points.