## 6 Discussion  
Identifying the \"event\" is one of the most difficult challenges of current decision support systems. If the system encounters an emergency, it is usually unable to promptly notify users. The blockchain-based SCM system can improve the transparency of traceability to ensure that the supply chain system provides high-quality products and protects data privacy and security. The view is taken; therefore, in this work, we combined a method of real-time event detection using collected Twitter data and blockchain technology for event monitoring to improve the visibility of the supply chain system and take preemptive measures for risk avoidance. The discussion of experimental results is addressed in detail as follows:  
1. The experimental results demonstrated that the total cost of using our system is very low, and the implemented system is very simple to apply. 2. In many reported use cases [64], in blockchain-based supply chain systems, on-chain records and off-chain repositories can interoperate as needed. As stated previously, in this work, we have developed a blockchain-based platform and decentralized applications to provide users with an assessment of global market conditions based on real-world conditions and status updates in the blockchain. As blockchain has limited storage, the data has been stored on-chain and off-chain. The system monitors the situation in the external world (off-chain) and the blockchain world (on-chain). The connection between the on-chain and off-chain world can be fulfilled by the automatic execution mechanism of a smart contract on the platform. This allows the original SCM system and the blockchain system to work at the same time, regardless  
Figure 17: CPU usage average performance (the difficulty is increased to 20 times). \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Testnet** & **Action** & \begin{tabular}{c} **Oraclice** \\ **Callback** \\ **(Time)** \\ \end{tabular} & \begin{tabular}{c} **Transaction** \\ **Gas** \\ **Gas** \\ **(Time)** \\ \end{tabular} & \begin{tabular}{c} **Gas Prince** \\ **Gas** \\ **(Ether)** \\ \end{tabular} & \begin{tabular}{c} **Oraclize Fe** \\ **(Ether)** \\ \end{tabular} & \
\begin{tabular}{c} **Transaction** \\ **(Ether)** \\ \end{tabular} &
\begin{tabular}{c} **USD (5)** \\ **(Ether)** \\ \end{tabular} \\ \hline \multirow{4}{*}{**Private Chain**} & Smart Contract & \multirow{4}{*}{-} & 23 s & 473,074 & \multirow{4}{*}{0.000000107} & 0.110618918 & 43.74093256 \\ \cline{3-8}  & & 21 s & 414,180 & & 0.10431726 & 41.24913095 \\ \cline{3-8}  & Inventory Risk & 20 s & 414,180 & & 0.10431726 & 41.24913095 \\ \cline{3-8}  & Assessment & 20 s & 414,180 & & 0.10431726 & 41.24913095 \\ \cline{3-8}  & & 20 s & 414,180 & & 0.10431726 & 41.24913095 \\ \cline{3-8}  & & 19 s & 414,180 & & 0.10431726 & 41.24913095 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: The cost for deploying and executing the smart contracts on the private chain. of whether they work together or separately, without reducing the performance of the existing SCM system. 3. \"Smart contract\" is employed in this work as an automatic execution and control tool for the supply chain management. In the developed blockchain system, when the conditions meet the set conditions, the scripts as contracts will be triggered automatically by the distributed blockchain system. Using the functionality of blockchain, there is no central power that has the right to change a smart contract unless every node on the blockchain system comes to a consensus. 4. In our experiments, once the impact of an external event (i.e., the values of selected external indicators or indexes) reaches the smart contract setting value, the corresponding function will be executed. The set value represents the emergency state in the real world. When the system detects certain unsafe event-related status, it will automatically execute the previously set supply chain response function.