# A Novel Decentralized E-Commerce Transaction System Based on Blockchain
## 3 Platform Design
### Reputation Evaluation Scheme
#### 3.4.1. Calculation of Node Reputation Value
\begin{tabular}{l c c c c c} \hline \hline \multicolumn{1}{c}{**Functional Characteristic**} & **Ref. [16]** & **Ref. [19]** & **Ref. [20]** & **Ref. [29]** & **This Paper** \\ \hline Storage & \(\times\) & \(\times\) & \(\surd\) & \(\surd\) & \(\surd\) \\ Optimization & \(\surd\) & \(\surd\) & \(\times\) & \(\surd\) & \(\surd\) \\ Logistics & \(\surd\) & \(\times\) & \(\surd\) & \(\surd\) & \(\surd\) \\ Chaining & \(\surd\) & \(\times\) & \(\surd\) & \(\surd\) & \(\surd\) \\ Incentives & \(\surd\) & \(\surd\) & \(\surd\) & \(\surd\) & \(\surd\) \\ Mechanism & \(\surd\) & \(\surd\) & \(\surd\) & \(\times\) & \(\surd\) \\ Credit & \(\surd\) & \(\surd\) & \(\surd\) & \(\times\) & \(\surd\) \\ \hline \hline \end{tabular} 

[PERSON] et al. describes a decentralized e-commerce system in an e-commerce environment based on blockchain, with no introduction on third-party institutions except buyers and sellers, and more improvements are required for supply and logistics [20]. [PERSON] et al. proposed a supply chain finance based on blockchain, while fails to perform credit evaluation. By comparison, the system proposed in the paper could satisfy the above requirements and show a good functionality [29]. ### Performance Analysis and Test of the Proposed System

This section presents the testing of the communication overhead of the proposed system, and analyzes the gas consumption and time cost of the system to evaluate its performance. #### 4.2.1 Analysis of Gas Consumption

Ethereum executes commands step by step according to smart contract during the transaction. To perform each step, there exists the consumption called gas [30]. Gas Limit is the maximum available amount of gas for a transaction execution. However, if a transaction execution requires more gas than the gas Limit, the System will emit an out-of-gas exception immediately, and all executed operations will be reverted [31]. The user loses all of Gas. For users, smart contracts with low gas consumption are more popular. This research arranged the smart contract on Remix to predict the consumption of gas, and compared the proposed system with the BC-DRS and BS-EP. The results are shown in Figure 7. \begin{table}
\begin{tabular}{l c c c c} \hline \hline \multicolumn{1}{c}{**Functional Characteristic**} & **Ref. [16]** & **Ref. [19]** & **Ref. [20]** & **Ref. [29]** & **This Paper** \\ \hline Storage & \(\times\) & \(\times\) & \(\surd\) & \(\surd\) & \(\surd\) \\ Optimization & \(\times\) & \(\times\) & \(\surd\) & \(\surd\) & \(\surd\) \\ Logistics & \(\surd\) & \(\surd\) & \(\surd\) & \(\times\) & \(\surd\) \\ Chaining & \(\surd\) & \(\times\) & \(\surd\) & \(\surd\) & \(\surd\) \\ Incentives & \(\surd\) & \(\times\) & \(\surd\) & \(\surd\) & \(\surd\) \\ Mechanism & \(\surd\) & \(\surd\) & \(\surd\) & \(\times\) & \(\surd\) \\ Credit & \(\surd\) & \(\surd\) & \(\surd\) & \(\times\) & \(\surd\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Functional comparison of e-commerce system. Figure 6: Logistics information encryption on the chain. As can be found from Figure 7, the gas value consumed by our contract confirmation purchase functions was minimum. For smart contracts, upload numerous data consumed more gas than simply signing the transactions. The systems of Literature BC-DRS and BS-EP shall upload numerous data in upload stage of commodity, so that the cost of gas was high. The proposed system stored the IPFS address of commodity information on blockchain. The address was a fixed size bitstream. Therefore, the cost of gas processing address data would not increase, so that the upload time of commodity information was less. the gas costs for loops are higher than that for other functions in smart contracts [31, 32]. In this paper, the smart contract used is optimized so that it still has good functionality and reduces gas consumption even with fewer loop functions. The BC-DRS had no evaluation function, so that it consumed less gas. In general, the proposed system had more comprehensive functions and less gas consumption.