# A Framework for Decentralized Energy Trading Based on Blockchain Technology
## 3 Case Study
### Result and Analysis  
Figure 8 shows the total trading curve of a 2-day bidding process. As the figure demonstrates, the order price of the generators was much lower than that of the consumers in the first 4 hours, so the total trading quantity was equal to the demand. However, after a certain period in the market, the generators began to use the price strategy in order to obtain more profit. Thus, the generators' bidding capacity and the market's total trading quantity started to decrease. With the demand increase, more energy was required, and in order to make more profit, the generators started to increase the quantity, and the consumers started to increase the bidding price. At about 9:00 a.m., the market's equilibrium status was achieved, and the average total trading quantity followed the demand. After this point, the market was in a dynamic equilibrium stage.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Generator** & **Supply (kWh)** & **Cost (S)** & **Initial Price (S)** \\ \hline
1 & 1.6 & 0.016 & 0.017 \\
2 & 0.4 & 0.017 & 0.018 \\
3 & 0.6 & 0.018 & 0.019 \\
4 & 0.4 & 0.024 & 0.025 \\
5 & 1.0 & 0.028 & 0.029 \\
6 & 3.0 & 0.021 & 0.022 \\
7 & 0.2 & 0.023 & 0.024 \\ Total & 7.2 & & \\ \hline \hline \end{tabular}
\end{table}
Table 2: Initial bidding price and energy quantity of each generator.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Generator** & **Demand Portion (\%)** & **Cost (S)** & **Initial Price (S)** \\ \hline
1 & 0.1 & 0.048 & 0.047 \\
2 & 0.16 & 0.052 & 0.051 \\
3 & 0.3 & 0.056 & 0.055 \\
4 & 0.08 & 0.053 & 0.052 \\
5 & 0.06 & 0.046 & 0.045 \\
6 & 0.2 & 0.051 & 0.050 \\
7 & 0.12 & 0.052 & 0.051 \\ Total & 1 & & \\ \hline \hline \end{tabular}
\end{table}
Table 3: Initial bidding price and energy quantity of each consumer.  
Figure 9 shows the mean trading price of all agents. As Figure 9 illustrates, the bidding price before 4:00 a.m. increased dramatically when the initial trading price (0.024) was lower at the beginning. However, when the generator constantly increased its bidding price, and the power purchaser constantly decreased its bidding price, the gap between the bids began to narrow. Between 4:00 a.m. and 6:00 a.m., the generators continued intending to increase the bidding price, but the profit could no longer increase. At this point, the generators began to use the electricity quantity adjustment strategy in order to obtain profit, obliging the power purchasers to bid a higher price. As a result, the trading price of the whole market began to rise (reach 0.046) at 12:00 a.m. However, when the demand started to decrease, there was no more profit, and thus the generators started to adjust their quantities. The generators started to decrease their bidding prices, and the trading price started to fall. After this point, both sides were in a stationary equilibrium, and the generator and the purchaser reached a dynamic equilibrium. When the demand increased, the generators started to apply price and quantity adjustment strategies to increase the bidding price and quantity. The consumers had to adjust to this. When the demand decreased, the consumers start their dominance of the market. In the end, the two-sided bidding prices would follow the trend of energy demand.  
Figure 8: Total sales in the market.  
Figure 7: Demand quantity of total consumers.