# A Novel Decentralized E-Commerce Transaction System Based on Blockchain
## 3 Platform Design
### Reputation Evaluation Scheme
#### 3.4.1. Calculation of Node Reputation Value
By taking Equation (7) into Equation (6), the reputation value of the node can be obtained. The pseudo-code for calculating reputation value is shown in Algorithm 1. ```
1:\(t^{\prime}_{ij}=\frac{t_{ij}-t^{\text{min}}_{ij}}{t^{\text{max}}_{ij}-t^{\text {min}}_{ij}}\)
2:\(w^{\prime}_{ij}=\frac{w_{ij}-w^{\text{min}}_{ij}}{w^{\text{max}}_{ij}-w^{ \text{min}}_{ij}}\)
3:\



less deposits stored in smart contracts, whose reputation value incentive mechanism is beneficial to form a positive online shopping cycle. ```
Input: Transaction Records Output: Reputation
1:for\(i=1\) to \(y_{i}\) do
2:for\(i=1\) to \(a_{i}\) do
3:\(C_{ij}^{\prime}\leftarrow\frac{C_{ij}}{C_{\text{max}}}\), \(T_{ij}\leftarrow(\frac{1}{nim\hat{y}_{i}})^{\theta}\)
4:end for
5:\(R_{i}\leftarrow\sum\limits_{j=1}^{a_{i}}\varphi_{ij}\)
6:end for
7:return \(R_{i}\)
```

**Algorithm 1** Reputation Assessment

## 4 Experimental Results and Analysis

This section analyzes the functionality and performance of the proposed system, and explains its function integrity and performance by the comparison with other similar systems. Also, the reliability and security of the proposed e-commerce system are analyzed. The experimental configuration information is shown in Table 1.

This paper adopts Geth to build and test private blockchain. The system proposed in this paper was arranged in the private Quorum, written in Solidity language and with version 0.8.4, which was tested by Remix. ### Basic Function Test of the Trading Systems

#### 4.1.1 Test and Analysis of Smart Contract

Before testing, it is necessary to compile and arrange the smart contract. The smart contract on Remix platform was compiled and tested. The smart contract was deployed as soon as being compiled. The account in Ganache was applied to imitate the transaction account. The compilation result is shown in Figure 5. With the transaction, the currency of transaction account would change, and the transaction could be concluded normally. After completing the transaction, the transaction information was stored in the chain. As shown in Figure 6, the logistics information was stored in the chain through hash encryption. The proposed transaction system could realize the function of chaining and storage of transaction and key information, and meet the general requirements of e-commerce transaction system. #### 4.1.2 Functional Comparison of the State-of-Art E-Commerce Systems

The proposed system was compared with the state-of-art systems. The results are shown in \[t^{\prime}_{ij}=\frac{t_{ij}-t^{\text{min}}_{ij}}{t^{\text{max}}_{ij}-t^{\text {min}}_{ij}} \tag{1}\]0

[PERSON] et al. proposed a cross-border e-commerce-driven foreign trade research based on blockchain [16]. However, the operation speed was slow due to the processing of large amount of data to be stored on chain. \begin{table}
\begin{tabular}{c c} \hline \hline
**Object** & **Configuration Information** \\ \hline CPU & Intel i7-6300 HQ \\ Operating System & Windows 10 \\ Ram & 8 GB DDR4 \\ Hard Disk & 256 GB SSD \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Experimental configuration information. [PERSON] et al. describes an e-commerce platform for small-and medium-sized enterprises without an incentive mechanism [19]. Figure 5: Smart contract compilation and testing: (a) Smart contract compilation tests; (b) Ganache simulates account token changes.