计算机工程与应用 ›› 2021, Vol. 57 ›› Issue (24): 115-125.DOI: 10.3778/j.issn.1002-8331.2007-0473

• 网络、通信与安全 • 上一篇    下一篇

基于区块链的公平预付卡管理方案

冯贵兰,李正楠   

  1. 1.中国民航飞行学院 现代教育技术中心,四川 广汉 618307
    2.中国民航飞行学院 航空工程学院,四川 广汉 618307
  • 出版日期:2021-12-15 发布日期:2021-12-13

Fair Prepaid Card Management Scheme Based on Blockchain

FENG Guilan, LI Zhengnan   

  1. 1.Modern Education Technology Center, Civil Aviation Flight University of China, Guanghan, Sichuan 618307, China
    2.Institute of Aviation Engineering, Civil Aviation Flight University of China, Guanghan, Sichuan 618307, China
  • Online:2021-12-15 Published:2021-12-13

摘要:

近年来预付费消费模式倍受商家和消费者的青睐,在娱乐健身、教育培训、商超零售等服务业中得到广泛应用。现有预付卡管理中存在商家欺诈高发、商家违约频发、监管不善等诸多问题,难以保障消费者的权益。当前,基于区块链的智能合约技术具有去中心化、安全性高、可验证等特性,可用来有效管理预付卡,为解决预付卡管理存在的问题提供了新思路。因此提出了一种基于区块链的公平预付卡管理方案,消费者和商家通过与智能合约的交互完成交易,利用智能合约的暂存价值完成预付款的管理。消费者和商家共同确认消费成功后,由智能合约自动结算本次消费费用给商家。当商家存在违约时,消费者可以通过申诉追回已支付的预付款,维护自己的权益,从而保证交易的公平性。基于以太坊实验环境实现了预付卡管理方案,对预付卡发售、消费与退款等功能进行了详细测试。通过实验测试和安全性分析,验证了该方案的有效性和可行性。

关键词: 区块链, 智能合约, 预付卡, 以太坊, 公平性

Abstract:

In recent years, the prepaid consumption mechanism has been widely adopted in super retail, recreation and fitness, education training. However, there are some drawbacks in existing prepaid card schemes, e.g. high incidence of fraud, frequent breach of contract, and lack of government regulation. At present, the smart contract technology in blockchain enjoys the characteristics of decentralization, high security guarantee and verifiability, which can be used to manage prepaid cards in an effective way. This paper contributes a new idea to address the occurred problems in current prepaid card schemes. Therefore, a fair prepaid card management scheme based on blockchain and smart contract is proposed. The transactions between consumers and merchants are completed through smart contracts. The management of the advance payment is realized by the temporary function of the smart contracts. After the consumer and the merchant jointly confirm the consumption success, the smart contract will automatically settle the consumption fee to the merchant. If the merchant breaches the contract, the consumer can recover the advance payment by appealing to protect his rights, which proves that the scheme meets the fairness requirements. To implement the proposed scheme, smart contracts are written in solidity and deployed on local Ethereum test network. The results of security analysis and evaluation show that the scheme achieves high security and availability.

Key words: blockchain, smart contracts, prepaid card, Ethereum, fairness