*4.7. Implementation of Blockchain for Secure Exchange of Messages amongst ISO and Under-Operating Agents*

In this scenario, in order to secure the data exchanged between ISO and underoperating agents, the blockchain technique has been used to exchange information, and for

this purpose, unit prices are sent to ISO along with the production rate based on the system conditions. Confirmation of the validity of the sent data in the blockchain platform and non-destructive manipulation of information, such as FDI attack, and the amount of production of units in the desired time frame are sent to the units in the blockchain platform and then the units, after validating the sent data by ISO, produce the desired amount of power, which makes the data safe to send and any attack based on the messages is detected. It should be noted that the main objectives of the independent system operator, as in the above institution, should be met, such as reducing the LMP of the buses (reducing the congestion of transmission lines) and maximizing the social welfare of the network. DGSs should be properly closed. Table 10 shows examples of exchanged messages between ISO and under-operating agents based on blockchain technology.


**Table 10.** Transaction blockchain description.

The generic blockchain relevant to ISO is demonstrated in Table 10 and shows that the information is in accordance with the specific blockchain of ISO. This procedure is able to aid the recovery of the information contained in a cyber-attack or package in private and public blockchains.

Nevertheless, it is noteworthy that the output powers of agent generation and other data, as well as the costs of the generation of every DG and G, do not exist in the blockchain, which is able to raise the privacy and the security of the messages and network.

The transaction blocks are presented by Table 10. Pursuant to this table, for example, at t = 1, DG3 gets a message from ISO. In addition, the value of the provided power in megawatts, as well as the generating DG, are demonstrated in this table. Like the specific blockchain, any block includes the blockchain hash algorithm (HA), recognized as the self HA, that is able to chain to the prior block through utilizing the prior HA. Plus, if a cyber-attack has happened in the message (see indexes 7 and 5), the HA is altered and the HA is not the similar, so the multiple message is defined.
