Blockchain-Based Sustainable Retail Loyalty Program
Blockchain-Based Sustainable Retail Loyalty Program
Blockchain-Based Sustainable Retail Loyalty Program
ABSTRACT This paper addresses the issue of sustainability in retail sales, where the composition of
the products themselves, their production and packaging process, and their transport to the point of sale
play an important role. We propose a solution to apply a unified system of environmental product rating
in different retail chains where trust is ensured through a distributed ledger. The system allows fair and
transparent rewards for customers who purchase eco-friendly products while also maintaining their privacy.
The prototype of the decentralized application for the uniform loyalty system based on the Algorand
blockchain has shown promising results in terms of throughput and cost efficiency. We believe that the
prototype has the potential to revolutionize loyalty systems and promote sustainable practices. This study
provides key insights into how to interconnect retailers and customers into a uniform reward program, how
to motivate customers to purchase sustainable and eco-friendly goods, and how retailers can manage the
amount of reward for the given Eco-score categories.
The blockchain is a distributed ledger with cryptograph- the Algorand distributed ledger.1 Then, we show its
ically secure peer-to-peer access. Updating records in the performance results.
ledger can be done only with the consent of all parties The rest of this paper is organized into the following
involved. The basic principle of this technology is to store sections. An analysis of the distributed ledger Algorand and
data in a chain of blocks where each block references its similar solutions in the field of loyalty systems are given in
predecessor. Changing one of the blocks means modifying Section II. Based on the study, we propose a solution for
all its successors. However, this is computationally extremely the architecture of the unified loyalty system to reward cus-
difficult as the number of blocks grows. As a result, we can tomers for purchasing eco-friendly and sustainable products
consider these stored data to be immutable [3]. Consensual in Section III. The next section is Evaluation (IV, which aims
algorithms, such as Proof of Work (PoW) and Proof of to ensure that the solution is correct, and we also perform a
Stake (PoS), are basic approaches to reaching a consensus variety of tests here. Section V discusses the results and their
between participants. Suppose that the members of the loyalty implications, and we summarize the paper and its novelty in
program should be rewarded for purchasing green products. Section VI.
In that case, the system must have a minimal negative envi-
ronmental impact. Therefore, the use of PoW does not make II. STATE OF THE ART
sense due to the high consumption of miner computers [4]. In this section, we first discuss eco-initiatives to purchase
The consensus algorithm is very important in selecting a sustainable products. Subsequently, we focus on blockchain
blockchain platform for such a system. Another important platforms suitable for loyalty systems with minimum negative
parameter is the throughput, which should at least chase a effects on the environment. The analysis mainly contains the
value similar to that of traditional payment systems. principles of Algorand, which seems to be the most ecologi-
Our goal is to design a unified loyalty system architecture cally oriented blockchain. Finally, we analyze existing loyalty
in which customers will be rewarded through tokens for systems based on blockchain and explain the advantages,
purchases in a chain store. However, this reward will not be disadvantages, and possibilities for improvement.
based only on the total purchase amount. The Eco-score and
price of each product will be used as input parameters to A. ECO-INITIATIVES
calculate the total reward. The product will be represented Several retail chains and voluntary initiatives are already
using the Eco-score expressed in letters from A to E. In order exploring methods to advance the issue of the sustainability of
to preserve some freedom for retailers, they will be able to set products and the way they are distributed to end customers.
the percentage of the reward for products in each category as In July 2021, a group of young, environmentally conscious
they wish, but they must follow a gradual increase from the Europeans published a petition to introduce a European Eco-
worst category E to the best category A. The higher reward score [5] to rate the environmental impact of products manu-
for a product with a better Eco-score can instigate customers factured or sold within the European Union. The purpose is to
to buy these products frequently. motivate end consumers to buy environmentally sustainable
The contributions of this paper are as follows: products based on their standard rating on a scale from A to E.
• We describe the drawbacks of traditional loyalty pro- The French ECO2 Initiative [6] has proposed a solution for
grams and examine alternatives using blockchain to the ecological assessment of food products, also requested
create a uniform loyalty program to reduce carbon foot- in the petition mentioned above. They have designed an
print and energy consumption and increase interest in algorithm to calculate an ecological score based on the life
people in sustainable products. cycle of each food and other related factors. As shown in
• We design the architecture of a unified loyalty system for Figure 1, the calculation considers data about the impact
retailers and customers where trust is ensured through a of the production, packaging, and transport process on the
distributed ledger. environment stored in a database. Other considered factors
• Designed architecture targets rewarding customers who are packaging size and its potential for recycling, impact
buy eco-friendly and sustainable products. on endangered plants or animal species, and the creation of
• The decentralized approach of this solution enables user greenhouse gases in cultivation considering the seasonality
empowerment in loyalty programs. Customers get con- of food. As a result, a score from 0 to 100 is converted to the
trol over their loyalty rewards and their data. rating scale.
• We expand the frontier of knowledge and better adapt- Well-known retail chains are already dealing with the issue
ability among people within the token economy design of product sustainability. An example is the Lidl2 supermar-
aiming at sustainable behaviors. ket chain which labeled approximately 140 products from
• It is also improving the transparency of eco-rating prod- its range with Eco-Score labels in stores located in Berlin in
ucts. Further, retailers do not need to store private the first half of 2021. There are five levels in total, from the
data because loyalty points are bonded to their wallet green level ‘A’ to the worst level ‘E’ in red. The methodology
addresses.
• Based on that architecture, we implement a web appli- 1 https://www.algorand.com/
cation for a unified loyalty system that cooperates with 2 https://unternehmen.lidl.de/pdf/show/51552
• Ledger database - combines aspects of traditional rendering cheating illogical for them. Consensus is reached
databases with the advantages of blockchain technology. when a supermajority of the total amount of staked tokens
A centralized ledger database (CLD) provides universal is in the hands of non-malicious verifiers. The minority is
audit and verification for applications involving parties thus prevented from cheating, and for the majority, cheating
that may not trust each other. It offers robust auditability would mean depreciating the value of their own resources
through the use of time notary anchors generated by to their detriment. This consensus algorithm achieves high
a two-way peg protocol, which enhances the reliabil- efficiency and speed. However, it requires minimal comput-
ity and integrity of the system. The main distinctions ing power, resulting in a low environmental impact during
between blockchain and CLD are the involvement of runtime. Algorand states that a single transaction has an
a trusted third party for system maintenance and the energy consumption of approximately 0.000008 kWh [21].
absence of a requirement for a consensus mechanism. Another significant parameter is the maximum throughput
LedgerDB is a well-known CLD that is recognized for of the blockchain platforms [22] because each payment can
its exceptional system performance [15]. Decentralized be rewarded through loyalty points in a chain store. The
ledger databases are designed to store and manage large comparison of throughput among PoS blockchains can be
amounts of data while maintaining blockchain technol- seen in Table 1.
ogy’s security, decentralization, and immutability fea-
tures. Data consistency is reached through a consensus
algorithm based on the variant of the Byzantine Fault TABLE 1. Throughput comparison of PoS blockchains.
Tolerant. BigchainDB [16] presents this solution. The
papers [17], [18] introduced more detailed comparisons
of both approaches.
C. ALGORAND
To preserve the idea of this project, it is necessary to choose
an eco-friendly platform to implement the solution. We have
chosen the category of permissionless ledger with a high
level of decentralization, transparency, and trustlessness. Cur-
rently, most blockchain platforms run on the Proof of Work
consensus algorithm. The miners must first resolve a complex
mathematical problem to verify the transactions. Due to the
limited amount of given cryptocurrency in a network, the
difficulty of this problem increases after mining one coin. D. ALGORAND SMART CONTRACTS
The miners compete to get the right to add a new block. Dur- Application development on the blockchain is made possible
ing mining, they consume considerable electricity because by digital contracts called smart contracts. They are safe
this process requires powerful GPUs and processors [19]. and unstoppable programs that execute automatically only
Therefore, some blockchain platforms shifted from PoW to if precisely defined conditions are met. They replace unreli-
PoS consensus mechanisms, such as Ethereum last year. able intermediaries in transactions involving multiple parties,
On the other hand, there is different annualized electricity introducing novel forms of interaction among participants
consumption between blockchain platforms running on PoS, in various industries where there is a demand for enhanced
as shown in Figure 2. security, transparency, and fairness. This applies to the trans-
Algorand blockchain [20] aims to be carbon-negative and fer of financial value, information, or mediation of other
partners with ClimateTrade in 2021 to offset its carbon foot- contractual relationships where certain business logic needs
print with a portion of transaction fees. The basic premise of to be respected [23]. One of the main shortcomings of smart
the Algorand platform for environmental sustainability is its contracts is that they can only directly access data stored in
consensus algorithm, called Pure Proof of Stake (PPoS). It is the blockchain. However, when developing applications, it is
a modified version of Proof of Stake (PoS), one of the two often necessary to work with real-world data that are not on
main consensus algorithms used within blockchain networks. the blockchain. Access to such data is provided by services
The main principle of the PoS algorithm is that only nodes called blockchain oracles [24], and, in turn, they allow the
that stake (lock) at least a minimum specified amount of transfer of data from external repositories to smart contracts.
tokens of a given currency in the network as collateral can Algorand Smart Contracts are small programs on the Algo-
participate in transaction validation. From these stakehold- rand blockchain that function on layer 1 and are categorized
ers, the creator of a new network block is then randomly as stateful or stateless contracts. The type of contract written
selected with consideration of the number of held tokens. determines how the program logic is evaluated. Contracts
In the case of cheating detection, a given node risks losing are written in Transaction Execution Approval Language
its staked tokens. Contrary to apprehensions about the risk of (TEAL), an assembly-like language interpreted by the Algo-
token loss, PPoS sets forth favorable conditions for verifiers, rand Virtual Machine (AVM) in an Algorand node. TEAL
programs can be written manually or using the PyTEAL The last commercial project is Loyyal,10 utilizing private
compiler in Python. channels on the Hyperledger Fabric network. Smart contracts
create an asset definition for loyalty coins. At least one bank
E. RELATED LOYALTY SYSTEMS must be present on the network to convert fiat currencies to
loyalty points and vice versa, but this results in restricted
In this section, we analyze the principle of operation of
loyalty points usage. The platform is offered as Blockchain-
individual blockchain-based loyalty systems and describe the
as-a-Service (BaaS), and clients have to pay monthly license
architecture on which they are based. The unified loyalty
fees according to the number of processed transactions.
program can offer customers advantages and encourage them
Several academic papers focus on resolving some draw-
to spend more loyalty points. If the loyalty program is also
backs of the platforms mentioned above. The first paper [27]
aimed at supporting sustainable products, it can attract people
aims to make payments without any bank’s involvement in the
with an environmental mindset.
Loyyal platform using the integration of Stellar blockchain
One of the most popular commercial projects is
and Hyperledger. Another paper [28] designs the approach to
Qiibee [25], which introduces a standardized plug & play
extend existing off-chain organization management systems
solution. Brands can create their own tokens with the Loyal-
and optimize blockchain database size. It is achieved through
tyToken protocol. To issue loyalty tokens, brands stake QBX
Hyperledger Fabric and Hyperldeger Composer, which
on the public Ethereum chain. The QBX tokens are frozen
ensure data synchronization between on-chain and off-chain
and locked in the vault by the cross-chain bridge. Then, the
bridge issues the loyalty tokens for the loyalty blockchain and applications. Tu et al. [29] propose a Hyperldeger-based loy-
sends them to the brand account. The brand can now reward alty system with a call auction method of the stock exchange
customers, who can redeem their loyalty tokens or exchange market to implement many-to-many matching. The last
them for QBX. paper [30] presents TECH TOKEN, which is produced on the
Another project in this domain is BitRewards [26], built Ethereum chain following the token standard ERC20.11 The
on the Ethereum chain. Retailers can connect to the platform main difference with other platforms is that a manufacturer
by installing an extension or integrating it into their own is the creator and distributor of tokens to suppliers, and then
loyalty system. Customers are rewarded with BIT tokens for suppliers give them to a customer for purchasing.
purchases and can redeem them for their next purchases as As mentioned above, eco-initiatives have introduced ideas
a discount. There is a special smart contract as middleware with great potential to support purchasing ecological and sus-
between the store and the customer, holding the customer’s tainable products. However, they need more rules unification,
tokens until full payment in fiat currency is received. After- and customers’ motivation level needs to be higher. Simi-
ward, the tokens will be transferred to the store account. larly, the large number of loyalty programs is limited for the
customer. In other words, customers have accumulated many
10 https://loyyal.com/
9 https://indices.carbon-ratings.com/ 11 https://ethereum.org/en/developers/docs/standards/tokens/erc-20/
loyalty points, but they cannot exchange the points of one The backend is an OPTIONAL system part used only
company with the points issued by another. Consequently, to demonstrate communication with the smart contract.
they cannot apply discounts to products they need now. Each The module or plugin can replace the backend to inte-
participant can benefit if we fuse eco-initiatives and loyalty grate with existing retail systems in the future. The smart
programs into the unified loyalty system. Customers will contract still holds account balances even if the backend
be able to exchange points and will be more motivated to server is down. Its functions can be further called by par-
buy ecological and sustainable products if they know that ticipants if they have permission for the given function.
they will get more points. Similarly, retailers can gain sev- • Smart contract: The smart contract is a set of instruc-
eral advantages, including reducing expired loyalty points, tions automatically executed when predetermined con-
eliminating the need to manage customer information, and ditions are met. It ensures the management of our
increasing attractiveness to potential new customers. Using token and a fair way of rewarding customers. Similarly,
blockchain, we can achieve a unified loyalty system with it defines and enforces rules for participants based on
aspects of consistency and security. Several stakeholders will their defined roles. Moreover, it keeps the balance of our
have to agree on adding and modifying these data, which generated tokens in the ecosystem. No one can create
will prevent possible unfair behavior and ensure the required their token applied as a discount for purchasing because
fairness. The product ratings will be the same for each retail our token is mapped to the unique address of the orig-
chain, but they will still be able to set their own policy on the inal smart contract. Participants can call the following
level of rewards for each category within the product rating contract functions:
range. – opt_in(): During the registration process of new
retailers, it is called to allocate local storage for each
III. SOLUTION DESIGN of them, where information of a new retailer, such
This section provides a detailed overview of the system as type account, is saved. Algorand uses three types
design. We will explore each critical component, giving a of storage global, local, and box.12
full description of the architecture, its specifications, and the – create_asa(): The smart contract owner can mine
functions it offers. All design decisions and their justifica- new EcoRetail tokens using this function and sub-
tions will be discussed. Finally, we will outline the goals we sequently distribute them to chain stores. Our
want to achieve with the design. EcoRetail token is described in more detail in the
following subsection.
A. HIGH-LEVEL ARCHITECTURE – exchange_asa(): This function is available only for
Figure 3 shows individual parts of the architecture of our the registered chain stores and allows purchasing
proposed solution. The core of the architecture consists of the EcoRetail coins for Algo coins from your wallet.
Algorand smart contract to create tokens and distribute tokens It is executed as an atomic transfer, which means
to customers for purchases of ecological and sustainable that one call can contain more transactions, and all
products. The other part is the backend server which provides transactions in the batch either pass or fail.
REST API to communicate with the smart contract. Similarly, – send_reward(): Similar to the previous case, the
the Oracle blockchain plays an important role in calculating function is executed as an atomic transfer and can
the reward because it collects the Eco-rating of products from only be called by the registered chain stores to
data in the real world for the smart contract. Because it is a redeem rewards to customers through EcoRetail
permissionless blockchain, anyone can join the network and coins for purchasing in their store.
become a validator of transactions. It means that the logic of • Algorand blockchain: Using blockchain in combination
a smart contract has to ensure who can call the given function with the Oracle blockchain ensures a transparent sys-
of the smart contract. The overall architecture contains the tem of rewarding and authenticity of operations in the
following components: system. Algorand blockchain maintains public records
• Single-page web application: The application provides of all participants’ balances and transaction history. The
a web interface to interact with our system for various Oracle blockchain supplies eco-ratings for goods to the
roles. The following section will describe roles and their smart contract, ensuring consistency of ratings across all
functions in more detail. However, the application is chain stores.
mainly used to demonstrate our proposed system and • Blockchain oracle: It acts as a bridge between the
may be replaced by a plugin or a module to integrate blockchain and data from the real world. It con-
with existing store chain systems in the future. sists of multiple nodes that collect data from several
• Backend server: The server includes communication trusted resources. Subsequently, the blockchain oracle
with the smart contract deployed on the Algorand net- feeds data to smart contracts from the outside world
work. As an output, it provides API calls for user because they run in their isolated environment. In our
interfaces, namely, with the interface for systems of
the individual chain stores, as well as with the inter- 12 https://developer.algorand.org/docs/get-details/dapps/smart-
face of the mobile application intended for customers. contracts/apps/#smart-contract-storage
B. KEY FUNCTIONS
The main goal of our design is to provide a unified loy-
alty system that rewards customers for purchasing ecological
and sustainable products. There are three defined roles for
interacting with the system: a customer, a chain store, and
a producer. During the login process, users are asked to log
in using their crypto wallet through MyAlgo Wallet13 which
allows connecting websites and users of a decentralized appli-
cation to interact with the Algorand blockchain. Users can FIGURE 5. Buying of EcoRetail coins and setting of reward policy.
manage their accounts and sign all transactions outside of the
web application. Figure 4 shows the login page and how to
manage wallet accounts during the login process. Each new the exchange rate at the time. By calling api/update-rewards-
user is assigned a role that is recorded along with the public policy/, chain stores set up their own reward policy for prod-
address of the user’s wallet in the smart contract. There are ucts in each category. The web interface for both functions
two types of roles: is shown in Figure 5. Finally, call api/process-purchase/ and
api/send-txn/ to ensure the processing of the purchase list
1) CUSTOMER and the redemption of the reward. The first call calculates
The interface for this kind of role provides only a few details the rewards and creates a batch of transactions. The second
shown in Figure 4. It mainly displays basic account data by call then sends the transactions to execute into the Algorand
calling api/get-account-balance/, such as the wallet address network. To add a product, we need to insert the product
and the balance of Algo and EcoRetail coins. In future ID, amount of sold product, and price per unit. We enter the
work, it may be extended to include the functionality of customer’s wallet address when the purchase list is complete,
the exchange market where customers can exchange their as can be seen in Figure 6
EcoRetail tokens for another type of asset.
C. TOKEN EcoRetail COIN
2) CHAIN STORE As a medium of value exchange within our proposed ecosys-
Besides account information, additional functionality is tem, we have chosen a fungible token that can be imple-
available only for chain stores. The call api/buy-eco-coins- mented on the Algorand platform as a so-called Algorand
get-txn/ enables buying EcoRetail coins per Algo coins at Standard Asset (ASA).14 Units of this token will represent
13 https://connect.myalgo.com/ 14 https://developer.algorand.org/docs/get-details/asa/
FIGURE 6. Purchase list creation. smart contract. In both cases, our aim was to evaluate the
throughput. As mentioned above, the web application is an
optional component of our architecture and can be replaced
loyalty points with the same value for each store chain. by other components in the future.
The token is linked to an implemented smart contract and
distributed to individual retail chains based on its set value. A. EVALUATION OF APPLICATION PERFORMANCE
They then transfer the computed number of tokens to cus- For testing our decentralized application, we selected two
tomers’ wallets when they make product purchases, taking types of test scenarios. The first scenario involved sending
into account the environmental rating of the products. This 100 requests ten times in a row. This test was performed using
rating remains the same for all retailers, but they can design the Locust tool, which is used to create a swarm with millions
their own policy in determining the percentage reward to cus- of simultaneous users. The rewarding process is showed in
tomers for products belonging to each rating group, marked Figure 9. A single request contained the following function
from A to E. Customers can use the collected tokens to calls:
redeem discounts and other benefits on subsequent purchases, • process-purchase - this function receives a purchase list
thus closing the token cycle. Our created token is called as input and preprocesses it before calling sen_txn. That
EcoRetail coin. means: Firstly, it obtains an eco-rating for each item
in the purchase list from external resources, secondly,
IV. EVALUATION it requests the rewards policy defined by the given retail,
We evaluated our design by implementing the functional and thirdly it calculates the total reward for purchasing
prototype as a proof of concept to make our proposed spec- to customer. The Eq. (1) shows how the total reward is
ifications and functions achievable. Our experiments were calculated.
carried out on virtual servers with 16GB RAM and 16-vCPU Pn pricei ×numberi ×rp
( )
running a Ubuntu 22.04.2 LTS operating system that were total_reward = i=1 100
× 100 (1)
algo_price
hosted on the Xen server with Intel(R) Xeon(R) CPUs E5620
with 4 cores at 2.4 GHz. – i represents the item on the purchase list.
Our smart contract logic was written in Python using – n denotes the number of items in the purchase list.
the Pyteal library, which offers high-level abstractions in a – price is a price per unit.
functional programming style for TEAL. It is a stack-based – number is the number of pieces of the given item.
language used for writing smart contracts on the Algorand – algo_price is the current exchange rate between the
blockchain, and Pyteal simplifies the process by compiling Algo and the Euro.
TEAL contracts into bytecode format for execution. We can – rp is a percentage share of the price of the item
see a piece of smart contract in Figure 7 that shows a function for the given eco-rating category and is defined by
to send rewards. The code is available on public GitHub retail.
repository.15 One EcoRetail Coin is equivalent to 0.01 Algo Coins.
• send-txn - submits the transaction to the Algorand net-
During our testing, we need to consider the scalability of
work with input arguments such as retail wallet address,
the proposed solution, that is, how many transactions can be
customer wallet address, and reward.
processed per time unit. In the real world, using our system
in many retails could result in a high load, which needs to be The batch with a load of 100 is shown in Figure 8, where
considered in our testing. Therefore, we divided the testing we can see a fairly stable test progression, where the average
into two scenarios, testing our application and testing the processing time was about 8 seconds and we achieved a
throughput of about 20 calls (10 reward calculation process-
15 https://github.com/fiit-ba/blockchain-based_sustainable_retail_loyalty_ ing and ten transaction processing) per second. To understand
program.git this in a real-world context, we can interpret these results to
mean that if 100 different store checkout chains have calls TABLE 2. The processing time of batches with different sizes.
coming in simultaneously, it takes about 8 seconds for them
to be processed. However, this processing includes the final
confirmation of transactions in the Algorand network. The
transactions are written to the blockchain and can already be
considered immutable. Without waiting for transactions to be
confirmed, a speed of 1 to 2 seconds would be achievable, but
we want to interpret the results for meaningful use in the real
world.
In the second test, we sent batches with 100, 500, and
they acknowledge receipt of the transactions by the Algorand
1000 individual requests to our application. The results of all
network. In this case, we reached the source limitations of our
batch sizes are compared in Figure 10, which shows that the
server.
processing time per request generally increased with larger
batch sizes. The send-txn call took significantly longer for
the batch size 500 than 100, by approximately 25 seconds. B. EVALUATION OF TRANSACTION THROUGHPUT
This delay was caused by the server’s need to handle over One of the problems with blockchain systems is that
500 responses concurrently. They are crucial for us because their throughput is markedly lower than that of centralized
FIGURE 10. Comparing of processing of the different batch sizes by our application.
FIGURE 11. The duration time of the batch processing (left), throughput with different batch sizes (middle), and number of the blocks which include
transactions of the batch (right).
systems [32]. Therefore, we focused on exploring influence throughput. On the other hand, a larger amount
send_reward transaction processing in the network. We tried of transactions is recorded in more blocks than in fewer
to observe the throughput network and processing time for transactions. We could not get closer to the theoretical
batches of different sizes. We designed batch sizes with throughput limit of the Algorand network. All data are given
1000, 2000, 4000, 8000, and 12000 transactions. Four servers in Table 2.
performed the transactions in parallel at the same time. The
batch was evenly divided among all servers before sending. V. DISCUSSION
All servers were placed in the same area. We sent transactions To the best of our knowledge, we designed the first proto-
directly from servers without a remote call to our application type of the decentralized application for the uniform loyalty
because of minimalizing delay caused by our application. The system based on the Algorand blockchain with a negative
measurement results were obtained by Algorand Explorer16 carbon footprint. Besides, it is aimed at supporting the pur-
in which we investigated blocks containing transactions chasing of sustainable products. The uniform loyalty system
belonging to the batch. provides fair and transparent rewards for customers who
In Figure 11, we can see the duration of batch process- buy eco-goods. Chain stores do not need to manage cus-
ing and the throughput for each batch size. The average tomers’ personal information. Because of this fact, they
throughput is 160 transactions per second. An increase in the can save some financial sources and prevent the leakage
number of transactions in the batch does not significantly of private information. Customers communicate using their
MyAlgo wallet, which is anonymous and managed by the
16 https://testnet.algoexplorer.io/ self-customer.
The smart contract is deployed on the public network of on the network, users can pay an additional fee to increase
Algorand. Anyone can download the Algorand node software the likelihood that their transaction will be accepted and
and build the Algorand node in a mode of participation to processed quickly. On the contrary, Ethereum uses gas fees
partake in consensus. It brings a high level of decentralization that reflect the computational resources or power required for
and transparency. If chain stores need to add private data processing transactions.
into transactions, they can upload encrypted data to some The Algorand SDK17 provides two main methods to deter-
storage, for example, IPFS, and share only links to data in mine the fees associated with a transaction. The first method
transactions. involves obtaining the suggested fee parameters from an
Privacy and data protection considerations are crucial in Algod REST server, which includes the recommended fee per
any blockchain-based system, including our proposed sus- byte. This value is then multiplied by the estimated transac-
tainable retail loyalty program. Current research topics in tion size in bytes, which gives the total transaction fee. If the
this area include several approaches, e.g., privacy-preserving calculated fee is lower than the minimum required fee, then
transactions or anonymization, user consent and control over the minimum fee is used instead.
data, secure off-chain data storage, and compliance with The second method uses a flat fee, which is currently set
data protection regulations. In our solution, we count on a at 1,000 microAlgos per transaction. However, in the case of
so-called pseudonymous model of identities. It means that network congestion, the nodes may require a higher fee or
until the users reveal or connect their blockchain identity even reject the transaction altogether. Then, the fee is initially
to a real-life identity, they behave only like an address in calculated as a fixed rate per byte, starting at 1 microAlgo
the Algorand blockchain and, therefore, can be considered per byte. If network congestion persists, the fee gradually
anonymous. However, there is a minimal chance that the increases until the congestion issue is resolved.
store giving the users their loyalty points for purchasing During our testing, we were only asked to pay a fee
goods can connect the identity of a user with their blockchain of 1000 microAlgos per transaction. If a retailer submits
wallet, but we try to mitigate this by not asking for any 1000 transactions, they will pay a total transaction fee
kind of information from users. We only need their wal- of 1 Algo. As of 29 March 2023, the current exchange rate
let address, nothing more. Furthermore, if privacy is the is approximately 0.21 EUR per Algo.
real concern, there have already been proposed improve-
ments by using zero-knowledge proofs and homomorphic VI. CONCLUSION
encryption [33] to ensure that sensitive customer information This paper has shown that a blockchain-based sustainable
remains confidential while still allowing for transaction retail loyalty program has the potential to promote sustain-
verification and auditing. We can additionally think about ability and eco-friendliness in the retail industry. By using
self-sovereign identity, where customers have ownership and blockchain technology and smart contracts, retailers can
control over their loyalty program data and can selectively encourage customers to purchase sustainable products and
share them with retailers or third parties based on their reward them for their loyalty. This program can be imple-
preferences. All of these mentioned aspects are for another mented in various sectors and countries and has the potential
standalone research. to reduce the negative environmental impacts caused by
Another concern could be ensuring the program can han- human activity. Overall, this solution is a step towards a more
dle a large user base and transaction volume. We consider sustainable future for the retail industry.
Algorand as one of the blockchains which aimed to solve Our performance tests have shown that the system has
the trilemma problem [34] and the theoretical maximum the potential to achieve the theoretical limit of TPS on the
transaction throughput measured by a transaction per second Algorand network. Cost analysis showed that transaction
indicator is 6000 TPS as stated in the analysis. This number is fees are relatively low, making it an attractive option for
currently enough to suit the needs of our system, furthermore, retailers. Customers can accumulate loyalty points and use
if a higher volume of transactions comes into process, the them as discounts for future purchases, while retailers can
system will serve them all, but maybe with a higher latency. manage the points they offer for different categories of eco-
However, we are still talking only about a maximum of friendly products. These results offer valuable findings on
20 seconds which is considered very feasible because, from establishing a unified reward program that connects retailers
our experience, the user checks the account balance on a more and customers, motivating customers to buy sustainable and
sporadic repetition, not instantly after purchasing goods. The eco-friendly products, and providing retailers with a way to
authors of the paper [35] have tested the Algorand network manage reward levels based on Eco-score categories.
with 5000 to 50 000 users concurrently trying to write a In terms of future work, we aim to further optimize the
transaction into the ledger and achieved mentioned results. performance of our prototype and conduct more extensive
tests to validate our results. We also hope to collaborate with
retailers and customers to gather feedback and improve the
A. COST ANALYSIS user experience of our system. Overall, we believe that the
The Algorand transaction fee system is based on a fixed fee
per byte in the transaction. When there is a lot of traffic 17 https://developer.algorand.org/docs/get-details/transactions/#fees
prototype has the potential to revolutionize loyalty systems [18] S. Lupaiescu, P. Cioata, C. E. Turcu, O. Gherman, C. O. Turcu, and
and promote sustainable practices. From a more interdisci- G. Paslaru, ‘‘Centralized vs. decentralized: Performance comparison
between BigchainDB and Amazon QLDB,’’ Appl. Sci., vol. 13, no. 1,
plinary point of view, one possible future improvement could p. 499, Dec. 2022.
be the implementation of our own algorithm for the ecologi- [19] M. Platt, J. Sedlmeir, D. Platt, J. Xu, P. Tasca, N. Vadgama, and J. I. Ibañez,
cal evaluation of products, which would be publicly known, ‘‘The energy footprint of blockchain consensus mechanisms beyond proof-
of-work,’’ in Proc. IEEE 21st Int. Conf. Softw. Quality, Rel. Secur. Com-
providing the required transparency. However, the design of panion (QRS-C), 2021, pp. 1135–1144.
such an algorithm would require more extensive research on [20] J. Chen and S. Micali, ‘‘Algorand: A secure and efficient distributed
all factors influencing product sustainability. There is also ledger,’’ Theor. Comput. Sci., vol. 777, pp. 155–183, Jul. 2019.
[21] C. Bassi. (2021). Sustainable Blockchain: Estimating the Carbon Footprint
scope for more comprehensive management of the product of Algorand’s Pure Proof-of-Stake. Accessed: Jan. 23, 2023. [Online].
database, which also relates to the involvement of the various Available: https://www.algorand.com/resources/blog/sustainable-
institutions that have a significant role to play in the sector, blockchain-calculating-the-carbon-footprint
[22] C. Lepore, M. Ceria, A. Visconti, U. P. Rao, K. A. Shah, and L. Zanolini,
e.g., a decentralized autonomous organization (DAO). ‘‘A survey on blockchain consensus with a performance comparison of
PoW, PoS and pure PoS,’’ Mathematics, vol. 8, no. 10, p. 1782, Oct. 2020.
REFERENCES [23] M. Kōlvart, M. Poola, and A. Rull, Smart Contracts. Cham, Switzerland:
Springer, 2016, pp. 133–147.
[1] M. Kan and S. A. Miller, ‘‘Environmental impacts of plastic packaging [24] (2021). What is a Blockchain Oracle? Accessed: Jan. 23, 2023. [Online].
of food products,’’ Resour., Conservation Recycling, vol. 180, May 2022, Available: https://chain.link/education/blockchain-oracles
Art. no. 106156. [25] Qiibee Foundation. (2019). Qiibee Whitepaper. Accessed: Jan. 23, 2023.
[2] (2022). 17 Staggering Customer Loyalty Stats That Will Change Your Per- [Online]. Available: https://static.qiibee.com/qiibee-White-Paper.pdf
spective. Accessed: Jan. 23, 2023. [Online]. Available: https://www.ebbo. [26] (2017). Bitrewards White Paper. Accessed: Jan. 23, 2023. [Online].
com/insights/blog/17-staggering-customer-loyalty-stats-that-will-change- Available: https://www.allcryptowhitepapers.com/wp-content/
your-perspective/ uploads/2018/11/BitRewards.pdf
[3] I. Bashir, Mastering Blockchain: A deep Dive Into Distributed Ledgers, [27] M. Agrawal, D. Amin, H. Dalvi, and R. Gala, ‘‘Blockchain-based universal
Consensus Protocols, Smart Contracts, DApps, Cryptocurrencies, loyalty platform,’’ in Proc. Int. Conf. Adv. Comput., Commun. Control
Ethereum, and More. Birmingham, U.K.: Packt, 2020. (ICAC), Dec. 2019, pp. 1–6.
[4] A. N. Q. Huynh, D. Duong, T. Burggraf, H. T. T. Luong, and N. H. Bui, [28] B. K. Pramanik, A. Z. M. S. Rahman, and M. Li, ‘‘Blockchain-based
‘‘Energy consumption and Bitcoin market,’’ Asia–Pacific Financial Mar- reward point exchange systems,’’ Multimedia Tools Appl., vol. 79, nos. 15–
kets, vol. 29, no. 1, pp. 79–93, Mar. 2022. 16, pp. 9785–9798, Apr. 2020.
[5] European Ecoscore. Accessed: Jan. 23, 2023. [Online]. Available: [29] S.-F. Tu, C.-S. Hsu, and Y.-T. Wu, ‘‘A loyalty system incorporated with
https://europeanecoscore.com/problem-solution/ blockchain and call auction,’’ J. Theor. Appl. Electron. Commerce Res.,
[6] F. Southey. (2021). First Nutri-Score for Nutrition, Now Eco-Score for the vol. 17, no. 3, pp. 1107–1123, Aug. 2022.
Environment: New Fop Lands in France. Accessed: Jan. 23, 2023. [Online]. [30] O. Sönmeztürk, T. Ayav, and Y. M. Erten, ‘‘Loyalty program using
Available: https://www.foodnavigator.com/Article/2021/01/12/Eco- blockchain,’’ in Proc. IEEE Int. Conf. Blockchain (Blockchain), Nov. 2020,
Score-New-FOP-label-measures-the-environmental-impact-of-food pp. 509–516.
[7] B. Sillitoe. Green Reward: H&M Offers Loyalty Points for Eco- [31] I. Hameed, Z. Hyder, M. Imran, and K. Shafiq, ‘‘Greenwash and green
Conscious Shopping. Accessed: Jan. 23, 2023. [Online]. Available: purchase behavior: An environmentally sustainable perspective,’’ Environ.,
https://greenretail.world/2021/03/31/green-rewardhm-offers-loyalty- Develop. Sustainability, vol. 23, pp. 13113–13134, Jan. 2021.
points-for-eco-conscious-shopping/ [32] C. Fan, S. Ghaemi, H. Khazaei, and P. Musilek, ‘‘Performance evalua-
[8] H&M. (2022). H&M Group Expands Partnership With tion of blockchain systems: A systematic survey,’’ IEEE Access, vol. 8,
Textilegenesis. Accessed: Jan. 23, 2023. [Online]. Available: pp. 126927–126950, 2020.
https://hmgroup.com/news/hm-group-expandspartnership-with- [33] K. Stevenson, O. Skoglund, M. Raikwar, and D. Gligoroski, ‘‘Efficient
textilegenesis novel privacy preserving PoS protocol proof-of-concept with algorand,’’
[9] Next Nature Network. (2018). The Eco Coin Whitepaper V1.0. in Proc. 3rd Blockchain Internet Things Conf., Jul. 2021, pp. 44–52.
Accessed: 23.01.2023. [Online]. Available: https://uploads- [34] M. Conti, A. Gangwal, and M. Todero, ‘‘Blockchain trilemma solver
ssl.webflow.com/5c1b58255c613376879c2558/5c4970105b4d237571564 algorand has dilemma over undecidable messages,’’ in Proc. 14th Int. Conf.
f43_ECOcoin_white_paper_v1.0.pdf Availability, Rel. Secur., Aug. 2019, pp. 1–8.
[10] (2021). Why Sharding Is Great: Demystifying the Technical [35] Y. Gilad, R. Hemo, S. Micali, G. Vlachos, and N. Zeldovich, ‘‘Algorand:
Properties. Accessed: Jan. 23, 2023. [Online]. Available: Scaling Byzantine agreements for cryptocurrencies,’’ in Proc. 26th Symp.
https://vitalik.ca/general/2021/04/07/sharding.html Operating Syst. Princ. New York, NY, USA: Association for Computing
[11] S. Nakamoto. Bitcoin: A Peer-to-Peer Electronic Cash System. Accessed: Machinery, Oct. 2017, pp. 51–68, doi: 10.1145/3132747.3132757.
Jan. 23, 2023. [Online]. Available: https://bitcoin.org/bitcoin.pdf
[12] V. Buterin, ‘‘A next-generation smart contract and decentralized applica-
tion platform,’’ White Paper, vol. 3, no. 37, pp. 1–2, 2014.
[13] E. Androulaki, A. Barger, V. Bortnikov, C. Cachin, K. Christidis,
A. De Caro, D. Enyeart, C. Ferris, G. Laventman, and Y. Manevich
‘‘Hyperledger fabric: A distributed operating system for permissioned
blockchains,’’ in Proc. 13th EuroSys Conf., 2018, pp. 1–15.
[14] J. Nick, A. Poelstra, and G. Sanders. (2020). Liquid: A Bitcoin
Sidechain. Liquid White Paper. [Online]. Available: https://blockstream.
com/assets/downloads/pdf/liquid-whitepaper.pdf LUKAS MASTILAK received the M.Sc. degree in
[15] X. Yang, Y. Zhang, S. Wang, B. Yu, F. Li, Y. Li, and W. Yan, ‘‘LedgerDB: software engineering from the Slovak University
A centralized ledger database for universal audit and verification,’’ Proc. of Technology, in 2018, where he is currently pur-
VLDB Endowment, vol. 13, no. 12, pp. 3138–3151, Aug. 2020. suing the Ph.D. degree in applied informatics. His
[16] T. McConaghy et al., ‘‘BigchainDB: A scalable blockchain main research interests include blockchain tech-
database,’’ BigchainDB GmbH, Berlin, Germany, White Paper, nologies and security, with a focus on the area of
2016. Accessed: Jan. 23, 2023. [Online]. Available: https://www. inter-domain routing in computer networks.
bigchaindb.com/whitepaper/bigchaindb-whitepaper.pdf
[17] D. L. Fekete and A. Kiss, ‘‘A survey of ledger technology-based
databases,’’ Future Internet, vol. 13, no. 8, p. 197, Jul. 2021.
ROBERT SUCHY received the B.Sc. degree in and the fintech area. His research interests include blockchain interoper-
informatics. He is currently pursuing the mas- ability, tokenization of things, and metaverse approaches. As a fan of open
ter’s degree in intelligent software systems with technologies and open software, he is an active member of the Blockchain
the Faculty of Informatics and Information Tech- Community in Slovakia. During his studies, he was awarded several times
nologies, Slovak University of Technology. His for excellent research results and best dissertation thesis at both the faculty
research interest includes the sustainability of dif- and university level.
ferent aspects of IT, currently especially looking
for consensus algorithms in blockchain networks.