# A Novel Decentralized E-Commerce Transaction System Based on Blockchain
## 2 Related Work  
Blockchain was proposed by [PERSON], which is a distributed ledger consisting of encryption algorithm, consensus algorithm and smart contract [12]. As illustrated in Figure 1, It is a chained storage structure [13]. Each block stores transaction data for a period of time, which is linked by the Hash value of the previous block and all blocks involved in the transaction can be traced. Therefore, blockchain data will not be easily changed and is applicable to be traced and is stored in tamper proof supply chain systems [14].  
Smart contract is an executable program whose instances and statuses are stored in blockchains. Blockchains are trusted, traceable and tamper-proof without the need for trusted third parties that usually constitute a single point of failure [15]. There is some explorations on the combination of blockchain and e-commerce. For example, the decentralized market Open Bazaar 1.0 for transaction with bitcoin was officially launched in April 2016, providing ideas to develop a secure e-commerce transaction system. [PERSON] proposed a cross-border e-commerce system based on blockchain, which solved the problem of the difficult traceability of cross-border commodity sales by combining the blockchains features of credibility and traceability on transactions [16]. [PERSON] et al. proposed a traceability system of agricultural product supply chain based on master-slave alliance chain. The master chain is the agricultural product supply chain, and the slave chain is the third-party organization supervision chain that is connected with the master chain by smart contract, which solved the problems of small storage capacity and low storage efficiency of a single blockchain [17]. [PERSON] et al. proposed an efficient storage method based on cloud storage and dual blockchain, which encrypts and stores high-capacity data in the cloud, and saves the index in the blockchain, avoiding the limited storage capacity of blockchain and improving the speed of data chaining [18]. [PERSON] and [PERSON] designed a Blockchain-Supported E-Commerce Platform (BS-EP) for small-and medium-sized enterprises, which provides trust guarantee for transactions between small-and medium-sized enterprises. It also proposed three applications to solve the trade problems of enterprises based on the traceability and tamper proof characteristics of blockchain [19]. [PERSON] et al. proposed a Decentralized Reputation System (BC-DRS) based on blockchain in e-commerce environment [20]. The system stores users' comments in Interplanetary File System (IPFS), returns them to the corresponding address, and calculates the reputation value weighted by actual transaction factors. A monetary incentive mechanism was also proposed. The experimental results showed that the proposed decentralized reputation system has good usability and reliability. However, most of the proposed decentralized e-commerce systems are still focused on the transactions between buyers and sellers. That mean, they fail to record the information of third-party institutions in the chain, and there is no available corresponding reputation system to effectively prevent the attacks.  
In this paper, we propose an e-commerce transaction system based on blockchain and IPFS, and establish a decentralized reputation model based on multi-criteria decision making (MCDM) method. In this system, merchants store the commodity details in the IPFS system and update the returned addresses to the blockchain to improve the efficiency of commodity data on the chain. To reduce the storage space of IPFS, we propose a mechanism  
Figure 1: Block structure.  
to clean up the records periodically. The logistics party updates the logistics information to the blockchain for easy inquiry and supervision. In this system, a reputation evaluation scheme that fully considers transaction factors such as transaction time, transaction amount, and user reputation is proposed, and a monetary incentive mechanism is designed to promote the smooth operation of the e-commerce system.